diff --git a/mode7_demo/Makefile b/mode7_demo/Makefile index f449e0bd..7b25dfcf 100644 --- a/mode7_demo/Makefile +++ b/mode7_demo/Makefile @@ -9,12 +9,17 @@ all: mode7_demo.dsk $(DOS33): cd ../dos33fs-utils && make -mode7_demo.dsk: $(DOS33) MODE7_DEMO MODE7_DEMO_C +mode7_demo.dsk: $(DOS33) MODE7_DEMO MODE7_DEMO_C HELLO # $(DOS33) -y mode7_demo.dsk BSAVE -a 0x4000 MODE7_DEMO $(DOS33) -y mode7_demo.dsk BSAVE -a 0x2000 MODE7_DEMO_C + $(DOS33) -y mode7_demo.dsk SAVE A HELLO +#### +HELLO: hello.bas + ../asoft_basic-utils/tokenize_asoft < hello.bas > HELLO + ### MODE7_DEMO_C: mode7_decompress.o diff --git a/mode7_demo/hello.bas b/mode7_demo/hello.bas new file mode 100644 index 00000000..8f834730 --- /dev/null +++ b/mode7_demo/hello.bas @@ -0,0 +1,10 @@ + 2 HOME + 5 PRINT + 10 PRINT "MODE7_DEMO V1.1" + 20 PRINT + 23 PRINT + 24 PRINT "WWW.DEATER.NET/WEAVE/VMWPROD/MODE7_DEMO" + 25 PRINT : PRINT + 30 FOR I = 1 TO 1000: NEXT I + 40 HGR + 50 PRINT CHR$ (4);"BRUN MODE7_DEMO_C" diff --git a/mode7_demo/interrupt_handler.s b/mode7_demo/interrupt_handler.s index f930b55e..7f19cc98 100644 --- a/mode7_demo/interrupt_handler.s +++ b/mode7_demo/interrupt_handler.s @@ -27,9 +27,17 @@ CHUNKSIZE EQU 11 ; hardcoded, based on krg file interrupt_handler: - pha ; save A ; 3 +; pha ; save A ; 3 + ; instead count on the handler saving A to $45 + ; Should we save X and Y too? + txa + pha ; Save X + tya + pha ; Save Y + + ; inc $0404 ; debug (flashes char onscreen) bit $C404 ; clear 6522 interrupt by reading T1C-L ; 4 @@ -278,7 +286,16 @@ done_interrupt: exit_interrupt: - pla ; restore a ; 4 + pla + tay + pla + tax + + +; pla ; restore a ; 4 + + lda $45 ; restore A + rti ; return from interrupt ; 6 diff --git a/mode7_demo/mode7_demo.dsk b/mode7_demo/mode7_demo.dsk index 7e913c03..fcbb565e 100644 Binary files a/mode7_demo/mode7_demo.dsk and b/mode7_demo/mode7_demo.dsk differ diff --git a/mode7_demo/mode7_demo.s b/mode7_demo/mode7_demo.s index 448fd0ea..eaca69a8 100644 --- a/mode7_demo/mode7_demo.s +++ b/mode7_demo/mode7_demo.s @@ -324,7 +324,9 @@ title_routine: .include "mockingboard.s" .include "credits.s" .include "interrupt_handler.s" -.byte 0,0,0,0,0,0,0,0 +;.byte 0,0,0,0,0,0,0,0 +;.byte 0,0,0,0,0,0,0,0 ; irq handler fix = +8 in size + .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0