WIP: moving displays part 3

This commit is contained in:
2022-09-17 14:36:36 -04:00
parent 2addb0905e
commit 415bfbba2b
4 changed files with 41 additions and 44 deletions
+39 -19
View File
@@ -140,23 +140,29 @@ WeaponFont
;----------------------------------------------- ;-----------------------------------------------
;Screen displays go here to avoid crossing 4kb barrier ;Screen displays go here to avoid crossing 4kb barrier
;----------------------------------------------- ;-----------------------------------------------
DisplayCopyRom = * DisplayCopyRom = *
org display, DisplayCopyRom org display, DisplayCopyRom
DisplayCopyStart DisplayCopyStart
icl 'display_main_menu.asm' icl 'display_main_menu.asm'
DisplayCopyEnd DisplayCopyEnd
org DisplayCopyRom + (DisplayCopyEnd - DisplayCopyStart +1) org DisplayCopyRom + (DisplayCopyEnd - DisplayCopyStart)
DisplayCopyPurchaseDlROM = * DisplayCopyPurchaseDlROM = *
org DisplayCopyPurchase, DisplayCopyPurchaseDlROM org DisplayCopyPurchase, DisplayCopyPurchaseDlROM
DisplayCopyPurchaseStart DisplayCopyPurchaseStart
icl 'display_purchasedl.asm' icl 'display_purchasedl.asm'
DisplayCopyPurchaseEnd DisplayCopyPurchaseEnd
org DisplayCopyPurchaseDlROM + (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1) org DisplayCopyPurchaseDlROM + (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart)
StatusBufferROM = *
org StatusBufferCopy, StatusBufferROM
StatusBufferCopyStart
icl 'display_status.asm' icl 'display_status.asm'
StatusBufferCopyEnd
org StatusBufferROM + (StatusBufferCopyEnd - StatusBufferCopyStart)
icl 'display_static.asm' icl 'display_static.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -195,21 +201,6 @@ FirstSTART
cpy #screenheight+1 cpy #screenheight+1
bne @- bne @-
; .if target = 5200
; ; move RMT player from ROM to RAM (it modifies itself)
; mwa #PlayerBlob temp
; mwa #PlayerBlobDest temp2
;@
; ldy #0
; lda (temp),y
; sta (temp2),y
; inw temp
; inw temp2
; cpw temp #PlayerBlobEnd
; bne @-
; .endif
; RMT INIT ; RMT INIT
lda #$f0 ;initial value lda #$f0 ;initial value
sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240) sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240)
@@ -455,6 +446,12 @@ SettingEnergies
jsr calculatemountains ;let mountains be easy for the eye jsr calculatemountains ;let mountains be easy for the eye
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height ;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
mwa #StatusBufferROM temp
mwa #StatusBufferCopy temp2
mwa #StatusBufferCopyEnd+1 modify
jsr CopyFromROM
jsr SetMainScreen jsr SetMainScreen
jsr ColorsOfSprites jsr ColorsOfSprites
@@ -1646,6 +1643,29 @@ 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
;;-------------------------------------------------- ;;--------------------------------------------------
;.proc Randomizer ;.proc Randomizer
;;-------------------------------------------------- ;;--------------------------------------------------
BIN
View File
Binary file not shown.
-25
View File
@@ -306,13 +306,11 @@ GoToActivation
lda #@dmactl(narrow|dma) ; narrow screen width, DL on, P/M off lda #@dmactl(narrow|dma) ; narrow screen width, DL on, P/M off
sta dmactls sta dmactls
.IF target != 5200
lda #song_supermarket lda #song_supermarket
bit IsInventory bit IsInventory
bpl @+ bpl @+
lda #song_inventory lda #song_inventory
@ jsr RmtSongSelect @ jsr RmtSongSelect
.ENDIF
ldx tankNr ldx tankNr
lda TankStatusColoursTable,x lda TankStatusColoursTable,x
@@ -2519,28 +2517,5 @@ NextChar02
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
.endif .endif
+2
View File
@@ -49,6 +49,8 @@ linetableH ; = PMGraph + $0300 - (screenHeight+1)
.ds (screenHeight+1) .ds (screenHeight+1)
DisplayCopyPurchase DisplayCopyPurchase
.ds (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1) .ds (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1)
StatusBufferCopy
.ds screenBytes*3
;===================================================== ;=====================================================
variablesStart ; zeroing starts here variablesStart ; zeroing starts here
;===================================================== ;=====================================================