Jump to content

Photo

Memory Maps


12 replies to this topic

#1 Karl G ONLINE  

Karl G

    Dragonstomper

  • 789 posts

Posted Wed Feb 27, 2019 8:40 AM

The memory map for the standard kernel is not completely correct for the current version of bB, at least.  The regular variables (A-Z) start at $D4 instead of $D6, and temp7 and playfieldpos are after this range instead of before it.  I believe the rest if correct.  So that part of the table should read:

$d3    var47
$d4    A
       a

 .
 .
 .

$ed    Z
       z
$ee    temp7
$ef    playfieldpos
$f0    pfheighttable
       pfcolortable
       aux1

My reference is 2600basic.h

 

Also, a memory map for DPC+ would be handy, I think.



#2 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 28,952 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Feb 27, 2019 9:07 AM

Thanks. I wonder if RevEng changed it when he was working on it or if the map was always wrong. If somebody posts a DPC+ memory map, I'll put it on the bB page. Is the Multisprite Kernel Memory Map still correct?



#3 RevEng OFFLINE  

RevEng

    Bit Player

  • 5,168 posts
  • Location:bottom of the stack

Posted Wed Feb 27, 2019 9:20 AM

I changed it. In one of his programs, Bogax made a-z and the var variables contiguous in memory. That way they could all be accessed in one array loop.

I thought it was a good idea, so I copied it.

I didn't modify the multisprite map.

#4 Karl G ONLINE  

Karl G

    Dragonstomper

  • Topic Starter
  • 789 posts

Posted Wed Feb 27, 2019 9:35 AM

I can make a DPC+ memory map using DPCplusbB.h as a reference.  Just let me know what format would work best for you.



#5 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 28,952 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Feb 27, 2019 11:49 AM

I can make a DPC+ memory map using DPCplusbB.h as a reference.  Just let me know what format would work best for you.

 
Thanks. The maps on the bB page look like this:
  

$80    player0x
$81    player1x
$82    player0colorstore
       missile0x
$83    missile1x


#6 Karl G ONLINE  

Karl G

    Dragonstomper

  • Topic Starter
  • 789 posts

Posted Thu Feb 28, 2019 11:15 AM

Okay, here is my stab at a DPC+ kernel memory map using the format you requested.  A couple of notes:

 

  • aux4 doesn't seem to be used for anything else, so I make use of it in the DPC+ version of the text minikernel
  • $F5 appears to be completely unused, and doesn't have a label, either.  I think this must be the result of an oversight / counting mistake.  I checked with the debugger, but getting confirmation that this is correct would be good.
$80    player0x
$81    topP1x
       temp7
$82    missile0x
$83    missile1x
$84    ballx
$85    SpriteGfxIndex
$86
$87
$88
$89
$8A
$8B
$8C
$8D
$8E    spritedisplay
$8F    player0xcoll

$90    NewSpriteX
       player1x
$91    player2x
$92    player3x
$93    player4x
$94    player5x
$95    player6x
$96    player7x
$97    player8x
$98    player9x
$99    player0y
$9A    NewSpriteY
       player1y
$9B    player2y
$9C    player3y
$9D    player4y
$9E    player5y
$9F    player6y

$A0    player7y
$A1    player8y
$A2    player9y
$A3    player0color
$A4
$A5    player0height
$A6    player1height
$A7    player2height
$A8    player3height
$A9    player4height
$AA    player5height
$AB    player6height
$AC    player7height
$AD    player8height
$AE    player9height
$AF    _NUSIZ1

$B0    NUSIZ2
$B1    NUSIZ3
$B2    NUSIZ4
$B3    NUSIZ5
$B4    NUSIZ6
$B5    NUSIZ7
$B6    NUSIZ8
$B7    NUSIZ9
$B8    score
$B9
$BA
$BB    COLUM0
$BC    COLUM1
$BD    player0pointerlo
$BE    player0pointerhi
$BF    missile0y

$C0    missile1y
$C1    bally
$C2    missile0height
$C3    missile1height
$C4    ballheight
$C5    statusbarlength
       aux3
$C6    lifecolor
       pfscorecolor
$C7    aux4
$C8    lifepointer
       pfscore1
       aux5
$C9    lives
       pfscore2
       aux6
$CA    playfieldpos
$CB    temp1
$CC    temp2
$CD    temp3
$CE    temp4
$CF    temp5

$D0    temp6
$D1    A
       a
$D2    B
       b
$D3    C
       c
$D4    D
       d
$D5    E
       e
$D6    F
       f
$D7    G
       g
$D8    H
       h
$D9    I
       i
$DA    J
       j
$DB    K
       k
$DC    L
       l
$DD    M
       m
$DE    N
       n
$DF    O
       o

$E0    P
       p
$E1    Q
       q
$E2    R
       r
$E3    S
       s
$E4    T
       t
$E5    U
       u
$E6    V
       v
$E7    W
       w
$E8    X
       x
$E9    Y
       y
$EA    Z
       z
$EB    scorecolor
$EC    var0
$ED    var1
$EE    var2
$EF    var3

$F0    var4
$F1    var5
$F2    var6
$F3    var7
$F4    var8
$F5
$F6    stack1
$F7    stack2
$F8    stack3
$F9    stack4
$FA    [reserved for the stack]
$FB    [reserved for the stack]
$FC    [reserved for the stack]
$FD    [reserved for the stack]
$FE    [reserved for the stack]
$FF    [reserved for the stack]


#7 Karl G ONLINE  

Karl G

    Dragonstomper

  • Topic Starter
  • 789 posts

Posted Thu Feb 28, 2019 11:19 AM

Here is an easier-to-read version of the above map for anyone who wants to double-check my work, too:

$80,,,,player0x
$81,,,,topP1x
,,,,,,,temp7
$82,,,,missile0x
$83,,,,missile1x
$84,,,,ballx
$85,,,,SpriteGfxIndex
$86
$87
$88
$89
$8A
$8B
$8C
$8D
$8E,,,,spritedisplay
$8F,,,,player0xcoll

$90,,,,NewSpriteX
,,,,,,,player1x
$91,,,,player2x
$92,,,,player3x
$93,,,,player4x
$94,,,,player5x
$95,,,,player6x
$96,,,,player7x
$97,,,,player8x
$98,,,,player9x
$99,,,,player0y
$9A,,,,NewSpriteY
,,,,,,,player1y
$9B,,,,player2y
$9C,,,,player3y
$9D,,,,player4y
$9E,,,,player5y
$9F,,,,player6y

$A0,,,,player7y
$A1,,,,player8y
$A2,,,,player9y
$A3,,,,player0color
$A4
$A5,,,,player0height
$A6,,,,player1height
$A7,,,,player2height
$A8,,,,player3height
$A9,,,,player4height
$AA,,,,player5height
$AB,,,,player6height
$AC,,,,player7height
$AD,,,,player8height
$AE,,,,player9height
$AF,,,,_NUSIZ1

$B0,,,,NUSIZ2
$B1,,,,NUSIZ3
$B2,,,,NUSIZ4
$B3,,,,NUSIZ5
$B4,,,,NUSIZ6
$B5,,,,NUSIZ7
$B6,,,,NUSIZ8
$B7,,,,NUSIZ9
$B8,,,,score
$B9
$BA
$BB,,,,COLUM0
$BC,,,,COLUM1
$BD,,,,player0pointerlo
$BE,,,,player0pointerhi
$BF,,,,missile0y

$C0,,,,missile1y
$C1,,,,bally
$C2,,,,missile0height
$C3,,,,missile1height
$C4,,,,ballheight
$C5,,,,statusbarlength
,,,,,,,aux3
$C6,,,,lifecolor
,,,,,,,pfscorecolor
$C7,,,,aux4
$C8,,,,lifepointer
,,,,,,,pfscore1
,,,,,,,aux5
$C9,,,,lives
,,,,,,,pfscore2
,,,,,,,aux6
$CA,,,,playfieldpos
$CB,,,,temp1
$CC,,,,temp2
$CD,,,,temp3
$CE,,,,temp4
$CF,,,,temp5

$D0,,,,temp6
$D1,,,,A
,,,,,,,a
$D2,,,,B
,,,,,,,b
$D3,,,,C
,,,,,,,c
$D4,,,,D
,,,,,,,d
$D5,,,,E
,,,,,,,e
$D6,,,,F
,,,,,,,f
$D7,,,,G
,,,,,,,g
$D8,,,,H
,,,,,,,h
$D9,,,,I
,,,,,,,i
$DA,,,,J
,,,,,,,j
$DB,,,,K
,,,,,,,k
$DC,,,,L
,,,,,,,l
$DD,,,,M
,,,,,,,m
$DE,,,,N
,,,,,,,n
$DF,,,,O
,,,,,,,o

$E0,,,,P
,,,,,,,p
$E1,,,,Q
,,,,,,,q
$E2,,,,R
,,,,,,,r
$E3,,,,S
,,,,,,,s
$E4,,,,T
,,,,,,,t
$E5,,,,U
,,,,,,,u
$E6,,,,V
,,,,,,,v
$E7,,,,W
,,,,,,,w
$E8,,,,X
,,,,,,,x
$E9,,,,Y
,,,,,,,y
$EA,,,,Z
,,,,,,,z
$EB,,,,scorecolor
$EC,,,,var0
$ED,,,,var1
$EE,,,,var2
$EF,,,,var3

$F0,,,,var4
$F1,,,,var5
$F2,,,,var6
$F3,,,,var7
$F4,,,,var8
$F5
$F6,,,,stack1
$F7,,,,stack2
$F8,,,,stack3
$F9,,,,stack4
$FA,,,,[reserved for the stack]
$FB,,,,[reserved for the stack]
$FC,,,,[reserved for the stack]
$FD,,,,[reserved for the stack]
$FE,,,,[reserved for the stack]
$FF,,,,[reserved for the stack]


#8 RevEng OFFLINE  

RevEng

    Bit Player

  • 5,168 posts
  • Location:bottom of the stack

Posted Thu Feb 28, 2019 11:28 AM

  • aux4 doesn't seem to be used for anything else, so I make use of it in the DPC+ version of the text minikernel
  • $F5 appears to be completely unused, and doesn't have a label, either.  I think this must be the result of an oversight / counting mistake.  I checked with the debugger, but getting confirmation that this is correct would be good.

Yep, think you're right. Nice catch!

Your list has "stack1" listed four times, instead of "stack1" "stack2" ...

#9 Karl G ONLINE  

Karl G

    Dragonstomper

  • Topic Starter
  • 789 posts

Posted Thu Feb 28, 2019 11:33 AM

Fixed now.  Thanks!



#10 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 28,952 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Feb 28, 2019 2:15 PM

Here's my first try:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpcmemorymap



#11 Karl G ONLINE  

Karl G

    Dragonstomper

  • Topic Starter
  • 789 posts

Posted Thu Feb 28, 2019 4:15 PM

Looks good! Thanks for adding it.

#12 Lillapojkenpćön OFFLINE  

Lillapojkenpćön

    Chopper Commander

  • 191 posts

Posted Tue Mar 12, 2019 4:04 PM

$F6    stack1
$F7    stack2
$F8    stack3
$F9    stack4

 

; the stack bytes above may be used in the kernel

$FA    [reserved for the stack]
$FB    [reserved for the stack]
$FC    [reserved for the stack]
$FD    [reserved for the stack]
$FE    [reserved for the stack]
$FF    [reserved for the stack]

 

Does that comment mean that some scenarios in the kernel might use $FA-$FF and that you only have stack1-stack4 for the bB code, so max two nested subroutines for example?



#13 Karl G ONLINE  

Karl G

    Dragonstomper

  • Topic Starter
  • 789 posts

Posted Tue Mar 12, 2019 4:30 PM

Actually, the stack starts from the last two bytes, so these addresses are used first, then stack4 - stack1, etc.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users