[GOODIE] A2Emulator
Helge Horch
Helge.Horch at munich.netsurf.de
Tue Nov 20 14:59:39 UTC 2001
At 02:08 20.11.2001 -0800, Duane Maxwell wrote:
>This changeset implements an emulator for a common 6502-based
>microcomputer.
In-sane-ly great! Very very *very* cool.
I nominate this for the hack-of-the-month award.
Upon trying HGR mode -- before I realized that the A2Morph leaves HiRes as
an exercise for the reader -- I hit upon an undocumented instruction ($FF
at PC $F5BA and $F5CA) when issuing a HPLOT 10,10 TO 20,20.
I *think* the 6502 did something like:
!CPU6502 methodsFor: 'undocumented' stamp: 'hh 11/20/2001 13:55'!
bbs7
| adr v |
"incAbsX inlined"
adr _ self nextWordPC + x.
memory at: adr put: (v _ (memory at: adr) + 1 bitAnd: 16rFF).
self flagsNZ: v.
"sbcAbsX inlined"
self sbc: v! !
That is, a combination of INC and SBC (sometimes called "ISB"). Perhaps
modulo *not* recognizing the D flag for the SBC, but I'll have to dig
deeper for this. And I have no way to tell before somebody beats me to the
HiRes display methods.
Thank you, thank you, thank you.
Cheers,
Helge
More information about the Squeak-dev
mailing list
|