diff --git a/display.asm b/display_main_menu.asm similarity index 64% rename from display.asm rename to display_main_menu.asm index ae7ca38..8a7e121 100644 --- a/display.asm +++ b/display_main_menu.asm @@ -38,47 +38,6 @@ NamesOfLevels dta d" HUMAN Moron Shooter " dta d" Poolshark Tosser Chooser " dta d" Spoiler Cyborg Unknown " -;--------------------------------------------------- -textbuffer2 - dta d"Player: Cash: 0" ; ZERO TO MAKE YOU RICHER ON THE SCREEN - -; DLs fragments (modified by game code) -; all Purchase DL :) -PurchaseDL - .byte $70 - .byte $47 -DLPurTitleAddr - .word PurchaseTitle - .byte $50 - .byte $42+$80 - .word textbuffer2 - .byte $60,$42 -MoreUpdl - .word EmptyLine - .byte 0,$42 -WeaponsListDL - .word ListOfWeapons - :15 .byte 0,2 - .byte 0, $42 -MoreDownDL - .word EmptyLine - .byte $40,$42 - .word WeaponsDescription - .byte $0,$42 -PurActDescAddr - .word PurchaseDescription - .byte $41 - .word PurchaseDL -;------------------------ -DLCreditsFragm - .byte $60+$80 - .byte $42+$20 ; VSCRL -DLCreditsAddr - .word Credits - :6 .byte $02+$20 - .byte $02 - .byte $41 - .word GameOverDL ;------------------------ ; end of "variables" (RAM) ;------------------------ diff --git a/display_purchasedl.asm b/display_purchasedl.asm new file mode 100644 index 0000000..eef87ab --- /dev/null +++ b/display_purchasedl.asm @@ -0,0 +1,45 @@ +; @com.wudsn.ide.asm.mainsourcefile=scorch.asm + +.IF *>0 ;this is a trick that prevents compiling this file alone +;--------------------------------------------------- +purchaseTextBuffer + dta d"Player: Cash: 0" ; ZERO TO MAKE YOU RICHER ON THE SCREEN + +; DLs fragments (modified by game code) +; all Purchase DL :) +PurchaseDL + .byte $70 + .byte $47 +DLPurTitleAddr + .word PurchaseTitle + .byte $50 + .byte $42+$80 + .word purchaseTextBuffer + .byte $60,$42 +MoreUpdl + .word EmptyLine + .byte 0,$42 +WeaponsListDL + .word ListOfWeapons + :15 .byte 0,2 + .byte 0, $42 +MoreDownDL + .word EmptyLine + .byte $40,$42 + .word WeaponsDescription + .byte $0,$42 +PurActDescAddr + .word PurchaseDescription + .byte $41 + .word PurchaseDL +;------------------------ +DLCreditsFragm + .byte $60+$80 + .byte $42+$20 ; VSCRL +DLCreditsAddr + .word Credits + :6 .byte $02+$20 + .byte $02 + .byte $41 + .word GameOverDL +.endif \ No newline at end of file diff --git a/scorch.asm b/scorch.asm index 1579ecd..21ea1f4 100644 --- a/scorch.asm +++ b/scorch.asm @@ -140,7 +140,22 @@ WeaponFont ;----------------------------------------------- ;Screen displays go here to avoid crossing 4kb barrier ;----------------------------------------------- - icl 'display.asm' + DisplayCopyRom = * + org display, DisplayCopyRom +DisplayCopyStart + icl 'display_main_menu.asm' +DisplayCopyEnd + org DisplayCopyRom + (DisplayCopyEnd - DisplayCopyStart +1) + + DisplayCopyPurchaseDlROM = * + org DisplayCopyPurchase, DisplayCopyPurchaseDlROM +DisplayCopyPurchaseStart + icl 'display_purchasedl.asm' +DisplayCopyPurchaseEnd + org DisplayCopyPurchaseDlROM + (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1) + + + icl 'display_status.asm' icl 'display_static.asm' ;---------------------------------------------- diff --git a/scorch.xex b/scorch.xex index 65f90b7..0825c61 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index b8748e7..462199a 100644 --- a/textproc.asm +++ b/textproc.asm @@ -18,11 +18,13 @@ jsr clearscreen ;let the screen be clean + mwa #DisplayCopyRom temp + mwa #display temp2 + mwa #DisplayCopyEnd+1 modify + jsr CopyFromROM + mwa #OptionsDL dlptrs -; lda dmactls -; and #$fc -; ora #$02 ; normal screen width -; lda #%00110010 ; normal screen width, DL on, P/M off + lda #%00111110 ; normal screen width, DL on, P/M on sta dmactls jsr SetPMWidth @@ -42,7 +44,7 @@ sta mountainDeltaL mva #6 NumberOfPlayers jsr PMoutofScreen ;let P/M disappear - jsr clearscreen ;let the screen be clean + ;jsr clearscreen ;let the screen be clean (clean-ish already) jsr ClearPMmemory jsr placetanks ;let the tanks be evenly placed jsr calculatemountains ;let mountains be easy for the eye @@ -284,6 +286,12 @@ AfterManualPurchase ; Rest of the data is taken from appropriate tables ; and during the purchase these tables are modified. + mwa #DisplayCopyPurchaseDlROM temp + mwa #DisplayCopyPurchase temp2 + mwa #DisplayCopyPurchaseEnd+1 modify + jsr CopyFromROM + + mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons ; we are clearing list of the weapons @@ -319,7 +327,7 @@ GoToActivation tax NextChar03 lda tanksnames,x - sta textbuffer2+8,y + sta purchaseTextBuffer+8,y inx iny cpy #$08 @@ -337,7 +345,7 @@ AfterPurchase sta decimal lda moneyH,x sta decimal+1 - mwa #textbuffer2+26 displayposition + mwa #purchaseTextBuffer+26 displayposition jsr displaydec5 ; in xbyte there is the address of the line that @@ -2258,9 +2266,9 @@ EndOfCredits ;displaying symbol of the weapon ;--------------------- ;display name and symbol of the weapon - ;textbuffer+18 - symbol (1 char) - ;textbuffer+20 - quantity left - ;textbuffer+23 - name + ;statusBuffer+18 - symbol (1 char) + ;statusBuffer+20 - quantity left + ;statusBuffer+23 - name ldx TankNr ldy ActiveWeapon,x lda WeaponSymbols,y @@ -2513,4 +2521,26 @@ NextChar02 .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 \ No newline at end of file diff --git a/variables.asm b/variables.asm index 14cb87e..3cae787 100644 --- a/variables.asm +++ b/variables.asm @@ -47,6 +47,8 @@ linetableL ; = PMGraph + $0300 - (screenHeight+1)*2 .ds (screenHeight+1) linetableH ; = PMGraph + $0300 - (screenHeight+1) .ds (screenHeight+1) +DisplayCopyPurchase + .ds (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1) ;===================================================== variablesStart ; zeroing starts here ;=====================================================