diff --git a/C64/gr_basics.asm b/C64/gr_basics.asm index f359e6c..3cbf842 100644 --- a/C64/gr_basics.asm +++ b/C64/gr_basics.asm @@ -193,12 +193,12 @@ ClearPlot ;-------------------------------------------------- .proc ClearScreen ;-------------------------------------------------- - mwa #display temp + mwa #displayC64 temp ldy #0 @ lda #$ff sta (temp),y inw temp - cpw temp #display+screenheight*screenBytes+1 + cpw temp #displayC64+screenheight*screenBytes+1 bne @- rts .endp @@ -223,7 +223,7 @@ ClearPlot ;-------------------------------------------------- .proc SetMainScreen SwitchVICBank(0) - SetScreenMemory(displayC64) + SetScreenMemory($2000) SetHiresBitmapMode ; Hires mode on rts .endp diff --git a/C64/lib/C64_ATARISYS.ASM b/C64/lib/C64_ATARISYS.ASM index cd96f29..656ae8a 100644 --- a/C64/lib/C64_ATARISYS.ASM +++ b/C64/lib/C64_ATARISYS.ASM @@ -3,7 +3,7 @@ ;* SYSTEM EQUATES * ;**************************************************************************** -FAKEADDR EQU $0100 +FAKEADDR EQU $0002 ; diff --git a/C64/lib/MACRO.ASM b/C64/lib/MACRO.ASM index 470397a..3761e4e 100644 --- a/C64/lib/MACRO.ASM +++ b/C64/lib/MACRO.ASM @@ -280,4 +280,8 @@ upstartEnd ;------------------------------------- .macro wait nop +.endm +;------------------------------------- +.macro halt +?s jmp ?s .endm \ No newline at end of file diff --git a/grafproc.asm b/grafproc.asm index 2bd2fac..59e0da5 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -1630,9 +1630,6 @@ NotHigher rts .endp -;--------------------------------------------------- - icl 'Atari/gr_basics.asm' -;--------------------------------------------------- ;-------------------------------------------------- .proc TypeChar diff --git a/scorch.asm b/scorch.asm index a139adc..9db07ab 100644 --- a/scorch.asm +++ b/scorch.asm @@ -603,6 +603,7 @@ noingame icl 'Atari/textproc.asm' ;---------------------------------------------- icl 'grafproc.asm' + icl 'Atari/gr_basics.asm' ;---------------------------------------------- icl 'weapons.asm' ;---------------------------------------------- diff --git a/scorch.xex b/scorch.xex index c4a31c8..dfb3126 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/scorchC64.asm b/scorchC64.asm index 59af7c8..6e3b3ab 100644 --- a/scorchC64.asm +++ b/scorchC64.asm @@ -28,8 +28,7 @@ .endm .macro RMTSong - lda #:1 - rts ; do nothing in C64 + lda #:1 ; do nothing in C64 .endm ;--------------------------------------------------- @@ -160,11 +159,10 @@ FirstZpageVariable = $57 ;----------------------------------------------- ; variable declarations in RAM (no code) ;----------------------------------------------- - ORG PMGraph + $0300 - (variablesEnd - OneTimeZeroVariables + 1) - icl 'variables.asm' ; Game loading address ORG $4000 + icl 'variables.asm' WeaponFont ins 'artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt' @@ -182,9 +180,28 @@ FirstSTART DisplayCopyPurchaseEnd = 0 DisplayCopyPurchaseStart = 0 displayC64 = $2000 ; graphics screen memory start + +; SEI ; disable IRQ + LDA #$36 + STA $0001 ; Turn Off BASIC ROM +/* LDA #NMI ; to our routine + STA $0319 ; + LDA #$00 ; stop Timer A + STA $DD0E ; + STA $DD04 ; set Timer A to 0, after starting + STA $DD05 ; NMI will occur immediately + LDA #$81 ; + STA $DD0D ; set Timer A as source for NMI + LDA #$01 ; + STA $DD0E ; start Timer A -> NMI + */ + ; from here on NMI is disabled + jsr MakeDarkScreen - + ; one time zero variables in RAM (non zero page) lda #0 ldy #OneTimeZeroVariablesCount-1 @@ -216,8 +233,6 @@ FirstSTART ; Random INIT InitializeSIDrnd - - ;-------------------------------------------------- ; Main program of the game icl 'game.asm' @@ -231,65 +246,9 @@ FirstSTART ; result: A=keycode ;-------------------------------------------------- jsr WaitForKeyRelease -@ - .IF TARGET = 800 - lda SKSTAT - cmp #$ff - beq checkJoyGetKey ; key not pressed, check Joy - cmp #$f7 ; SHIFT - beq checkJoyGetKey - .ELSE - lda SkStatSimulator - and #%11111110 - bne checkJoyGetKey ; key not pressed, check Joy - .ENDIF - lda kbcode - cmp #@kbcode._none - beq checkJoyGetKey - and #$3f ;CTRL and SHIFT ellimination - cmp #@kbcode._esc ; 28 ; ESC - bne getkeyend - mvy #$80 escFlag - bne getkeyend - -checkJoyGetKey - ;------------JOY------------- - ;happy happy joy joy - ;check for joystick now - lda STICK0 - and #$0f - cmp #$0f - beq notpressedJoyGetKey - tay - lda joyToKeyTable,y - bne getkeyend - -notpressedJoyGetKey - ;fire - lda STRIG0 - beq JoyButton - .IF TARGET = 800 ; Select and Option key only on A800 - bne checkSelectKey -checkSelectKey - lda CONSOL - and #%00000010 ; Select - beq SelectPressed - lda CONSOL - and #%00000100 ; Option - .ENDIF - bne @- -OptionPressed - lda #@kbcode._atari ; Option key - bne getkeyend -SelectPressed - lda #@kbcode._tab ; Select key - bne getkeyend -JoyButton - lda #@kbcode._ret ;Return key -getkeyend - ldy #0 - sty ATRACT ; reset atract mode - mvy #sfx_keyclick sfx_effect + lda #0 + sta escFlag + lda #$ff rts .endp @@ -344,16 +303,11 @@ peopleAreHere ;-------------------------------------------------- MakeDarkScreen ;-------------------------------------------------- - jsr PMoutofScreen ; hide P/M - mva #0 dmactls ; dark screen +; mva #0 dmactls ; dark screen ; and wait one frame :) ;-------------------------------------------------- .proc WaitOneFrame ;-------------------------------------------------- - lda CONSOL - and #%00000101 ; Start + Option - sne:mva #$40 escFlag - and #%00000001 ; START KEY seq:wait ; or waitRTC ? rts .endp @@ -387,6 +341,7 @@ MakeDarkScreen icl 'C64/textproc.asm' ;---------------------------------------------- icl 'grafproc.asm' + icl 'C64/gr_basics.asm' ;---------------------------------------------- icl 'weapons.asm' ;---------------------------------------------- @@ -463,4 +418,8 @@ EndofBFGDLI ;---------------------------------------------- icl 'constants_top.asm' ;---------------------------------------------- +NMI + INC $D020 ; change border colour, indication for a NMI + RTI ; exit interrupt + ; (not acknowledged!) \ No newline at end of file diff --git a/scorchC64.prg b/scorchC64.prg index b647c2f..d49a934 100644 Binary files a/scorchC64.prg and b/scorchC64.prg differ