Jump to content
Karl G

Memory Maps

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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?

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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]
  • Like 1

Share this post


Link to post
Share on other sites

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]
  • Like 2

Share this post


Link to post
Share on other sites
  • 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" ...

  • Like 1

Share this post


Link to post
Share on other sites

$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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

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...