Shop OBEX P1 Docs P2 Docs Learn Events
SX48/52 register values question — Parallax Forums

SX48/52 register values question

cbmeekscbmeeks Posts: 634
edited 2005-11-27 23:32 in General Discussion
My project needs a LOT of RAM. Well, technically, it needs 160 bytes (plus a little extra). The 262 in the SX52 is actually more than enough.

What I am trying to do is both read and write to the register ram in a serial manner.

For example, I need to hold 160 bytes. I assume I would put the start at $08 (0) and run it to $9f (159). So, once those 160 bytes are full, I need to run through them one at a time. I know it should be simple but I can't find out how to loop through the registers one at a time.

So, if I needed to read/write to position 100, how would I do that?

Also, I am concerned about skipping banks. I know the SX48 has 16 banks with 16 registers each (plus some extra). Is there anything special about doing what I want?

Thanks again and sorry for such a basic question.

Oh, I am using ASM and not basic.

cbmeeks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://metroidclassic.com

=========
DMCA Sucks
RIAA Sucks

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-27 20:56
    Since you're using the SX52, the indirect memory addressing is easier, the user manual does a pretty good job explaining it. You use the fsr as the index by loading it with the base address of the array plus index. Then use ind as a source or destination register to access the register pointed to by the fsr.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • cbmeekscbmeeks Posts: 634
    edited 2005-11-27 23:32
    ok, thanks. I will also be using the SX48 but I assume they are both the same. I will check that out and see if I can pull it off.

    BTW, it's for an NTSC computer I am building. ALPHA screen shots of the GPU can be seen here:

    (oh the picture is actually stable minus the skewing at the top....my camera just didn't get the sync correct and that's why it is wavy)

    galaxy.signaldev.com/~cbmeeks/gpu2/DSCF0468.JPG
    galaxy.signaldev.com/~cbmeeks/gpu2/DSCF0469.JPG
    galaxy.signaldev.com/~cbmeeks/gpu2/

    Thanks!

    cbmeeks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://metroidclassic.com

    =========
    DMCA Sucks
    RIAA Sucks
Sign In or Register to comment.