diff --git a/display.asm b/display.asm index bd6dfc2..7d4d0ab 100644 --- a/display.asm +++ b/display.asm @@ -20,10 +20,11 @@ OptionsHere OptionsScreenEnd ;----------------------------------------------- ListOfWeapons - :36 dta d" " + ; 0123456789012345678901234567890123456789 + :36 dta d" " ListOfWeapons1End ListOfDefensiveWeapons - :16 dta d" " + :16 dta d" " ListOfDefensiveWeaponsEnd ;constant useful when clearing NameScreen dta d" Enter names of players " @@ -49,7 +50,7 @@ textbuffer dta d"Energy: Angle: Force: " dta d"Round: Wind: " textbuffer2 - dta d"Player: Cash: 0 " ; ZERO TO MAKE YOU RICHER ON THE SCREEN + dta d"Player: Cash: 0" ; ZERO TO MAKE YOU RICHER ON THE SCREEN ; DLs fragments (modified by game code) ; all Purchase DL :) @@ -115,21 +116,21 @@ MoreDown dta 93,93,93 dta d" " WeaponsDescription - dta d" " + ; 0123456789012345678901234567890123456789 dta d"Tab"* - dta d" - Defensive/Offensive weapon " + dta d ": Defensive/Offensive weapon " PurchaseDescription - dta d" " + ; 0123456789012345678901234567890123456789 dta d"Space"* - dta d" - Purchase " - dta d"Return"* - dta d" - Finish " + dta d": Purchase " + dta d"Return"* + dta d": Finish" ActivateDescription - dta d" " + ; 0123456789012345678901234567890123456789 dta d"Space"* - dta d" - Activate " - dta d"Return"* - dta d" - Finish " + dta d": Activate " + dta d"Return"* + dta d": Finish" EmptyLine dta d" " ;--------------------------------------------------- @@ -138,9 +139,9 @@ OptionsTitle DifficultyTitle dta d" difficulty "* PurchaseTitle - dta d" weapons purchase " + dta d"purchase weapons" InventoryTitle - dta d" weapons activate "* + dta d"activate weapons"* GameOverTitle dta d" game over "* GameOverTitle2 diff --git a/scorch.asm b/scorch.asm index b2ecc90..d59e44a 100644 --- a/scorch.asm +++ b/scorch.asm @@ -40,7 +40,6 @@ .endm icl 'definitions.asm' -; icl 'artwork/sfx/rmt_feat.asm' .zpvar xdraw .word = $64 ;variable X for plot @@ -141,29 +140,13 @@ .zpvar DifficultyLevel .byte .zpvar goleft .byte .zpvar OffsetDL1 .byte - - - - displayposition = modify + .zpvar L1 .byte - - ;* RMT ZeroPage addresses + ;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65 .zpvar RMT_Zero_Page_V .byte -; .zpvar p_tis .word -; .zpvar p_trackslbstable .word -; .zpvar p_trackshbstable .word -; .zpvar p_song .word -; .zpvar ns .word -; .zpvar nr .word -; .zpvar nt .word -; .zpvar reg1 .byte -; .zpvar reg2 .byte -; .zpvar reg3 .byte -; .zpvar tmp .byte -; IFT FEAT_COMMAND2 -; .zpvar frqaddcmd2 .byte -; EIF -; p_instrstable = p_tis + + displayposition = modify + ;------------------------------- @@ -172,6 +155,8 @@ ;splash screen and musix icl 'artwork/Scorch50.asm' + + ;Game loading address ORG $3000 WeaponFont @@ -1057,7 +1042,8 @@ setBmissile deletePtr = temp ; clean variables - lda #0 + lda #0 + sta escFlag tay mwa #variablesStart deletePtr @ tya @@ -1093,9 +1079,6 @@ SetunPlots ;setting up P/M graphics lda #>pmgraph sta pmbase -; lda dmactls -; ora #$38 ; Players and Missiles single lined -; sta dmactls lda #$03 ; P/M on sta GRACTL jsr SetPMWidth @@ -1114,18 +1097,6 @@ MakeTanksVisible mva #1 CurrentRoundNr ;we start from round 1 mva #6 NTSCcounter -; ; RMT INIT -; lda #$f0 ;initial value -; sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240) -; -; lda #$ff ;initial value -; sta sfx_effect -; -; lda #0 -; jsr RmtSongSelect -; -; VMAIN VBLinterrupt,7 ;jsr SetVBL - rts .endp ;-------------------------------------------------- diff --git a/scorch.xex b/scorch.xex index 0521340..7e2fcd9 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index caf52c8..8ccf2a9 100644 --- a/textproc.asm +++ b/textproc.asm @@ -278,10 +278,7 @@ AfterManualPurchase VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen jsr PMoutofScreen mwa #PurchaseDL dlptrs -; lda dmactls -; and #$fc -; ora #$02 ; normal screen width - lda #%00110010 ; normal screen width, DL on, P/M off + lda #@dmactl(narrow|dma) ; narro screen width, DL on, P/M off sta dmactls lda #song_supermarket @@ -328,7 +325,7 @@ AfterPurchase sta decimal lda moneyH,x sta decimal+1 - mwa #textbuffer2+28 displayposition + mwa #textbuffer2+26 displayposition jsr displaydec5 ; in xbyte there is the address of the line that @@ -373,34 +370,34 @@ CreateList ; first parentheses and other special chars ; (it's easier this way) - ldy #22 - lda #08 ; "(" - STA (XBYTE),y - ldy #32 - lda #09 ; ")" - sta (xbyte),y - ldy #25 + ;ldy #22 + ;lda #08 ; "(" + ;STA (XBYTE),y + ;ldy #32 + ;lda #09 ; ")" + ;sta (xbyte),y + ldy #24 lda #15 ; "/" sta (xbyte),y - ldy #31 + ldy #30 lda #16 ; "0" sta (xbyte),y ;now number of units (shells) to be purchased - adw xbyte #23 displayposition ; 23 chars from the beginning of the line + adw xbyte #22 displayposition ; 23 chars from the beginning of the line lda WeaponUnits,x sta decimal jsr displaybyte ldx temp ;getting back index of the weapon ; and now price of the weapon - adw xbyte #26 displayposition ; 26 chars from the beginning of the line + adw xbyte #25 displayposition ; 26 chars from the beginning of the line lda WeaponPriceL,x sta decimal lda WeaponPriceH,x sta decimal+1 jsr displaydec5 - ldy #26 ; overwrite first digit (allways space - no digit :) ) + ldy #25 ; overwrite first digit (allways space - no digit :) ) lda #04 ; "$" sta (xbyte),y @@ -422,11 +419,11 @@ itIsInventory jeq noWeapon ; clear price area - ldy #22 ; beginning of the price area + ldy #21 ; beginning of the price area lda #0 @ sta (XBYTE),y iny - cpy #32+1 ; end of price + cpy #32 ; end of price bne @- notInventory @@ -502,7 +499,7 @@ DefenceList inc HowManyOnTheListDef ; If everything is copied then next line NextLineOfTheList - adw xbyte #40 + adw xbyte #32 TooLittleCash NoWeapon @@ -531,27 +528,20 @@ WeHaveOffset ; now we have to erase empty position of both lists. - ; Multiply number on list 1 by 40 and set address + ; Multiply number on list 1 by 32 and set address ; of the first erased char. ; (multiplying taken from book of Ruszczyc 'Assembler 6502' lda HowManyOnTheListOff - sta xbyte+1 ; multiplier (temporarily here, it will be erased anyway) - lda #$00 ; higher byte of the Result - sta xbyte ; lower byte of the Result - ldx #$08 -Rotate04 - lsr xbyte+1 - bcc DoNotAddX01 - clc - adc #40 -DoNotAddX01 - ror - ror xbyte - dex - bne Rotate04 - sta xbyte+1 - + sta xbyte ; multiplier (temporarily here, it will be erased anyway) + lda #$00 ; + sta xbyte+1 ; higher byte of the Result + ldx #$05 ; 2^5 +@ asl xbyte + rol xbyte+1 + dex + bne @- + ; add to the address of the list clc lda xbyte @@ -579,21 +569,14 @@ DoNotIncHigher1 ; Multiply number on list 1 by 40 and set address ; of the first erased char. lda HowManyOnTheListDef - sta xbyte+1 ; multiplier - lda #$00 ; higher byte of the Result - sta xbyte ; lower byte of the Result - ldx #$08 -Rotate05 - lsr xbyte+1 - bcc DoNotAddX02 - clc - adc #40 -DoNotAddX02 - ror - ror xbyte - dex - bne Rotate05 - sta xbyte+1 + sta xbyte ; multiplier (temporarily here, it will be erased anyway) + lda #$00 ; + sta xbyte+1 ; higher byte of the Result + ldx #$05 ; 2^5 +@ asl xbyte + rol xbyte+1 + dex + bne @- ; add to the address of the list clc @@ -957,7 +940,7 @@ DefActivationEnd EraseLoop tya ; lda #$00 sta (xbyte),y - adw xbyte #40 + adw xbyte #32 dex bpl EraseLoop @@ -970,7 +953,7 @@ EraseLoop ldx PositionOnTheList beq SelectList2 ; if there is 0 we add nothing AddLoop2 - adw xbyte #40 + adw xbyte #32 dex bne AddLoop2 SelectList2 @@ -992,7 +975,7 @@ CharToList1 ldx PositionOnTheList beq SelectList1 ; if there is 0 we add nothing AddLoop1 - adw xbyte #40 + adw xbyte #32 dex bne AddLoop1 SelectList1 @@ -1003,7 +986,7 @@ SelectList1 ldx OffsetDL1 beq SetWindowList1 ; if zero then add nothing LoopWindow1 - adw xbyte #40 + adw xbyte #32 dex bne LoopWindow1 SetWindowList1 diff --git a/variables.asm b/variables.asm index c9470c1..5ed36e3 100644 --- a/variables.asm +++ b/variables.asm @@ -10,6 +10,10 @@ ;===================================================== OneTimeZeroVariables OneTimeZeroVariablesCount = variablesToInitialize-OneTimeZeroVariables ; MAX 128 bytes ! + .if OneTimeZeroVariablesCount > 127 + .error "OneTimeZeroVariablesCount too large, ",OneTimeZeroVariablesCount + .endif + noMusic .by 0 ; 0 - play music, $ff - do not play music noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX ;---------------------------------------------------- @@ -17,7 +21,7 @@ noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX .by $00 ; labels line color GameOverColoursTable .BYTE $80,$40,$c4,$20,$c0,$e4 ;---------------------------------------------------- -TanksNames ; DO NOT ZERO ON RESTART GAME - ticket #24 +TanksNames ; DO NOT ZERO ON GAME RESTART - ticket #24 :6 dta d" " ;---------------------------------------------------- skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30) @@ -122,7 +126,7 @@ WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile ; 20203.5 => 128 : <20203 : >20203 ;---------------------------------------------------- -L1 .DS 1 ; variable used in multiplications (by 10:) +;L1 .DS 1 ; variable used in multiplications (by 10:) ;gravity .DS 1 ;only the decimal part (1/10 = 25) ;---------------------------------------------------- @@ -162,8 +166,8 @@ WeaponRangeRight .DS 2 ;HowMuchToFall .ds 1 HeightRol .DS 1 ;digger -digstartx .DS 2 -digstarty .DS 2 +;digstartx .DS 2 +;digstarty .DS 2 diggery .DS 1 DigLong .DS 1 digtabxL .DS [8] @@ -204,7 +208,7 @@ FloatingAlt .DS 1 ; floating tank altitude xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte xtraj01 .DS [5] ; middle byte xtraj02 .DS [5] ; high byte -vx00 .DS [5] +;vx00 .DS [5] ; looks like it is not really used anywhere vx01 .DS [5] vx02 .DS [5] vx03 .DS [5] diff --git a/weapons.asm b/weapons.asm index 87831c6..56a0919 100644 --- a/weapons.asm +++ b/weapons.asm @@ -465,8 +465,8 @@ EndNurnedCheckLoop .endp ; ------------------------ .proc xdigger - mwa xdraw digstartx - mwa ydraw digstarty + ;mwa xdraw digstartx + ;mwa ydraw digstarty ldx diggery WriteToBranches lda xdraw @@ -2012,8 +2012,8 @@ MIRVcopyParameters sta xtraj01,x lda xtraj+2 sta xtraj02,x - lda vx - sta vx00,x + ;lda vx + ;sta vx00,x lda vx+1 sta vx01,x lda vx+2