Jump to content
IGNORED

Supercharger Basics


cd-w

Recommended Posts

I have decided to try my hand at programming for the Supercharger (thanks to a certain contest :) ). However, I seem to have got stumped at the very start :( The attached file is my attempt to configure the SC with a 4K contiguous section of writeable memory (Bank 3+1) and display a simple PF testcard. The code loads OK, but seems to crash immediately after this point. I suspect the problem is with my understanding of the memory map. On a related note, are there any actual SC programming examples beyond the cryptic sctech document?

Any help appreciated!

 

Chris

sctest.zip

Link to comment
Share on other sites

Hi there!

 

On a related note, are there any actual SC programming examples beyond the cryptic sctech document?

 

I know about two from Bob Colbert, his Stella-Sketch project and his (still unfinished) Saboteur game. I think the Stella CD also has the sources for Dragonstomper and others. And maybe supercat would publish the SDI source?

 

Greetings,

Manuel

Link to comment
Share on other sites

The attached file is my attempt to configure the SC with a 4K contiguous section of writeable memory (Bank 3+1) and display a simple PF testcard.  The code loads OK, but seems to crash immediately after this point.  I suspect the problem is with my understanding of the memory map.

918328[/snapback]

I think the problem is that you ORG bank 3 (which contains the actual code) to $2000. This isn't in the VCS cartridge space where the SC RAM is located. Therefore the game should crash immediately, because the startup address in the header points to $2000 too.

 

If you are using different SEGs for the different banks, you need to use ORG to place them in the binary and RORG to set the origin for the actual code/data in the banks.

 

 

Ciao, Eckhard Stolberg

Link to comment
Share on other sites

I think the problem is that you ORG bank 3 (which contains the actual code) to $2000. This isn't in the VCS cartridge space where the SC RAM is located. Therefore the game should crash immediately, because the startup address in the header points to $2000 too.

 

If you are using different SEGs for the different banks, you need to use ORG to place them in the binary and RORG to set the origin for the actual code/data in the banks.

 

Ciao, Eckhard Stolberg

918384[/snapback]

 

Hi Eckhard,

 

Thanks - I hadn't fully appreciated the difference between ORG and RORG. I have now added RORG $1800 to Bank 1/2 and RORG $1000 to bank 3 and it seems to work. At least, it works when I don't set the write-enable bit. Is it necessary to start with write disabled, and then enable it when you actually want to perform a write access?

 

Chris

Link to comment
Share on other sites

The problem is you can't have code or data at $10xx when write mode is enabled, since any access to that memory location will cause a write to the fifth address location accessed after the access to $10xx.

918458[/snapback]

 

Thanks. What address range should I use to avoid spurious writes, or is this not possible?

 

EDIT: Ok, I just noticed that you wrote $10xx and not $1xxx! Changing the start to $1100 fixed the problem.

 

Sorry for all the basic questions, but I am rapidly finding out that the supercharger is a rather strange creature :twisted:

 

Chris

Edited by cd-w
Link to comment
Share on other sites

The problem is you can't have code or data at $10xx when write mode is enabled, since any access to that memory location will cause a write to the fifth address location accessed after the access to $10xx.

918458[/snapback]

 

Out of curiosity, is there any reason, other than not having thought of it, that Starpath couldn't have used $08xx as the 'write-trigger' hotspot? Reads from that address range would yield Stella or RIOT-RAM data, but if the data is ignored that shouldn't be a problem.

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