diff --git a/README.md b/README.md index 52d8ca2..c5087be 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,18 @@ With the advent of [fujinet](https://fujinet.online/) we are thinking about maki ## Changelog: +###### Version 1.26 +2023-01-23 + +Early morning edition. It is 5:11 am and I am writing this instead of dreaming of electric sheep. +For the last 6 weeks theversions we released had an awful bug - the conversations of tanks were completely invisible. Thanks for pointing this out, RB5200. +- tanks talk to each other again +- better stochastic non blocking wait one frame +- rare dstance measurement bug fixed (rarely a tank survived a direct hit) +- 5200: second fire works (by RB5200) +- "visual debug" mode in A800 version, triggered by pressing [CTRL]+[HELP]. It displays distances measured, laser aiming and aiming technique. It leaves a mess on screen, but it does not impair the game, just makes it a bit harder. + + ###### Version 1.25 2023-01-17 @@ -58,8 +70,9 @@ Y2K Compliance Edition This version is 5200 SuperSystem focused. - the correct production year in the splash screens!!! - very rare hangups when accessing the inventory seemingly eliminated, thanks @RB5200 for testing! -- a new feature - pressing [Tab] (atari800) or [5] (5200) when selecting the wind power switches wind mode to changing with each turn, what makes aiming arguably more challenging! It is indicated by "?" next to the "Wind" in the main menu. -- all these changes were made possible because of the extensive code size optimization by @Pecus +- a new feature - pressing [Tab] (atari800) or [5] (5200) when selecting the wind power switches wind mode to changing with each turn, which makes aiming arguably more challenging! It is indicated by "?" next to the "Wind" in the main menu. +- pressing [G] during the game changes the color scheme (classic, Polish rainbow, Xmas). +- all these changes were made possible thanks to the extensive code size optimization by @Pecus ###### Version 1.23 diff --git a/constants.asm b/constants.asm index 7f79453..1c51797 100644 --- a/constants.asm +++ b/constants.asm @@ -626,10 +626,13 @@ CreditsStart dta d"Bocianu, Probabilitydragon, EnderDude",d","* dta d"Beeblebrox, KrzysRog, lopezpb, Dracon",d","* dta d"brad-colbert, archon800, nowy80",d","* - dta d"Shaggy the Atarian, RetroBorsuk, ZP",d"H"* + dta d"Shaggy the Atarian, RetroBorsuk, ZPH" .IF target = 5200 - dta d"x-usr(1536), Aking, JAC!, phaero",d"n"* + dta d","* + dta d"x-usr(1536), Aking, JAC!, phaeron",d","* dta d"RB520",d"0"* + .ELSE + dta d" "* .ENDIF dta d" "* dta d"Additional testin",d"g"* @@ -641,9 +644,13 @@ CreditsStart dta d" "* CreditsEnd .IF target = 5200 - CreditsLines=37 + CreditsLines=38 .ELSE CreditsLines=42 ; 34 in reality. add 7? .ENDIF - +.IF target = 5200 + ; Atari 5200 splash + NewSplashText=* + dta d"copyright 2023 atari" +.ENDIF .endif diff --git a/grafproc.asm b/grafproc.asm index dc7b807..b9fd115 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -140,8 +140,13 @@ LineParametersReady ora DX+1 ora DY ora DY+1 - jeq EndOfDraw + bne NotOnePoint + ; length=0 + sta LineLength + sta LineLength+1 + jmp EndOfDraw +NotOnePoint ; here we have DX,DY,XK and we know which operations ; are to be performed with these factors when doing PLOT ; (accordingly to given bits of 'HowToDraw') @@ -219,6 +224,8 @@ PutPixelinDraw bit drawFunction bpl @+ inw LineLength + bit Vdebug + bmi MeasureVisualisation jmp ContinueDraw ; was `bne` - not good, because LineLength starts from $ffff @ bvc @+ @@ -266,6 +273,7 @@ CheckCollisionDraw StopHitChecking jmp ContinueDraw @ +MeasureVisualisation jsr plot ContinueDraw diff --git a/lib/5200MACRO.ASM b/lib/5200MACRO.ASM index 2662deb..1bfddf2 100644 --- a/lib/5200MACRO.ASM +++ b/lib/5200MACRO.ASM @@ -74,23 +74,18 @@ .ENDM ;------------------------------------- - .MACRO WAIT + .MACRO WAIT ; WAIT ; waits one frame (1/50 s(PAL) or 1/60s(NTSC)) -?zero LDA VCOUNT - cmp #$05 - bcc ?zero - cmp #$70 - bcc ?WA - sbc #10 ; last lines correction -?WA cmp VCOUNT - beq ?WA - bcc ?WA -?WFRAME cmp VCOUNT - beq ?nowait - bcs ?WFRAME -?nowait - .ENDM +?ze LDA VCOUNT + cmp #16 ; if line<16 then wait for line>15 (long VBI protection) + bcc ?ze + sbc #10 ; last lines correction +?wa cmp VCOUNT + bcc ?wa +?wf cmp VCOUNT + bcs ?wf + .ENDM ;------------------------------------- .macro waitRTC lda RTCLOK+1 diff --git a/lib/MACRO.ASM b/lib/MACRO.ASM index 4dea932..34aa3ba 100644 --- a/lib/MACRO.ASM +++ b/lib/MACRO.ASM @@ -73,23 +73,18 @@ PLA .ENDM ;------------------------------------- - .MACRO WAIT + .MACRO WAIT ; WAIT ; waits one frame (1/50 s(PAL) or 1/60s(NTSC)) -?zero LDA VCOUNT - cmp #$05 ; if line<5 then wait for line>4 - bcc ?zero - cmp #$70 - bcc ?WA ; if line>=112 then - sbc #10 ; last lines correction -?WA cmp VCOUNT - beq ?WA - bcc ?WA -?WFRAME cmp VCOUNT - beq ?nowait - bcs ?WFRAME -?nowait - .ENDM +?ze LDA VCOUNT + cmp #16 ; if line<16 then wait for line>15 (long VBI protection) + bcc ?ze + sbc #10 ; last lines correction +?wa cmp VCOUNT + bcc ?wa +?wf cmp VCOUNT + bcs ?wf + .ENDM ;------------------------------------- .macro waitRTC lda RTCLOK+2 diff --git a/scorch.asm b/scorch.asm index 9389a8a..efe486a 100644 --- a/scorch.asm +++ b/scorch.asm @@ -15,7 +15,7 @@ ;--------------------------------------------------- .macro build - dta d"1.25" ; number of this build (4 bytes) + dta d"1.26" ; number of this build (4 bytes) .endm .macro RMTSong @@ -27,12 +27,13 @@ icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $5A +FirstZpageVariable = $59 .zpvar DliColorBack .byte = FirstZpageVariable .zpvar GradientNr .byte .zpvar GradientColors .word .zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn) .zpvar JoystickNumber .byte + .zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on) .zpvar xdraw .word ;= $64 ;variable X for plot .zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen) .zpvar xbyte .word @@ -274,14 +275,12 @@ rom2joy ; modify the text splash_text = $3c80 ; '.scorch.supersystem.copyright.19xx.atari' splash_year = splash_text + $1e - lda #"2" - sta splash_year - sta splash_year+2 - lda #"0" - sta splash_year+1 - lda #"3" - sta splash_year+3 - + splash_copyright = splash_text + $14 + ldy #19 ; 20 characters +@ lda NewSplashText,y + sta splash_copyright,y + dey + bpl @- ; splash screen delay. maybe add fire to speed up? @ cpx RTCLOK+1 @@ -1457,7 +1456,11 @@ EndOfCreditsVBI sta stick0 ldx JoystickNumber - lda trig0,x + ; check shift key (5200 second fire button) + lda SKSTAT + :3 lsr ; third bit + and trig0,x ; and first button + ;lda trig0,x sta strig0 ;Move hardware to shadow mva chbas chbase diff --git a/scorch.bin b/scorch.bin index 98e037c..07e8105 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 9f426aa..d277f07 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index 49128ea..99ed067 100644 --- a/textproc.asm +++ b/textproc.asm @@ -1633,6 +1633,27 @@ displayloop1 rts .endp +;-------------------------------------------------------- +.proc DisplayOffensiveTextNr ; + ldx TextNumberOff + lda talk.OffensiveTextTableL,x + sta LineAddress4x4 + lda talk.OffensiveTextTableH,x + sta LineAddress4x4+1 + inx ; the next text + lda talk.OffensiveTextTableH,x + sta temp+1 + lda talk.OffensiveTextTableL,x + sta temp ; opty possible + ; substract address of the next text from previous to get text length + sbw temp LineAddress4x4 temp2 + mva temp2 fx + + ;jsr Display4x4AboveTank + ;rts + ; POZOR !!! +.endp + ;-------------------------------------------------------- .proc Display4x4AboveTank ; ; Displays texts using PutChar4x4 above tank and mountains. @@ -1751,27 +1772,6 @@ DOTOldLowestValue .endp -;-------------------------------------------------------- -.proc DisplayOffensiveTextNr ; - ldx TextNumberOff - lda talk.OffensiveTextTableL,x - sta LineAddress4x4 - lda talk.OffensiveTextTableH,x - sta LineAddress4x4+1 - inx ; the next text - lda talk.OffensiveTextTableH,x - sta temp+1 - lda talk.OffensiveTextTableL,x - sta temp ; opty possible - ; substract address of the next text from previous to get text length - sbw temp LineAddress4x4 temp2 - mva temp2 fx - - ;jsr Display4x4AboveTank - ;rts - ; POZOR !!! -.endp - ;-------------------------------------------------------- .proc DisplayTankNameAbove ; lda tankNr diff --git a/weapons.asm b/weapons.asm index 3e091af..be8e5b6 100644 --- a/weapons.asm +++ b/weapons.asm @@ -1166,8 +1166,17 @@ NoSpyHard cmp #$80|@kbcode._tab jeq CTRLPressedTAB - and #$3f ;CTRL and SHIFT ellimination jumpFromStick + .IF TARGET = 800 + cmp #$80|17 ; Ctrl+Help + bne NoVdebugSwitch + lda Vdebug + eor #$ff + sta Vdebug + jmp ReleaseAndLoop +NoVdebugSwitch + .ENDIF + and #$3f ;CTRL and SHIFT ellimination cmp #@kbcode._up ; $e jeq pressedUp cmp #@kbcode._down ; $f @@ -1451,8 +1460,10 @@ AfterOffensiveText cmp #ind_Laser__________ ; laser bne NotStrongShoot ; Laser: (not)very strong - invisible - shot for laser beam end coordinates + bit Vdebug + bmi @+ mva #0 color - lda #1 +@ lda #1 sta Force sta Force+1 mva #$ff LaserFlag ; $ff - Laser @@ -1748,7 +1759,10 @@ LaserNoWalls bit TestFlightFlag bmi nowait bit LaserFlag ; faster laser prepare - bmi nowait + bpl nolaserwait + bit Vdebug + bpl nowait +nolaserwait lda color beq nonowait ; smoke tracer erases slowly lda tracerflag @@ -1789,10 +1803,16 @@ SkipCollisionCheck mwa ytraj+1 ydraw bit TestFlightFlag - bvs NoUnPlot - lda tracerflag + bvc NoTestFlight + bit Vdebug + bpl NoTestFlight + jsr WaitOneFrame ; visualize AI targeting + jmp YesUnPlot +NoTestFlight + lda tracerflag bne NoUnPlot - + +YesUnPlot jsr UnPlot NoUnPlot