mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
C64 Random
This commit is contained in:
@@ -45,3 +45,5 @@ vic_spr4_color = $D02B
|
|||||||
vic_spr5_color = $D02C
|
vic_spr5_color = $D02C
|
||||||
vic_spr6_color = $D02D
|
vic_spr6_color = $D02D
|
||||||
vic_spr7_color = $D02E
|
vic_spr7_color = $D02E
|
||||||
|
|
||||||
|
RANDOM = $D41B
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ POT7 EQU POKEY+$00
|
|||||||
ALLPOT EQU POKEY+$00
|
ALLPOT EQU POKEY+$00
|
||||||
KBCODE EQU POKEY+$00
|
KBCODE EQU POKEY+$00
|
||||||
; !!!!!
|
; !!!!!
|
||||||
RANDOM EQU POKEY+$00
|
;RANDOM EQU POKEY+$00
|
||||||
;
|
;
|
||||||
POTGO EQU POKEY+$00
|
POTGO EQU POKEY+$00
|
||||||
SERIN EQU POKEY+$00
|
SERIN EQU POKEY+$00
|
||||||
|
|||||||
+12
-1
@@ -210,4 +210,15 @@ upstartEnd
|
|||||||
eif
|
eif
|
||||||
|
|
||||||
sta $d018
|
sta $d018
|
||||||
.end
|
.end
|
||||||
|
|
||||||
|
//
|
||||||
|
// Once this is done, random values appear in location $D41B (RANDOM)
|
||||||
|
//
|
||||||
|
.macro InitializeSIDrnd
|
||||||
|
LDA #$FF ; maximum frequency value
|
||||||
|
STA $D40E ; voice 3 frequency low byte
|
||||||
|
STA $D40F ; voice 3 frequency high byte
|
||||||
|
LDA #$80 ; noise waveform, gate bit off
|
||||||
|
STA $D412 ; voice 3 control register
|
||||||
|
.endm
|
||||||
+3
-65
@@ -204,18 +204,8 @@ FirstSTART
|
|||||||
jsr GenerateLineTable
|
jsr GenerateLineTable
|
||||||
|
|
||||||
|
|
||||||
; RMT INIT
|
; Random INIT
|
||||||
lda #$f0 ;initial value
|
InitializeSIDrnd
|
||||||
sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240)
|
|
||||||
|
|
||||||
lda #$ff ;initial value
|
|
||||||
sta sfx_effect
|
|
||||||
|
|
||||||
RMTSong 0
|
|
||||||
|
|
||||||
VMAIN VBLinterrupt,7 ;jsr SetVBL
|
|
||||||
|
|
||||||
mva #2 chactl ; necessary for 5200
|
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; Main program of the game
|
; Main program of the game
|
||||||
@@ -408,29 +398,6 @@ noingame
|
|||||||
mva #0 RMT_blocked
|
mva #0 RMT_blocked
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;-------------------------------------------------
|
|
||||||
.proc CopyFromROM
|
|
||||||
;-------------------------------------------------
|
|
||||||
;copy from CART to RAM
|
|
||||||
; trashes: Y
|
|
||||||
; temp: source
|
|
||||||
; temp2: destination
|
|
||||||
; modify: destination-end
|
|
||||||
;usage:
|
|
||||||
; mwa #DisplayCopyRom temp
|
|
||||||
; mwa #display temp2
|
|
||||||
; mwa #DisplayCopyEnd+1 modify
|
|
||||||
; jsr CopyFromROM
|
|
||||||
|
|
||||||
ldy #0
|
|
||||||
@ lda (temp),y
|
|
||||||
sta (temp2),y
|
|
||||||
inw temp
|
|
||||||
inw temp2
|
|
||||||
cpw temp2 modify
|
|
||||||
bne @-
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
icl 'C64/interrupts.asm'
|
icl 'C64/interrupts.asm'
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
@@ -451,9 +418,6 @@ TankFont
|
|||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
font4x4
|
font4x4
|
||||||
ins 'artwork/font4x4s.bmp',+62
|
ins 'artwork/font4x4s.bmp',+62
|
||||||
;----------------------------------------------
|
|
||||||
;RMT PLAYER loading shenaningans
|
|
||||||
icl 'artwork/sfx/rmtplayr_modified.asm'
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
.proc CheckTankCheat
|
.proc CheckTankCheat
|
||||||
ldy #$07
|
ldy #$07
|
||||||
@@ -515,33 +479,7 @@ EndofBFGDLI
|
|||||||
SetDLI DLIinterruptGraph ; blinking off
|
SetDLI DLIinterruptGraph ; blinking off
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
|
||||||
.IF * > MODUL-1
|
|
||||||
.ECHO *
|
|
||||||
.ERROR 'Code and data too long'
|
|
||||||
.ENDIF
|
|
||||||
.ECHO "Bytes left: ",$b000-*
|
|
||||||
|
|
||||||
|
|
||||||
org $b000 ;address of RMT module
|
|
||||||
MODUL
|
|
||||||
;RMT module is standard Atari binary file already
|
|
||||||
ins "artwork/sfx/scorch_str9-NTSC.rmt",+6 ;include music RMT module
|
|
||||||
MODULEND
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
icl 'constants_top.asm'
|
icl 'constants_top.asm'
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
|
|
||||||
.ECHO "Bytes on top left: ",$bfe8-* ;ROM_SETTINGS-*
|
|
||||||
.IF target = 5200
|
|
||||||
.IF * > ROM_SETTINGS-1
|
|
||||||
.ERROR 'Code and RMT song too long to fit in 5200'
|
|
||||||
.ENDIF
|
|
||||||
org ROM_SETTINGS ; 5200 ROM settings address $bfe8
|
|
||||||
; "01234567890123456789"
|
|
||||||
.byte " scorch supersystem " ;20 characters title
|
|
||||||
.byte " ", $ff ;$BFFD == $ff means diagnostic cart, no splash screen
|
|
||||||
.word FirstSTART
|
|
||||||
.ELSE
|
|
||||||
run FirstSTART
|
|
||||||
.ENDIF
|
|
||||||
Reference in New Issue
Block a user