diff --git a/C64/lib/C64SYS.ASM b/C64/lib/C64SYS.ASM index 9b3f0b6..47d3f96 100644 --- a/C64/lib/C64SYS.ASM +++ b/C64/lib/C64SYS.ASM @@ -45,3 +45,5 @@ vic_spr4_color = $D02B vic_spr5_color = $D02C vic_spr6_color = $D02D vic_spr7_color = $D02E + +RANDOM = $D41B diff --git a/C64/lib/C64_ATARISYS.ASM b/C64/lib/C64_ATARISYS.ASM index 26a00e5..cd96f29 100644 --- a/C64/lib/C64_ATARISYS.ASM +++ b/C64/lib/C64_ATARISYS.ASM @@ -376,7 +376,7 @@ POT7 EQU POKEY+$00 ALLPOT EQU POKEY+$00 KBCODE EQU POKEY+$00 ; !!!!! -RANDOM EQU POKEY+$00 +;RANDOM EQU POKEY+$00 ; POTGO EQU POKEY+$00 SERIN EQU POKEY+$00 diff --git a/C64/lib/MACRO.ASM b/C64/lib/MACRO.ASM index 9ff9cae..c077046 100644 --- a/C64/lib/MACRO.ASM +++ b/C64/lib/MACRO.ASM @@ -210,4 +210,15 @@ upstartEnd eif sta $d018 -.end \ No newline at end of file +.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 \ No newline at end of file diff --git a/scorchC64.asm b/scorchC64.asm index d83175d..91e2522 100644 --- a/scorchC64.asm +++ b/scorchC64.asm @@ -204,18 +204,8 @@ FirstSTART jsr GenerateLineTable - ; RMT INIT - lda #$f0 ;initial value - 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 + ; Random INIT + InitializeSIDrnd ;-------------------------------------------------- ; Main program of the game @@ -408,29 +398,6 @@ noingame mva #0 RMT_blocked rts .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' ;---------------------------------------------- @@ -451,9 +418,6 @@ TankFont ;---------------------------------------------- font4x4 ins 'artwork/font4x4s.bmp',+62 -;---------------------------------------------- -;RMT PLAYER loading shenaningans - icl 'artwork/sfx/rmtplayr_modified.asm' ;------------------------------------------------- .proc CheckTankCheat ldy #$07 @@ -515,33 +479,7 @@ EndofBFGDLI SetDLI DLIinterruptGraph ; blinking off rts .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' ;---------------------------------------------- - - .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 + \ No newline at end of file