mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
First C64 compilation
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
.IF *>0 ;this is a trick that prevents compiling this file alone
|
.IF *>0 ;this is a trick that prevents compiling this file alone
|
||||||
|
|
||||||
|
DLIinterruptGraph = 0
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.macro SetDLI
|
.macro SetDLI
|
||||||
; SetDLI #WORD
|
; SetDLI #WORD
|
||||||
|
|||||||
+60
-1
@@ -210,7 +210,7 @@ upstartEnd
|
|||||||
eif
|
eif
|
||||||
|
|
||||||
sta $d018
|
sta $d018
|
||||||
.end
|
.endm
|
||||||
|
|
||||||
//
|
//
|
||||||
// Once this is done, random values appear in location $D41B (RANDOM)
|
// Once this is done, random values appear in location $D41B (RANDOM)
|
||||||
@@ -221,4 +221,63 @@ upstartEnd
|
|||||||
STA $D40F ; voice 3 frequency high byte
|
STA $D40F ; voice 3 frequency high byte
|
||||||
LDA #$80 ; noise waveform, gate bit off
|
LDA #$80 ; noise waveform, gate bit off
|
||||||
STA $D412 ; voice 3 control register
|
STA $D412 ; voice 3 control register
|
||||||
|
.endm
|
||||||
|
|
||||||
|
;-------------------------------------
|
||||||
|
.MACRO rolw
|
||||||
|
ROL :1
|
||||||
|
ROL :1+1
|
||||||
|
.ENDM
|
||||||
|
;-------------------------------------
|
||||||
|
.MACRO aslw
|
||||||
|
ASL :1
|
||||||
|
ROL :1+1
|
||||||
|
.ENDM
|
||||||
|
;-------------------------------------
|
||||||
|
.MACRO rorw
|
||||||
|
ROR :1+1
|
||||||
|
ROR :1
|
||||||
|
.ENDM
|
||||||
|
;-------------------------------------
|
||||||
|
.MACRO lsrw
|
||||||
|
LSR :1+1
|
||||||
|
ROR :1
|
||||||
|
.ENDM
|
||||||
|
;-------------------------------------
|
||||||
|
.macro randomize
|
||||||
|
;usage: randomize floor ceiling
|
||||||
|
;returns (in A) a random .byte between "floor" and "ceiling"
|
||||||
|
.if :2 < :1
|
||||||
|
.error "floor higher than ceiling"
|
||||||
|
.endif
|
||||||
|
?rand
|
||||||
|
lda random
|
||||||
|
cmp #:1 ;floor
|
||||||
|
bcc ?rand
|
||||||
|
cmp #:2+1 ;ceiling
|
||||||
|
bcs ?rand
|
||||||
|
.endm
|
||||||
|
;-------------------------------------
|
||||||
|
.macro phx
|
||||||
|
txa
|
||||||
|
pha
|
||||||
|
.endm
|
||||||
|
;-------------------------------------
|
||||||
|
.macro phy
|
||||||
|
tya
|
||||||
|
pha
|
||||||
|
.endm
|
||||||
|
;-------------------------------------
|
||||||
|
.macro plx
|
||||||
|
pla
|
||||||
|
tax
|
||||||
|
.endm
|
||||||
|
;-------------------------------------
|
||||||
|
.macro ply
|
||||||
|
pla
|
||||||
|
tay
|
||||||
|
.endm
|
||||||
|
;-------------------------------------
|
||||||
|
.macro wait
|
||||||
|
nop
|
||||||
.endm
|
.endm
|
||||||
+16
-1254
File diff suppressed because it is too large
Load Diff
+13
-14
@@ -6,7 +6,7 @@
|
|||||||
;Miami & Warsaw 2022, 2023
|
;Miami & Warsaw 2022, 2023
|
||||||
|
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
.def TARGET = C64 ; :)
|
.def TARGET = 64 ; :)
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
.def XCORRECTION_FOR_PM = 0
|
.def XCORRECTION_FOR_PM = 0
|
||||||
; if 1 - active x position of tanks correction fo PMG
|
; if 1 - active x position of tanks correction fo PMG
|
||||||
@@ -174,7 +174,13 @@ WeaponFont
|
|||||||
; Game Code
|
; Game Code
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
FirstSTART
|
FirstSTART
|
||||||
|
DL = 0
|
||||||
|
StatusBufferROM = 0
|
||||||
|
;StatusBufferCopy = 0
|
||||||
|
StatusBufferCopyEnd = 0
|
||||||
|
TRACKS = 4
|
||||||
|
DisplayCopyPurchaseEnd = 0
|
||||||
|
DisplayCopyPurchaseStart = 0
|
||||||
displayC64 = $2000 ; graphics screen memory start
|
displayC64 = $2000 ; graphics screen memory start
|
||||||
SwitchVICBank(0)
|
SwitchVICBank(0)
|
||||||
SetScreenMemory(displayC64)
|
SetScreenMemory(displayC64)
|
||||||
@@ -392,16 +398,9 @@ MakeDarkScreen
|
|||||||
.proc RmtSongSelect
|
.proc RmtSongSelect
|
||||||
; starting song line 0-255 to A reg
|
; starting song line 0-255 to A reg
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
cmp #song_ingame
|
rts
|
||||||
bne noingame ; noMusic blocks only ingame song
|
.endp
|
||||||
bit noMusic
|
.proc CopyFromRom
|
||||||
spl:lda #song_silencio
|
|
||||||
noingame
|
|
||||||
mvx #$ff RMT_blocked
|
|
||||||
ldx #<MODUL ;low byte of RMT module to X reg
|
|
||||||
ldy #>MODUL ;hi byte of RMT module to Y reg
|
|
||||||
jsr RASTERMUSICTRACKER ;Init
|
|
||||||
mva #0 RMT_blocked
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -479,10 +478,10 @@ EndofBFGDLI
|
|||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc BFGblink
|
.proc BFGblink
|
||||||
SetDLI DLIinterruptBFG ; blinking on
|
; SetDLI DLIinterruptBFG ; blinking on
|
||||||
ldy #50
|
ldy #50
|
||||||
jsr PauseYFrames
|
jsr PauseYFrames
|
||||||
SetDLI DLIinterruptGraph ; blinking off
|
; SetDLI DLIinterruptGraph ; blinking off
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user