[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing emulator...
Holger Picker <pickerh@uni-muenster.de> wrote in message news:<Pine.A41.4.44.0209090930400.222564-100000@zivunix.uni-muenster.de>...
> Hello,
>
> thanks for your kind reply. After downloading version 0.51, I took a closer
> look at it. There are a few things I noticed:
> a) About the language card:
Nothing fixed since 0.51 here.
> I may be wrong, but in your code the readbank
> and writebank functions differ in that way that when calling writebank you
> do not subtract 0xd000 from addr, neither is that done within writebank. The
> index you've got then might be wrong. (You also check for addr<4096, which
> may not work then.) Second, your code does not differentiate between read-
> and write access to the LC. With the AppleII it is possible to write a
> copyloop that reads the rom and stores it to the LC without changing the
> softswitches since read and write access are kept apart. (Well, to my
> knowledge.) This may be the reason, why DOS 3.3 Master etc do not work.
I'm not sure how I should do my I/O then...but I'll check the remove
$D000, see if it helps.
> b) There is a bug in your graphic emulation. When converting the bits to
> pixels you need to take the surrounding bits of the left and right byte also
> into account, e.g. when writing to address $2001, use bits from $2000,$2001,
> and $2002. Otherwise you will get strange vertical lines (black or white).
> I've written a (long) email for you, which also contains some example code
> of my Java-emulator (LC and graphic) for you to compare, but I'm not quite
> sure whether I should send it. (Well.. I don't like to get on people's
> nerve by sending them things they don't want.) Please let me know if you are
> interested.
Go ahead, send it to sysdev@ my non-spam addy same domain. The screen
can be fixed in 0.67d by pressing F5.
> Important: The bugs I mentioned may be very old and already corrected, thus
> only appear in version 0.51. My apologies then. I will download the latest
> version 0.67 now.
> c) Some people of this newsgroup (Mr. David Empson and others)
Yes, I recognized his name and e-mail addy from correspondence dating
1993 on csap that resulted in Andrew Gregory's emulator (a valuable
reference indeed!)
> have put
> together a nice and, I guess, almost complete list of all the softswitches
> and other things about the AppleII. In case you haven't got it, I could send
> it to you.
Please do, at sysdev.
> Also, if you need information about illegal opcodes, I've got lot
> of sheets for it, though I do not recommend to implement them, since later
> AppleIIes (and, of course, the AppleIIc) were shipped with 65c02 processors
> that do not have illegal instructions anymore, just NOPs.
The updated CPU core, M65C02, appears to flag them but just skip over
them.
> In other words:
> You can almost ignore them, as long as you make sure that you skip the right
> amount of bytes that belong to the instruction. BTW.: This is a bug in
> AppleWin, and I know of one case where, as a result, a disk image does not
> work with AppleWin. (Oh dear, I should write a mail to Oliver about it...)
> d) Could I ask you, please, whether your C-compiler generates 16-bit real mode
> code or 32-bit protected mode code? This is important if you want a good
> emulation of the various AppleII resolutions. You can stick to DOS, of
> course, if you like (my first PC emulator also runs under DOS), but 16 bit
> real mode today is simply a dead end and far too slow.
16-bit real mode, because it's easier to program in Turbo C++ with its
^F1 help...it may be possible to port to djgpp but I can't do that yet
(my last try failed miserably with a segfault). It runs at or near
full speed on my 5x86/133.
-uso.