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
;-----------------------------------------------
DisplayCopyRom = *
org display, DisplayCopyRom
DisplayCopyStart
icl 'display_main_menu.asm'
DisplayCopyEnd
org DisplayCopyRom + (DisplayCopyEnd - DisplayCopyStart +1)
org DisplayCopyRom + (DisplayCopyEnd - DisplayCopyStart)
DisplayCopyPurchaseDlROM = *
org DisplayCopyPurchase, DisplayCopyPurchaseDlROM
DisplayCopyPurchaseStart
icl 'display_purchasedl.asm'
DisplayCopyPurchaseEnd
org DisplayCopyPurchaseDlROM + (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1)
org DisplayCopyPurchaseDlROM + (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart)
StatusBufferROM = *
org StatusBufferCopy, StatusBufferROM
StatusBufferCopyStart
icl 'display_status.asm'
StatusBufferCopyEnd
org StatusBufferROM + (StatusBufferCopyEnd - StatusBufferCopyStart)
icl 'display_static.asm'
;----------------------------------------------
@@ -195,21 +201,6 @@ FirstSTART
cpy #screenheight+1
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
lda #$f0 ;initial value
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 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 ColorsOfSprites
@@ -1646,6 +1643,29 @@ 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
;;--------------------------------------------------
;.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
sta dmactls
.IF target != 5200
lda #song_supermarket
bit IsInventory
bpl @+
lda #song_inventory
@ jsr RmtSongSelect
.ENDIF
ldx tankNr
lda TankStatusColoursTable,x
@@ -2519,28 +2517,5 @@ NextChar02
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
.endif
+2
View File
@@ -49,6 +49,8 @@ linetableH ; = PMGraph + $0300 - (screenHeight+1)
.ds (screenHeight+1)
DisplayCopyPurchase
.ds (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1)
StatusBufferCopy
.ds screenBytes*3
;=====================================================
variablesStart ; zeroing starts here
;=====================================================