Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - New game on a cart?

Reply to topic
Author Message
  • Joined: 29 Jun 1999
  • Posts: 68
  • Location: Houston TX
Reply with quote
New game on a cart?
Post Posted: Thu Jul 20, 2000 3:46 pm



With all this discussion about the Paging chips, I'm wondering how difficult it would be to create a new cart (using a ROM or PROM) using an existing cart.

Is most of the problem now related to making a EPROM cart?
Would replacing the ROM with a new ROM work or are their other factors to consider? (Assuming the new and old ROMs are the same size.)

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Thu Jul 20, 2000 6:51 pm
Quote
> With all this discussion about the Paging chips, I'm wondering how difficult it would be to create a new cart (using a ROM or PROM) using an existing cart.

That would be, removing the rom from an existing cart and replacing with an {ep}rom?
With a little rewiring it can be done, so long as you only need to address the first 32 (or 48?) kilobytes

Quote
> Is most of the problem now related to making a EPROM cart?
> Would replacing the ROM with a new ROM work or are their other factors to consider? (Assuming the new and old ROMs are the same size.)

That would be, removing the rom from an existing cart and replacing with an {ep}rom?
With a little rewiring it can be done, so long as you only need to address the first 32 (or 48?) kilobytes.

Beyond that, you run into problems with paging. The cartridge interface is only 16 address bits wide, and 16k (minus a few bytes at the end) of the 64k available is mapped to the internal ram so only 48k is addressable. Most SMS games released came with special roms with bank switching roms logic integrated onto the chip, that translate 16 bit addresses into 17-20bit addresses (conceivably higher) based on paging registers in the rom that the programs set by writing to special address on the rom chip (usually $fffd-$ffff, which unlike the rest of the top 16k of addressable space -does- address the cartridge).

So if you write, say $4 to address $ffff (paging register for $8000-$bfff on most roms), and then attempt to read a a byte from $8800, you would actually get byte $10800 off the ROM chip.

if you desoldered the rom chip and inserted your own eprom, the eprom wouldn't have the paging logic so the cart would only work until it depended on being able to swap chips. Since the sega cards did no swapping at all, you could burn an image of My Hero or some other sega card on a rom and put it in a cartridge, and it would run. I don't see why a homebrew cart couldn't also use the next 16k as well, so you could have a 48k cart.

Some sms carts, however, came with the software loaded on a standard rom, and had a second proprietary IC that did the bank switching, by intercepting the upper address lines and enough of the data bus to tell when someone was changing a paging register.
With these (sort of rare) carts, you can in fact pull out the original chip and replace with an eprom (or rom) and get the same paging behavior.

There are variations of the paging chips out there, some of them can handle larger roms (up to 512 kilobytes, and I guess a couple of the brazillians roms had paging chips that could go up to 1 megabyte), or drive battery backup up ram.

We're looking into ways to implement paging without using the hard to find sega roms to do is, as well as seeing what's involved in creating a live-programmable devcart.

Fabricating a PCB from scratch would be pretty neat too, it's a skill one can learn but it's takes a while and it's not exactly cheap to get started with.

I don't know about the cartridge casings...
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
in fact...
Post Posted: Thu Jul 20, 2000 10:49 pm

Quote
> That would be, removing the rom from an existing cart and replacing with an {ep}rom?
> With a little rewiring it can be done, so long as you only need to address the first 32 (or 48?) kilobytes

..it has been done, the homebrew sms tetris game 'Tetracycline' (32k cart) was tested on a real sms and game gear.
It was done by Mike G's with an SMS cart with seperate bank switching IC, the rom removed and replaced with an emprom. Since Tetracycline fits into 32k (probably much less than that is actually used in fact) probably any cart would do, since no bank switching goes on.
(note that it did not run on a master system with a US bios rom, because the cart didn't have an appropriate checksum, but it runs fine on a game gear and on a sms with a japanese bios.)


Quote
> if you desoldered the rom chip and inserted your own eprom, the eprom wouldn't have the paging logic so the cart would only work until it depended on being able to swap chips.

err, I mean 'swap pages'.

Also note I've found my self using the term 'bank' 'page' (as a verb) and 'frame' interchangably, either to mean a 16k block that can been remapped, or the act of remapping.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Apr 2000
  • Posts: 598
  • Location: Newcastle upon Tyne, England
Reply with quote
Re: in fact...
Post Posted: Fri Jul 21, 2000 10:22 am
Quote
>
> > That would be, removing the rom from an existing cart and replacing with an {ep}rom?
> > With a little rewiring it can be done, so long as you only need to address the first 32 (or 48?) kilobytes

> ..it has been done, the homebrew sms tetris game 'Tetracycline' (32k cart) was tested on a real sms and game gear.
> It was done by Mike G's with an SMS cart with seperate bank switching IC, the rom removed and replaced with an emprom. Since Tetracycline fits into 32k (probably much less than that is actually used in fact) probably any cart would do, since no bank switching goes on.

I have now tried this and it works. I took a standard, single chip cart board (from Sonic), blew a 128k EPROM with the data (times four) and plugged it in - works just fine.

The question of whether 48k is possible - the only barrier I could see would be the US/Euro BIOS, and whether it would accept such a thing. It does seem strange that the card games were a maximum of only 32k in size.

Quote
> Also note I've found my self using the term 'bank' 'page' (as a verb) and 'frame' interchangably, either to mean a 16k block that can been remapped, or the act of remapping.

All this terminology is very confusing! I remember from the BBC Micro days, the term "Sideways ROM" was used to refer to the same phenomenon...
  View user's profile Send private message Visit poster's website
  • Joined: 29 Jun 1999
  • Posts: 68
  • Location: Houston TX
Reply with quote
Post Posted: Fri Jul 21, 2000 5:08 pm



Quote
> Some sms carts, however, came with the software loaded on a standard rom, and had a second proprietary IC that did the bank switching, by intercepting the upper address lines and enough of the data bus to tell when someone was changing a paging register.
> With these (sort of rare) carts, you can in fact pull out the original chip and replace with an eprom (or rom) and get the same paging behavior.

Is the seperate logic chip more common in Game Gear games?
Also do (most of) the logic chips all function the same (using the same location)?

Thanks for the help.. I think it would be interesting to release a game, similar to the way things are done on the Atari 2600...

  View user's profile Send private message Visit poster's website
Limbs a Flyin'
  • Guest
Reply with quote
Post Posted: Fri Jul 21, 2000 6:15 pm
Quote
> I don't know about the cartridge casings...

hack up old audio tape cases? they are of similar dimensions, im sure you could alter it to fit in the cart slot.. maybe you could epoxy the rom board into it, plus you could mount a label under the tranparent face(s)?
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Fri Jul 21, 2000 6:41 pm

Quote
> Is the seperate logic chip more common in Game Gear games?

good question -I don't think so, I don't remember anyone mentioning any GG carts with seperate chips. Considering GG carts are physically smaller than SMS carts, I'd guess they used integrating switching roms for all or nearly all of them.

Quote
> Also do (most of) the logic chips all function the same (using the same location)?

Just about. All the SMS emulators I know of use the same scheme for all games:

$fffd = pages $0000-$3fff
$fffe = pages $4000-$7fff
$ffff = pages $8000-$bfff
the behavior of the paging register is that the contents of the paging register replace the bit 14 and above of the paging area, decoding to a 17 bit (or higher) address.

Usually, the first 1024 bytes of rom aren't paged.

This probably isn't the behavior for all mappers, but it's a catchall for any known sms software (with the possible exception of some games made by Codemasters, zoop could expand on that...)

At the very least, any 'proper' sms cart that does paging will use $ffff to page the addressable space at $8000-$bfff, because the bios (US) uses it to calculate an checksum (up to 256 k)

Quote
>Thanks for the help.. I think it would be interesting to release a game, similar to the way things are done on the Atari 2600...

I agree...
of course, someone has to finish a game worth publishing. Until then, check the 'source code' section of this site if you haven't yet, we have a couple unfinisehed homemade games (versions of tetris and the snake game) and some assorted demos and utilities.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Fri Jul 21, 2000 6:43 pm
Quote
> > I don't know about the cartridge casings...

> hack up old audio tape cases? they are of similar dimensions, im sure you could alter it to fit in the cart slot.. maybe you could epoxy the rom board into it, plus you could mount a label under the tranparent face(s)?

um.
yuck.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: in fact...
Post Posted: Fri Jul 21, 2000 7:14 pm
Quote
> I have now tried this and it works. I took a standard, single chip cart board (from Sonic), blew a 128k EPROM with the data (times four) and plugged it in - works just fine.

Radical!
Did you try it on a US/Euro bios with a fixed checksum? I never did get around to working on that, what I suppose I ought to do is write (or find) a little utility which fixes the checksum and codes and just add it to my compile batch file.

I've got to get my burner built. I identified everything I need from the catalogs that the electronics store lent me my I still need to get a price quote and see how much of it has to order.

and then I have to build the damned thing (shudder).
I wish maplins had a US division, they seem pretty damned cool from my browsing around their site, and I haven't identified anything in the US that doesn't seem either overly specialized, geared towards large sales, or just plain flakey.

Quote
> The question of whether 48k is possible - the only barrier I could see would be the US/Euro BIOS, and whether it would accept such a thing. It does seem strange that the card games were a maximum of only 32k in size.

I don't think the bios checksum checker would mind, so long as you report the cartridge size as 32k in the info bytes on the end and give a checksum for the first 32k only.

Probably the sms cards were based on some sort of industry standard (I'd bet the card connector doesn't have an a15) for 32k cards. Plus it'd probably cheaper that way.
I still don't see why they bothered with two seperate formats though... were the cards that much cheaper to make?


Quote
> All this terminology is very confusing! I remember from the BBC Micro days, the term "Sideways ROM" was used to refer to the same phenomenon...


weird, but an interesting way of looking at it.
or you could call it 'parellel rom' or 'multidiminsional rom'. For each bit, there's cooresponding bit in another dimension with it's own value...
  View user's profile Send private message Visit poster's website
ATani
  • Guest
Reply with quote
If anyone wants one of the EPROM burner/readers please email me.
Post Posted: Sat Jul 22, 2000 2:46 am
I am willing to build and send the EPROM burners for a small price (roughly the price of the parts). The current cost with shipping is about $20... i will need to recalculate with the latest prices that i just got... New prices should be significantly lower....

ATani
 
Mike
  • Guest
Reply with quote
Re: If anyone wants one of the EPROM burner/readers please email me.
Post Posted: Sun Jul 23, 2000 3:39 pm
ATani, what's your email address? I'm interested!!

Mike
 
  • Joined: 21 Apr 2000
  • Posts: 598
  • Location: Newcastle upon Tyne, England
Reply with quote
Re: in fact...
Post Posted: Sun Jul 23, 2000 4:53 pm
Quote
> Did you try it on a US/Euro bios with a fixed checksum? I never did get around to working on that, what I suppose I ought to do is write (or find) a little utility which fixes the checksum and codes and just add it to my compile batch file.


Not yet, but I will! What I'll do when I get time is put both US and Japanese bioses on a single EPROM with an external switch to flick between them, it saves having to open the SMS and swap chips over.


Quote
> I wish maplins had a US division, they seem pretty damned cool from my browsing around their site, and I haven't identified anything in the US that doesn't seem either overly specialized, geared towards large sales, or just plain flakey.


Maplin's aren't bad (certainly better than Tandy used to be!) and good value for smaller orders. It helps if you have the paper catalogue and can just punch in the part numbers on the online form, though, the site can be painful to browse at times.

The only times Maplin falls apart are when they don't have parts in stock and have to back order stuff - it takes forever.



Quote
> Probably the sms cards were based on some sort of industry standard (I'd bet the card connector doesn't have an a15) for 32k cards. Plus it'd probably cheaper that way.


It does have an _M0-7 (equivalent to A15) so you can access the full 64k address range. Mind you, for 48k you'd need a 64k ROM, which does seem pretty wasteful.


Quote
> I still don't see why they bothered with two seperate formats though... were the cards that much cheaper to make?


Was it a legacy thing from the earlier consoles? (Does the SG1000 have a card slot?)

I suppose having games on "credit cards" is a novelty selling point...


Quote
> > All this terminology is very confusing! I remember from the BBC Micro days, the term "Sideways ROM" was used to refer to the same phenomenon...

> weird, but an interesting way of looking at it.
> or you could call it 'parellel rom' or 'multidiminsional rom'. For each bit, there's cooresponding bit in another dimension with it's own value...


Now that would be *really* confusing... :-)

Mike
  View user's profile Send private message Visit poster's website
ATani
  • Guest
Reply with quote
atani@atani-software.net (NT)
Post Posted: Mon Jul 24, 2000 12:54 am
Quote
> ATani, what's your email address? I'm interested!!

> Mike
 
Reply to topic



Back to the top of this page

Back to SMS Power!