Jump to content
IGNORED

New Tunnels of Doom engine?


Recommended Posts

I had that thought as well, Tursi. Some things GPL can do fast, other things were probably a nightmare. A lot of the pushing and pulling from VDP memory because the scratch-pad didn't have enough room for data sets must have been agony to program.

 

Okay, so I have a new version, and this one seems like it does pretty well:

image.thumb.png.eeae582f01b00369d379786eec838bb7.png

I started using stacks to store rooms in given columns and rows, track connections between vertical and horizontal, then attempt to add horizontal to any verticals missing horizontals. And a final pass to find any rooms without connections and attempt to connect them. All in a non-random deterministic fashion.

 

The pseudo-algorithm is as follows:

  1. Place stairs up and stairs down
    1. Tighter window, 11 x 22 center area
  2. Place fountains
    1. Full window of 16 x 26
  3. Place rooms
    1. Full window of 16 x 26
  4. Draw vertical corridors
    1. Check for aligned features on a given column.
    2. Dig straight vertical corridors between features.
    3. Store the rooms in a stack for the given column.
  5. Draw horizontal corridors between aligned features.
    1. Check for aligned features on a given row.
    2. Dig straight horizontal corridors between features.
    3. If a vertical corridor is hit, make a T and stop. Store the column where the corridor was hit in a connection stack.
    4. Store the rooms in a stack for the given row. Do NOT store the 2nd room if it was not reached.
  6. Iterate through the column stack
    1. Check if the column has any rooms, or if a connection already exists to this column.
    2. Take the last room in the connection stack.
    3. Attempt a plot, left or right depending on the room's quadrant bias, to make a new connection.
    4. If successful, store the new connection in the stack and move on to the next column.
    5. If not successful, decrement the index of the connection stack and try again.
    6. If completely failed, move on to the next column.
  7. Iterate through all features and check for connections.
    1. If none on a given feature, try horizontal then vertical to try and make one.
    2. Direction based on quadrant location of room.

Obviously I still need to test it for edge cases and make sure it's consistent with a wide variety of map types. I'll probably implement it in assembly for much faster turn-around.

 

And here is the code, if interested. :)

 

100 RANDOMIZE 1982 :: OPTION BASE 1 :: DIM RTB(26),RLR(26),RY(26),RX(26),RYR(4),RYA(4),RXR(4),RXA(4),CV$(26),CH$(17)
110 CALL CLEAR :: CALL SCREEN(4):: CALL COLOR(9,6,15,10,6,15):: FOR I=96 TO 108 STEP 4 :: READ C$ :: CALL CHAR(I,C$):: NEXT I
120 FOR I=1 TO 4 :: READ RYR(I),RYA(I),RXR(I),RXA(I):: NEXT I :: FOR I=1 TO 19 :: CALL HCHAR(I,3,107,28):: NEXT I
130 R=1 :: GOSUB 1000 :: CALL VCHAR(Y,X,104):: RTB(R)=TB :: RLR(R)=LR :: RY(R)=Y :: RX(R)=X
140 FOR R=3 TO 4 :: GOSUB 1000 :: CALL VCHAR(Y,X,105):: RTB(R)=TB :: RLR(R)=LR :: RY(R)=Y :: RX(R)=X :: NEXT R
150 FOR R=5 TO 6 :: GOSUB 1000 :: CALL VCHAR(Y,X,106):: RTB(R)=TB :: RLR(R)=LR :: RY(R)=Y :: RX(R)=X :: NEXT R
160 FOR R=7 TO 26 :: GOSUB 1000 :: CALL VCHAR(Y,X,103):: RTB(R)=TB :: RLR(R)=LR :: RY(R)=Y :: RX(R)=X :: NEXT R

200 CALL SCREEN(10):: FOR R=1 TO 26 :: IF RY(R)=0 THEN 260
210 FOR R2=1 TO 26 :: IF R=R2 THEN 250 :: IF RY(R2)=0 THEN 250 :: IF RX(R)<>RX(R2) THEN 250
220 X=RX(R):: IF RY(R) < RY(R2) THEN Y=1+RY(R):: YS=Y ELSE Y=1+RY(R2) :: YS=Y
230 CALL GCHAR(Y,X,G):: IF G=107 THEN Y=Y+1 :: GOTO 230
240 IF G=97 THEN 250 ELSE CALL VCHAR(YS,X,97,Y-YS)
241 IF POS(CV$(X-3),CHR$(R),1)=0 THEN CV$(X-3)=CV$(X-3)&CHR$(R)
242 IF POS(CV$(X-3),CHR$(R2),1)=0 THEN CV$(X-3)=CV$(X-3)&CHR$(R2)
250 NEXT R2
260 NEXT R

300 CALL SCREEN(14):: CY$="" :: CX$="" :: FOR R=1 TO 26 :: IF RY(R)=0 THEN 360
310 FOR R2=1 TO 26 :: IF R=R2 THEN 350 :: IF RY(R2)=0 THEN 350 :: IF RY(R)<>RY(R2) THEN 350
320 Y=RY(R):: IF RX(R) < RX(R2) THEN X=1+RX(R) :: XS=X ELSE X=1+RX(R2) :: XS=X
330 CALL GCHAR(Y,X,G):: IF G=107 THEN X=X+1 :: GOTO 330
340 CALL HCHAR(Y,XS,96,X-XS):: IF G=97 THEN CALL VCHAR(Y,X,101)
341 IF POS(CH$(Y),CHR$(R),1)=0 THEN CH$(Y-1)=CH$(Y-1)&CHR$(R)
342 IF Y=RY(R2) AND X=RX(R2) AND POS(CH$(Y),CHR$(R),1)=0 THEN CH$(Y-1)=CH$(Y-1)&CHR$(R2)
343 IF G<103 THEN CY$=CY$&CHR$(Y-1):: CX$=CX$&CHR$(X-3)
350 NEXT R2
360 NEXT R

400 CALL SCREEN(11):: FOR XC=1 TO 26 :: IF CV$(XC)="" OR POS(CX$,CHR$(XC),1)>0 THEN 450
410 CC=0 :: N=LEN(CV$(XC))
415 R=ASC(SEG$(CV$(XC),N,1)):: CALL GCHAR(RY(R),RX(R)-1,GL):: CALL GCHAR(RY(R),RX(R)+1,GR)
420 ON RLR(R) GOTO 430,440

430 Y=RY(R):: X=RX(R):: XS=X+1
431 X=X+1 :: CALL GCHAR(Y,X,G):: IF G=107 THEN 431
432 IF G=32 THEN 450
433 IF G>102 THEN CE=G :: GOTO 437
434 IF (G=101 OR G=102) THEN CE=98 :: GOTO 437
435 IF G=97 THEN CE=101
436 GOTO 450
437 CALL HCHAR(Y,XS,96,X-XS):: CALL HCHAR(Y,X,CE):: CY$=CY$&CHR$(Y):: CX$=CX$&CHR$(X):: CC=1 :: GOTO 460

440 Y=RY(R):: X=RX(R):: XS=X-1
441 X=X-1 :: CALL GCHAR(Y,X,G):: IF G=107 THEN 441
442 IF G=32 THEN 450
443 IF G>102 THEN CE=G :: GOTO 447
444 IF (G=101 OR G=102) THEN CE=98 :: GOTO 447
445 IF G=97 THEN CE=102 
446 GOTO 450
447 CALL HCHAR(Y,X+1,96,XS-X):: CALL HCHAR(Y,X,CE):: CY$=CY$&CHR$(Y):: CX$=CX$&CHR$(X):: CC=1
450 IF CC=0 THEN N=N-1 :: IF N>0 THEN 415
460 NEXT XC

500 CALL SCREEN(8):: FOR R=1 TO 26 :: GOSUB 1100 :: IF CC>0 THEN 580
510 CALL GCHAR(RY(R)-1,RX(R),GU):: CALL GCHAR(RY(R)+1,RX(R),GD):: CALL GCHAR(RY(R),RX(R)-1,GL):: CALL GCHAR(RY(R),RX(R)+1,GR)
520 N=(RTB(R)-1)*2 + RLR(R)
530 Y=RY(R):: X=RX(R) :: ON N GOTO 540,550,560,570
540 GOSUB 600 :: IF CC=0 THEN Y=RY(R):: X=RX(R):: GOSUB 900 :: GOTO 580 ELSE 580
550 GOSUB 700 :: IF CC=0 THEN Y=RY(R):: X=RX(R):: GOSUB 900 :: GOTO 580 ELSE 580
560 GOSUB 600 :: IF CC=0 THEN Y=RY(R):: X=RX(R):: GOSUB 800 :: GOTO 580 ELSE 580
570 GOSUB 700 :: IF CC=0 THEN Y=RY(R):: X=RX(R):: GOSUB 800
580 NEXT R 
585 CALL SCREEN(4)
590 GOTO 590

600 XS=X+1
610 X=X+1 :: CALL GCHAR(Y,X,G):: IF G=107 THEN 610
620 IF G=32 THEN 670
630 IF G>102 THEN CE=G :: GOTO 660
640 IF (G=101 OR G=102) THEN CE=98 :: GOTO 660
650 IF G=97 THEN CE=101
660 CALL HCHAR(Y,XS,96,X-XS):: CALL HCHAR(Y,X,CE):: CC=CC+1
670 RETURN

700 XS=X-1
710 X=X-1 :: CALL GCHAR(Y,X,G):: IF G=107 THEN 710
720 IF G=32 THEN 770
730 IF G>102 THEN CE=G :: GOTO 760
740 IF (G=101 OR G=102) THEN CE=98 :: GOTO 760
750 IF G=97 THEN CE=102
760 CALL HCHAR(Y,X+1,96,XS-X):: CALL HCHAR(Y,X,CE):: CC=CC+1
770 RETURN

800 YS=Y-1
810 Y=Y-1 :: IF Y=0 THEN 860 ELSE CALL GCHAR(Y,X,G):: IF G=107 THEN 810
820 IF G>102 THEN CE=G :: GOTO 850
830 IF (G=99 OR G=100) THEN CE=98 :: GOTO 850
840 IF G=96 THEN CE=100 
850 CALL VCHAR(Y,X,97,1+YS-Y):: CALL VCHAR(Y,X,CE):: CC=CC+1
860 RETURN

900 YS=Y+1
910 Y=Y+1 :: CALL GCHAR(Y,X,G):: IF G=107 THEN 910
920 IF G=32 THEN 970
930 IF G>102 THEN CE=G :: GOTO 960
940 IF (G=99 OR G=100) THEN CE=98 :: GOTO 960
950 IF G=96 THEN CE=99 
960 CALL VCHAR(YS,X,97,Y-YS):: CALL VCHAR(Y,X,CE):: CC=CC+1
970 RETURN

1000 TB=INT(RND*2)+1 :: LR=INT(RND*2)+1
1001 IF R>4 THEN Y=INT(RND*RYR(TB))+RYA(TB):: X=INT(RND*RXR(LR))+RXA(LR) ELSE Y=INT(RND*RYR(TB+2))+RYA(TB+2):: X=INT(RND*RXR(LR+2))+RXA(LR+2)
1002 CALL GCHAR(Y,X,G):: IF G<>107 THEN 1001
1003 CALL GCHAR(Y-1,X,G):: IF G<>107 THEN 1001 :: CALL GCHAR(Y+1,X,G):: IF G<>107 THEN 1001
1004 CALL GCHAR(Y,X-1,G):: IF G<>107 THEN 1001 :: CALL GCHAR(Y,X+1,G):: IF G<>107 THEN 1001
1005 RETURN

1100 CC=0 :: IF RY(R)=0 THEN CC=4 :: GOTO 1160
1110 CALL GCHAR(RY(R)-1,RX(R),GU):: CALL GCHAR(RY(R)+1,RX(R),GD):: CALL GCHAR(RY(R),RX(R)-1,GL):: CALL GCHAR(RY(R),RX(R)+1,GR)
1120 IF GU<>96 AND GU<>99 AND GU<>107 THEN CC=CC+1
1130 IF GD<>96 AND GD<>100 AND GD<>107 THEN CC=CC+1
1140 IF GL<>97 AND GL<>101 AND GL<>107 THEN CC=CC+1
1150 IF GR<>97 AND GR<>102 AND GR<>107 THEN CC=CC+1
1160 RETURN

10000 DATA 000000FFFF0000001818181818181818181818FFFF181818181818FFFF000000
10001 DATA 000000FFFF181818181818F8F81818181818181F1F181818FF81BDA5A5BD81FF
10002 DATA 7EE7FFC3FF81FF7E7EFF81FFC3FFE77E3C66DBBDBDDB663C0000000000000000
10003 DATA 8383838383838383C0C0C0C0C0C0C0C000000000000000000000000000000000
11000 DATA 7,5,15,5
11001 DATA 7,10,9,20
11002 DATA 5,5,13,7
11003 DATA 5,10,7,20

 

 

  • Like 3
Link to comment
Share on other sites

2 hours ago, adamantyr said:
  • #2 is right out. I have ZERO interest in using GPL.

Another possibility just occurred to me. You don't have to program GPL to use the grom memory. So, if you are running low on memory in the 32K ram, you could load the groms with character definitions or other data. Reading data from a grom can be done from assembly and is pretty much the same as reading bytes from VDP ram.

Of course, if you can fit it all into 32K, that would be the easiest and best approach.

  • Like 3
Link to comment
Share on other sites

I'd say, too, if you are going to use a cart anyway - might as well just use ROM. It's faster and simpler to implement, unless you want the 2.2 console support (and we've enough workarounds there these days).

 

So I've been watching the tunnel generation evolve and I need to ask - TOD honestly just stored its maps as a collection of rooms and assumed the corridors?

 

  • Like 4
Link to comment
Share on other sites

57 minutes ago, Tursi said:

I'd say, too, if you are going to use a cart anyway - might as well just use ROM. It's faster and simpler to implement, unless you want the 2.2 console support (and we've enough workarounds there these days).

 

So I've been watching the tunnel generation evolve and I need to ask - TOD honestly just stored its maps as a collection of rooms and assumed the corridors?

 

Yeah I'd do 8K banked ROM, and the 32K expansion for buffering, variables, a root module, and whatnot.

 

The room coordinates are stored but only the current map of the dungeon is stored in entirety. It procedurally generates the corridors as you are ascending or descending and it plays the 2nd voice of the main theme.

 

My suspicion is he spent WAY too much time on this and eventually just stuck with a "good enough" implementation, as during dungeon stocking if it finds the room doesn't connect to anything, it leaves it empty.

  • Like 2
Link to comment
Share on other sites

Hmm... anyone have a GPLLNK they KNOW works with ROM banks?

 

I've gotten a few implementations over the years, but the one I am using doesn't appear to work; trying to issue an accept tone does nothing.

 

* Labels
SUBSTK EQU  >8373                      * Subroutine stack pointer
GETSTK EQU  >166C                      * 
LDGADR EQU  >60                        * Load and execute GROM address entry point
XTAB27 EQU  >200E                      * Low-men XML table location 27

* Entry and Workspace
GPLLNK DATA GLNKWS
       DATA GLINK1
RTNADR DATA XMLRTN
GXMLAD DATA >176C                      * GROM address for 'XML >27'
PUTSTK DATA >50                        * Initialized to >50 where PUTSTK address is
GLNKWS $->18
       BSS  8
* Main routine
GLINK1 LIMI 0                          * Disable interrupts
       CLR  @STATUS                    * Clear Status
       MOV  @PUTSTK,@GPLWS+8           * Put PUTSTK address into R4 of GPLWS
       MOV  *R14+,@GPLWS+12            * Put GPL routine in R6 of GPLWS
       LWPI GPLWS
       BL   *R4
       MOV  @GXMLAD,@>8302(R4)
       INCT @SUBSTK
       B    @LDGADR
XMLRTN MOV  @GETSTK,R4
       BL   *R4
       LWPI GLNKWS
       RTWP

 

Please note that like it's RAM implementation, it's embedding it's workspace into itself; the BSS line is worthless since it can't write to it. Fortunately it doesn't get used.

 

I wish I could just skip it altogether but unfortunately GPL is the only (sane) way to allow for cassette use. Plus it wouldn't be terrible to have the error and accept tones readily available.

 

  • Like 1
Link to comment
Share on other sites

31 minutes ago, adamantyr said:

Hmm... anyone have a GPLLNK they KNOW works with ROM banks?

 

I've gotten a few implementations over the years, but the one I am using doesn't appear to work; trying to issue an accept tone does nothing.

 

* Labels
SUBSTK EQU  >8373                      * Subroutine stack pointer
GETSTK EQU  >166C                      * 
LDGADR EQU  >60                        * Load and execute GROM address entry point
XTAB27 EQU  >200E                      * Low-men XML table location 27

* Entry and Workspace
GPLLNK DATA GLNKWS
       DATA GLINK1
RTNADR DATA XMLRTN
GXMLAD DATA >176C                      * GROM address for 'XML >27'
PUTSTK DATA >50                        * Initialized to >50 where PUTSTK address is
GLNKWS $->18
       BSS  8
* Main routine
GLINK1 LIMI 0                          * Disable interrupts
       CLR  @STATUS                    * Clear Status
       MOV  @PUTSTK,@GPLWS+8           * Put PUTSTK address into R4 of GPLWS
       MOV  *R14+,@GPLWS+12            * Put GPL routine in R6 of GPLWS
       LWPI GPLWS
       BL   *R4
       MOV  @GXMLAD,@>8302(R4)
       INCT @SUBSTK
       B    @LDGADR
XMLRTN MOV  @GETSTK,R4
       BL   *R4
       LWPI GLNKWS
       RTWP

 

Please note that like it's RAM implementation, it's embedding it's workspace into itself; the BSS line is worthless since it can't write to it. Fortunately it doesn't get used.

 

I wish I could just skip it altogether but unfortunately GPL is the only (sane) way to allow for cassette use. Plus it wouldn't be terrible to have the error and accept tones readily available.

 

The Bss 8 does get used. If you running this out of ROM space you need to have those 8 bytes in the 256 pad space as that is for your return and for the data pointer.

 

R13

R14

R15

 

Makes up those 8 bytes. So if your not using 8300 to 8307 you can change glnkws to equ > 8300->18 and delete the bss 8 and then your code should work fine.

  • Like 2
Link to comment
Share on other sites

Ah ha... Well now it does something but it either dumps to main title screen after the beep or goes crazy screen. Probably a return address issue?

 

VWS is >8320, incidentally.

 

* Utility
GPLLNK DATA VWS,GLINK1
* Labels
SUBSTK EQU  >8373                      * Subroutine stack pointer
GETSTK EQU  >166C                      * 
LDGADR EQU  >60                        * Load and execute GROM address entry point
XTAB27 EQU  >200E                      * Low-men XML table location 27
GXMLAD DATA >176C

* Main routine
GLINK1 LIMI 0                          * Disable interrupts
       CLR  @STATUS                    * Clear Status
       LI   R9,XMLRTN
       LI   R11,>50       
       MOV  *R11,@GPLWS+8              * Put PUTSTK address into R4 of GPLWS
       MOV  *R14+,@GPLWS+12            * Put GPL routine in R6 of GPLWS
       LWPI GPLWS
       BL   *R4
       MOV  @GXMLAD,@>8302(R4)
       INCT @SUBSTK
       B    @LDGADR
XMLRTN MOV  @GETSTK,R4
       BL   *R4
       LWPI VWS
       RTWP

 

Link to comment
Share on other sites

2 hours ago, adamantyr said:

Ah ha... Well now it does something but it either dumps to main title screen after the beep or goes crazy screen. Probably a return address issue?

 

VWS is >8320, incidentally.

 

* Utility
GPLLNK DATA VWS,GLINK1
* Labels
SUBSTK EQU  >8373                      * Subroutine stack pointer
GETSTK EQU  >166C                      * 
LDGADR EQU  >60                        * Load and execute GROM address entry point
XTAB27 EQU  >200E                      * Low-men XML table location 27
GXMLAD DATA >176C

* Main routine
GLINK1 LIMI 0                          * Disable interrupts
       CLR  @STATUS                    * Clear Status
       LI   R9,XMLRTN
       LI   R11,>50       
       MOV  *R11,@GPLWS+8              * Put PUTSTK address into R4 of GPLWS
       MOV  *R14+,@GPLWS+12            * Put GPL routine in R6 of GPLWS
       LWPI GPLWS
       BL   *R4
       MOV  @GXMLAD,@>8302(R4)
       INCT @SUBSTK
       B    @LDGADR
XMLRTN MOV  @GETSTK,R4
       BL   *R4
       LWPI VWS
       RTWP

 

You are not setting up the XML RETURN address.

 

You are loading R9 with XMLRTN

 

But you need to store that value in the 32k memory expansion >200E (XTAB27) location

 

you need to add a line after the MOV *R14+,@GPLWS+12 like this:

 

       MOV  R9,@XTAB27        Put XMLRTN Address into >200E

 

if for some reason you are storing data already at the >200E location, you can temporarily save it into R12, and then at the very end of the code after LWPI VWS, copy R12 into >200E

 

Adding that one missing line will make your program return fine.

Edited by Gary from OPA
Link to comment
Share on other sites

43 minutes ago, adamantyr said:

Got it! That's strange that it requires the memory expansion to work... I guess you had no choice on a bare-bones console except to use GPL to execute GPL commands?

The GPLLNK we all are using is based on the Original Miller's Graphics one, you need a way to return to assembly from GPL and it does that be using the XML tables and a easy hack it to find certain bytes in GROM 0 that make it do an XML, sadly most of the XML tables are fixed to return to places in the console rom, so using the table in the free space in 32k that is available works. -- If you could find the right bytes in the console groms that would do an XML into the >6000 cartridge space that could work, but also because you using ROM then you would have a fixed point in your code, and you would need another parm to return. -- Not sure if anyone found an XML that works with the >8300 pad area.

 

You can see more discussion about this problem here:

 

 

See this post as well:

 

 

********************************************************************************
*GPLLNK AND DSRLINK FROM THE SMART PROGRAMMER
*adapted to use scratchpad RAM only
*Uses >8320 as a workspace
********************************************************************************
 
GPLWS  EQU >83E0
GLNKWS EQU >8320
GR4    EQU GPLWS+8
GR6    EQU GPLWS+12
LDGADD EQU >60
XTABFE EQU >831C
GETSTK EQU >166C

 
GPLLNK DATA GLNKWS
       DATA GLINK1
 
GXMLAD DATA >1675
        
GLINK1	MOV @>0050,@GR4
       MOV *R14+,@GR6
       MOV @XTABFE,R12
	LI R9,XMLRTN
       MOV R9,@XTABFE
       LWPI GPLWS
       BL *R4
       MOV @GXMLAD,@>8302(R4)
       INCT @>8373
       B @LDGADD
 
XMLRTN MOV @GETSTK,R4
       BL *R4
       LWPI GLNKWS
       MOV R12,@XTABFE
       RTWP

 

 

It uses a different jump point in GROM 0 to be able to return to your program using just the pad ram

Edited by Gary from OPA
added more info
  • Like 1
Link to comment
Share on other sites

23 hours ago, adamantyr said:

Hmm... anyone have a GPLLNK they KNOW works with ROM banks?

 

I've gotten a few implementations over the years, but the one I am using doesn't appear to work; trying to issue an accept tone does nothing.

 

* Labels
SUBSTK EQU  >8373                      * Subroutine stack pointer
GETSTK EQU  >166C                      * 
LDGADR EQU  >60                        * Load and execute GROM address entry point
XTAB27 EQU  >200E                      * Low-men XML table location 27

* Entry and Workspace
GPLLNK DATA GLNKWS
       DATA GLINK1
RTNADR DATA XMLRTN
GXMLAD DATA >176C                      * GROM address for 'XML >27'
PUTSTK DATA >50                        * Initialized to >50 where PUTSTK address is
GLNKWS $->18
       BSS  8
* Main routine
GLINK1 LIMI 0                          * Disable interrupts
       CLR  @STATUS                    * Clear Status
       MOV  @PUTSTK,@GPLWS+8           * Put PUTSTK address into R4 of GPLWS
       MOV  *R14+,@GPLWS+12            * Put GPL routine in R6 of GPLWS
       LWPI GPLWS
       BL   *R4
       MOV  @GXMLAD,@>8302(R4)
       INCT @SUBSTK
       B    @LDGADR
XMLRTN MOV  @GETSTK,R4
       BL   *R4
       LWPI GLNKWS
       RTWP

 

Please note that like it's RAM implementation, it's embedding it's workspace into itself; the BSS line is worthless since it can't write to it. Fortunately it doesn't get used.

 

I wish I could just skip it altogether but unfortunately GPL is the only (sane) way to allow for cassette use. Plus it wouldn't be terrible to have the error and accept tones readily available.

 

 

With your GPLLNK routine modified to use a writable workspace and storage locations (see @Gary from OPA post above), there are several Scratchpad RAM locations and one ROM location you can store XMLRTN for the return from GPL: >8300, >830E, >831C, >831E in Scratchpad RAM and >603E in ROM. The GROM0 addresses of the corresponding GPL XML instructions  to place in the DATA directive at GXMLAD are >0376, >0EDA, >1675, >00E5, and >0131. Some of them have more than one GROM0 location, but I listed the first I found.

 

...lee

  • Like 2
Link to comment
Share on other sites

So next step was to figure out where all the data was in VDP, so I can pull it into high memory. As I want to preserve the VDP as a viewing portal and not a slow DB. :) Plus, I'll have to move sound into VDP for use, as the original cart could use GROM. (Although I suppose I COULD re-write the interrupt sound routine to use CPU RAM instead.)

 

The TOD Guide was mapped more for disk file access, so I had to verify locations myself:

 

General Database Breakdown

What                            VDP Location    Length
Sprite Patterns                 >0400           >0200 (512)
Game Title & Description        >0600           >0200 (512)
ASCII: Classes Patterns         >0800           >0100 (256)
ASCII: Regular                  >0900           >0400 (1024)
ASCII: 3D Graphics              >0D00           >0400 (1024)
Saved Game Party Data           >1000           >02CA (714) 
Monster Data                    >12CA           >04D0 (1232)
Monster Special Attacks         >179A           >0140 (320)
Monster Graphics                >18DA           >0400 (1024)
New Game Data                   >1CDA           >0032 (50)
Room Data                       >1D0C           >085C (2140)
Global Settings                 >2568           >0096 (150)
Vault & Store Settings          >25FE           >0032 (50)
Vault Combination Settings      >2630           >0032 (50)
Fountain Settings               >2662           >0014 (20)
Party Order                     >2676           >0004 (4)
Max Monsters/Level in Rooms     >267A           >000A (10)
Initial Hit Points/Class        >2690           >0004 (4)
Floor Data                      >2694           >0064 (100)
Melee Weapons                   >26F8           >0090 (144)
Ranged Weapons                  >2788           >0110 (272)
Armor                           >2898           >0090 (144)
Shields                         >2928           >0090 (144)
Magical Item Categories         >29B8           >0080 (128)
Magical Items                   >2A38           >02D0 (720)
Fountain Effects                >2D08           >0032 (50)
Quest Item Data                 >2D3A           >0098 (152)
Ranged/Magical Attack Seq Data  >2DD2           >0010 (16)
Chest Trap and Effects          >2DE2           >0080 (128)
Dungeon Colors                  >2E62           >0032 (50)
Combat/Room Colors              >2E94           >0020 (32)
Combat/Room Graphics            >2EC6           >0380 (896)
2x2 Patterns                    >3246           >0028 (40)
Monster XP, Party Position      >326E           >0005 (5)
Soft Key Map                    >3273           >000B (11)
Misc Data (5 unused bytes)      >327E           >0009 (9)
Feature Names                   >3288           >01F0 (496)
Spell Dialogue Data             >3478           >0060 (96)
Chest/Vault Names               >34D8           >0018 (24)
Current Floor Map               >34F0           >021A (538)
PAB Data                        >370A           >0026 (38)
Character Locations             >3730           >0008 (8)

 

 

  • Like 6
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...