lbaeza Posted May 5, 2022 Share Posted May 5, 2022 (edited) Hi there I am looking at the Elevator Repairman sources here: https://ksquiggle.neocities.org/asmgames/elevator.htm And this is the main game display list: ; ; The Game Display List ; DLIST .BYTE $70,$70,$C6 MSG .WORD TLINE .BYTE $C7 .WORD TOPLINE .BYTE $C7 .WORD LLINE .BYTE $C7 .WORD RLINE .BYTE $C7 .WORD LLINE .BYTE $C7 .WORD RLINE .BYTE $C7 .WORD LLINE .BYTE $C7 .WORD RLINE .BYTE $C7 .WORD LLINE .BYTE $C7 .WORD RLINE .BYTE $C7 .WORD LLINE .BYTE $C7 .WORD RLINE .BYTE $10,$46 .WORD INFOLN .BYTE $06,$41 .WORD DLIST Previously on the sources we have the definitions for TLINE, TOPLINE, LLINE, RLINE and INFOLN: TLINE .SBYTE " " .SBYTE +$80,"000" .SBYTE " " TOPLINE .BYTE 1,$46,0,$46,0,0,$41,0 .BYTE $41,0,$41,0,$46,0,$46,5 LLINE .BYTE 3,$46,0,$46,0,0,$41,0 .BYTE $41,0,$41,0,$46,0,$46,2 RLINE .BYTE 1,$46,0,$46,0,0,$41,0 .BYTE $41,0,$41,0,$46,0,$46,4 INFOLN .SBYTE "SC " I understand the first lines of the Display List: DLIST .BYTE $70,$70,$C6 MSG .WORD TLINE It says "skip 16 blank lines" ($70 $70) and "Display as special 160x20, 2-color graphic mode" ($C) and "Load memory scan from next two bytes" ($6). The next 2 bytes correspond to the address of TLINE. TLINE basically is in charge of displaying 6 spaces followed by the game timer and 7 more spaces. Now to my question. The next lines of the Display List: .BYTE $C7 .WORD TOPLINE It says: "Display as special 160x20, 2-color graphic mode" ($C) and "Set a display list interrupt for the next line" ($7). Here's my question. What do those 16 bytes for TOPLINE mean? Is that the Display List Interrupt source? Because I tried to translate by hand the 16 HEX values to OPCODES, but this does not make sense to me. Look: $01 ORA ($46, X) $46 $00 BRK $46 LSR $0 $00 $00 BRK $41 EOR ($0, X) $00 $41 EOR ($0, X) $00 $41 EOR ($0, X) $00 $46 LSR $0 $00 $46 LSR $0 $05 ORA $? Can you please help me explain what is this? Kind regards, Luis Edited May 5, 2022 by lbaeza Quote Link to comment Share on other sites More sharing options...
pps Posted May 5, 2022 Share Posted May 5, 2022 $C6 := LMS + DLI + graphics mode 6 $C7 := LMS + DLI + graphics mode 7 LMS := $40 (+$10 or $20 for h/vscrol) DLI := +$80 gfx modes := $02...$0F (low bytes) free lines := $00...$70 (high bytes) Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted May 5, 2022 Share Posted May 5, 2022 The Data at TOPLINE would be displayed on screen, any active DLI is vectored through $200,$201 if the DLI bit is enabled and DLI's are enabled through NMIEN. Have a look through you code to see where the DLI vector is put into $200/$201 and NMIEN set. That will be (at least one DLI routine) there may be many depending on what's happening. 1 Quote Link to comment Share on other sites More sharing options...
vitoco Posted May 5, 2022 Share Posted May 5, 2022 (edited) 8 hours ago, lbaeza said: DLIST .BYTE $70,$70,$C6 MSG .WORD TLINE It says "skip 16 blank lines" ($70 $70) and "Display as special 160x20, 2-color graphic mode" ($C) and "Load memory scan from next two bytes" ($6). The next 2 bytes correspond to the address of TLINE. You missunderstood the DL commands. Low 4 bits are for graphics mode (*) and high 4 bits are attributes as @pps described. (*) except value $1 which means a jump instruction and it must be combined with LMS=$40 to use next two bytes as the destination address. Note that this game uses narrow playfield, that means 16 data bytes per line instead of 20. Also, the address at the top of the display list labeled as MSG is modified to swap between timer line and game over message, without moving character data like with a PRINT statement in BASIC. Edited May 5, 2022 by vitoco 1 Quote Link to comment Share on other sites More sharing options...
pps Posted May 5, 2022 Share Posted May 5, 2022 (edited) Quote (*) except value $1 which means a jump instruction and it must be combined with LMS=$40 to use next two bytes as the destination address. No... $41 marks end of DL and should point back to the start (next 2 bytes). Next time(*) ANTIC jumps there to show the display. This way you can easily have altering gfx modes for flicker gfx modes without any need to have VBI or DLI stuff. $01 points to another part of this DL (next 2 bytes). So you can easily switch some parts of DL if needed. Just change the 2 bytes after $01 and next time(*) ANTIC will jump to another part of DL then. Switch it back and next time(*) first DL will be executed again. Usable for some different game screens with constant top and bottom line. Next time := when next screen refresh occurs, so every 1/50 or 1/60 sec. Edited May 5, 2022 by pps 1 Quote Link to comment Share on other sites More sharing options...
vitoco Posted May 5, 2022 Share Posted May 5, 2022 3 minutes ago, pps said: $41 marks end of DL and should point back to the start (next 2 bytes). Next time(*) ANTIC jumps there to show the display. This way you can easily have altering gfx modes for flicker gfx modes without any need to have VBI or DLI stuff. $01 points to another part of this DL (next 2 bytes). Thanks for the clarification. I wrote that by memory and then I kept thinking exactly that... So $01 also uses the next two bytes like $41, except that when $40 is present, it is related to the VB sync. Quote Link to comment Share on other sites More sharing options...
pps Posted May 5, 2022 Share Posted May 5, 2022 2 hours ago, vitoco said: Thanks for the clarification. I wrote that by memory and then I kept thinking exactly that... So $01 also uses the next two bytes like $41, except that when $40 is present, it is related to the VB sync. Yes, that's it. Maybe one could easily describe it this way: Use $01, if you want to link some parts of actual DL and use $41, at the end or if you want to alternate to another DL on next screen refresh. Quote Link to comment Share on other sites More sharing options...
pps Posted May 5, 2022 Share Posted May 5, 2022 12 hours ago, lbaeza said: TLINE .SBYTE " " .SBYTE +$80,"000" .SBYTE " " TOPLINE .BYTE 1,$46,0,$46,0,0,$41,0 .BYTE $41,0,$41,0,$46,0,$46,5 LLINE .BYTE 3,$46,0,$46,0,0,$41,0 .BYTE $41,0,$41,0,$46,0,$46,2 RLINE .BYTE 1,$46,0,$46,0,0,$41,0 .BYTE $41,0,$41,0,$46,0,$46,4 INFOLN .SBYTE "SC " These are the screen data, the things you see on the lines defined in the DL. .SBYTE is used to code the data in internal format, if I remember correct. +$80 is for invers chars. .BYTE doesn't change values to internal char data. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.