Friday, June 2, 2017

Flicking the apple2 hi-res pages as fast as possible

Just for fun, I thought I'd see what mame would do with flicking the hi-res pages as fast as I can. I remember doing this years ago on my apple 2.

The softswitches at $C054 and $C055 will select page 0 (c054) or page 1 (c055).

So let's launch the apple2ee driver with

./mame64 apple2ee

And after it boots, hit CTRL+F12 to do a CTRL+RESET to stop the boot process and give you a command prompt.



Then let's do a CALL -151 to get into the monitor,
then type an exclamation point ! to get into the mini-assembler.

Type 300:LDA $C054 (enter)
(space) LDA $C055 (enter)
(space) JMP $300 (enter)
then (enter) will drop you out of the mini-assembler.

To look at this disassembled, type 300L (enter)





now type CTRL+C to get back to applesoft.

type

HGR:HCOLOR=3:FOR I = 0 TO 179:HPLOT 0,I TO 279,I:NEXT

This will fill the hi-res screen with white.




Now we'll call our little machine language program:

CALL 768

and the screen will show alternating lines. On a real apple2, it will be more like a checkerboard pattern, but the emulation is probably handling it line by line.



To stop the flickering before you get a seizure, CTRL+F12 will reset the machine.




Those of you who know 6502 assembly would probably know how to squeeze some cpu cycles to flip the pages faster.

edit:

Well, I've recently discovered the apple ii emulator epple2 by Chris Mosher at http://mosher.mine.nu/epple2/.

This emulator aims to do faithfully recreate cycle exact apple 2 video, which is exactly what I'm looking for. After much trials and tribulations setting it up and getting the roms straightened out, I can try my soft switch hitting.

300: AD 54 C0 AD 55 C0 4C 00 03



hitting break, then

(sticking in one NOP - EA)

300: AD 54 C0 EA AD 55 C0 4C 00 03



after hitting reset, it goes back to text mode so let's change the code to hit the C050 and C057 switches and then have a few EA delays and jump to $0306:





Now the stripes are thicker:


No comments:

Post a Comment