Jump to content
IGNORED

How to port a game to CV?


SiRioKD

Recommended Posts

Hi, how can I port a game to CV? This game is 256KB in size and uses an ASCII16 compatible mapping. The cartridge slot has chip select only for ROM area but I need 16KB of RAM at least and (as far as I understood) CV sports only 1KB of ram.

I studied the expansion connector a little bit but I cannot see how bypass the internal memory addressing circuit.

 

Any infos are appreciated.

 

Regards,

Saverio Russo / SC-3000 Survivors

Link to comment
Share on other sites

You are going to need to use a Megacart (or Megacart like) ROM layout and the game will need to use the Super Game Module (and this also gives you the MSX sound chip which will make your port easier), which will give you up tp 32k of Ram if you need it.

 

A number of MSX ports, use the bottom 16k Ram space to replace the Coleco BIOS with a MSX BIOS.

 

The Megacart info (from my book is as follows):

The MegaCart is a special design (originally by Bryan Edward) that allows ROMs to contain up to 1MB if required.
The cartridge can be several different sizes as follows:

  • 128K - 8 banks of 16K
  • 256K - 16 banks of 16K
  • 512K - 32 banks of 16K
  • 1MB - 64 banks of 16K

The first 16K of ROM is fixed to the last 16k section of the ROM and is located at 8000h to BFFFh on
the ColecoVision (and Adam).
The 2nd 16K area (C000h to FFFFh) can be changed to any of the banks in the cartridge (including the
last one) by reading from memory address FFC0h to FFFFh i.e. each location represents one of the
64 possible memory banks to select.
This also means the top 64 bytes (FFC0h to FFFFh) of each 16K ROM bank can’t be used.
Example Usage (from MegaCart documentation):

; For 128K Megacart (for 256K one I start on $fff0 up
; to SLOT_15 at $ffff)
SLOT_0: equ $fff8
SLOT_1: equ $fff9
SLOT_2: equ $fffa
SLOT_3: equ $fffb
SLOT_4: equ $fffc
SLOT_5: equ $fffd
SLOT_6: equ $fffe
SLOT_7: equ $ffff
; At start of code
ld hl,SLOT_0 ; Default slot of Megacart,
; but set again because user can do a ColecoVision RESET
call sel_slot
; My typical switching code
ld hl,SLOT_3
call sel_slot
; Slot selection
sel_slot:
ld (slot),hl ; Saves current slot, useful because in NMI
; routine sometimes I switch slots to play music from OTHER slot
ld a,(hl)
ret

 

Edited by Tony Cruise
Link to comment
Share on other sites

If you're porting an MSX game to the ColecoVision, it would be prudent to mention exactly which game that is, because there may be others who are working on a port of the same game, or the port may have been completed already and is just waiting to be released on cartridge.

 

Link to comment
Share on other sites

18 minutes ago, Pixelboy said:

If you're porting an MSX game to the ColecoVision, it would be prudent to mention exactly which game that is, because there may be others who are working on a port of the same game, or the port may have been completed already and is just waiting to be released on cartridge.

 

I'm just porting a new game with permission/support of the main programmer. There's any legal issue. Thanks tho.

Link to comment
Share on other sites

26 minutes ago, Pixelboy said:

If you're porting an MSX game to the ColecoVision, it would be prudent to mention exactly which game that is, because there may be others who are working on a port of the same game, or the port may have been completed already and is just waiting to be released on cartridge.

 

I'm just new in CV development, I bought my machine 2 days ago. I see many people talk about SGM but I didn't see available. Is it a "standard" to have it? Usually I make things for SC-3000/SG-1000 as admin of SC-3000 Survivors.

Link to comment
Share on other sites

59 minutes ago, Tony Cruise said:

You are going to need to use a Megacart (or Megacart like) ROM layout and the game will need to use the Super Game Module (and this also gives you the MSX sound chip which will make your port easier), which will give you up tp 32k of Ram if you need it.

 

A number of MSX ports, use the bottom 16k Ram space to replace the Coleco BIOS with a MSX BIOS.

 

The Megacart info (from my book is as follows):

The MegaCart is a special design (originally by Bryan Edward) that allows ROMs to contain up to 1MB if required.
The cartridge can be several different sizes as follows:

  • 128K - 8 banks of 16K
  • 256K - 16 banks of 16K
  • 512K - 32 banks of 16K
  • 1MB - 64 banks of 16K

The first 16K of ROM is fixed to the last 16k section of the ROM and is located at 8000h to BFFFh on
the ColecoVision (and Adam).
The 2nd 16K area (C000h to FFFFh) can be changed to any of the banks in the cartridge (including the
last one) by reading from memory address FFC0h to FFFFh i.e. each location represents one of the
64 possible memory banks to select.
This also means the top 64 bytes (FFC0h to FFFFh) of each 16K ROM bank can’t be used.
Example Usage (from MegaCart documentation):

; For 128K Megacart (for 256K one I start on $fff0 up
; to SLOT_15 at $ffff)
SLOT_0: equ $fff8
SLOT_1: equ $fff9
SLOT_2: equ $fffa
SLOT_3: equ $fffb
SLOT_4: equ $fffc
SLOT_5: equ $fffd
SLOT_6: equ $fffe
SLOT_7: equ $ffff
; At start of code
ld hl,SLOT_0 ; Default slot of Megacart,
; but set again because user can do a ColecoVision RESET
call sel_slot
; My typical switching code
ld hl,SLOT_3
call sel_slot
; Slot selection
sel_slot:
ld (slot),hl ; Saves current slot, useful because in NMI
; routine sometimes I switch slots to play music from OTHER slot
ld a,(hl)
ret

 

Thanks a lot for the info! Very appreciated.

Link to comment
Share on other sites

8 minutes ago, SiRioKD said:

I'm just new in CV development, I bought my machine 2 days ago. I see many people talk about SGM but I didn't see available. Is it a "standard" to have it? Usually I make things for SC-3000/SG-1000 as admin of SC-3000 Survivors.

Most ColecoVision fans who buy homebrew games own an SGM, the CollectorVision Phoenix supports it natively (without requiring the actual unit to be plugged in) and most emulators support it too, so you can consider it as mostly "standard". If you do decide to make use of the SGM, it is standard practice to have a routine that detects the SGM at boot/reset. If the SGM is not detected, then you should display a message on the screen and not allow the software to run any further.

Link to comment
Share on other sites

1 minute ago, Pixelboy said:

Most ColecoVision fans who buy homebrew games own an SGM, the CollectorVision Phoenix supports it natively (without requiring the actual unit to be plugged in) and most emulators support it too, so you can consider it as mostly "standard". If you do decide to make use of the SGM, it is standard practice to have a routine that detects the SGM at boot/reset. If the SGM is not detected, then you should display a message on the screen and not allow the software to run any further.

 

Oh I see. Where I can found an SGM?

 

I can use my emulator but for the release version I need to test it on real hardware as always.

 

"Team PixelBoy" is a software company/group right? I saw this somewhere but it's quite difficult to find the cartridges. Do you have a buyers list with booking?

Link to comment
Share on other sites

2 hours ago, Tony Cruise said:

You are going to need to use a Megacart (or Megacart like) ROM layout and the game will need to use the Super Game Module (and this also gives you the MSX sound chip which will make your port easier), which will give you up tp 32k of Ram if you need it.

 

A number of MSX ports, use the bottom 16k Ram space to replace the Coleco BIOS with a MSX BIOS.

 

The Megacart info (from my book is as follows):

The MegaCart is a special design (originally by Bryan Edward) that allows ROMs to contain up to 1MB if required.
The cartridge can be several different sizes as follows:

  • 128K - 8 banks of 16K
  • 256K - 16 banks of 16K
  • 512K - 32 banks of 16K
  • 1MB - 64 banks of 16K

The first 16K of ROM is fixed to the last 16k section of the ROM and is located at 8000h to BFFFh on
the ColecoVision (and Adam).
The 2nd 16K area (C000h to FFFFh) can be changed to any of the banks in the cartridge (including the
last one) by reading from memory address FFC0h to FFFFh i.e. each location represents one of the
64 possible memory banks to select.
This also means the top 64 bytes (FFC0h to FFFFh) of each 16K ROM bank can’t be used.
Example Usage (from MegaCart documentation):

; For 128K Megacart (for 256K one I start on $fff0 up
; to SLOT_15 at $ffff)
SLOT_0: equ $fff8
SLOT_1: equ $fff9
SLOT_2: equ $fffa
SLOT_3: equ $fffb
SLOT_4: equ $fffc
SLOT_5: equ $fffd
SLOT_6: equ $fffe
SLOT_7: equ $ffff
; At start of code
ld hl,SLOT_0 ; Default slot of Megacart,
; but set again because user can do a ColecoVision RESET
call sel_slot
; My typical switching code
ld hl,SLOT_3
call sel_slot
; Slot selection
sel_slot:
ld (slot),hl ; Saves current slot, useful because in NMI
; routine sometimes I switch slots to play music from OTHER slot
ld a,(hl)
ret

 

Hi Tony, I just had to know that you should have the right answer, LoL.

Saverio is porting my game, Freedom Fighter, to SC-3000/SG-1000 so then we will use his port ad base for Colecovision port.

We are trying to learn how to do so we can port also my future games (like Turrican, for example). So we surely need info about megacart, sgm and so on (you wrote a book about colecovision coding if I'm not mistaken, so maybe I'll buy it)

 

Many thanks to pixelboy too (we have a little chat via mail some time ago if you remember me. I asked you about some kind of music translator from MSX PSG to Coleco SN)

Edited by thegeps
  • Like 1
Link to comment
Share on other sites

2 hours ago, SiRioKD said:

Oh I see. Where I can found an SGM?

 

I can use my emulator but for the release version I need to test it on real hardware as always.

Opcode Games created the SGM and sells them in batches.  Latest news on the next batch of SGMs is below, but not good news unfortunately.  Normally one should sign up to the Opcode Games newsletter at their website - but the website seems to be broken at the moment so probably best to PM Opcode here on AtariAge or send him an email at info@opcodegames.com. 

 

 

Link to comment
Share on other sites

44 minutes ago, Ikrananka said:

Opcode Games created the SGM and sells them in batches.  Latest news on the next batch of SGMs is below, but not good news unfortunately.  Normally one should sign up to the Opcode Games newsletter at their website - but the website seems to be broken at the moment so probably best to PM Opcode here on AtariAge or send him an email at info@opcodegames.com. 

 

 

 

Thanks for the infos.

 

S.

Link to comment
Share on other sites

3 hours ago, thegeps said:

Hi Tony, I just had to know that you should have the right answer, LoL.

Saverio is porting my game, Freedom Fighter, to SC-3000/SG-1000 so then we will use his port ad base for Colecovision port.

We are trying to learn how to do so we can port also my future games (like Turrican, for example). So we surely need info about megacart, sgm and so on (you wrote a book about colecovision coding if I'm not mistaken, so maybe I'll buy it)

 

Many thanks to pixelboy too (we have a little chat via mail some time ago if you remember me. I asked you about some kind of music translator from MSX PSG to Coleco SN)

 

 

I am seriously looking into how these things are ported as well because there were a few titles on the MSX I want to port like Ball Blazer.

After Disassembling how they port Coleco Games to the MSX it seems they put it inside some kind of wrapper that remaps the data to be compatible with the MSX

This same technique is used on the Nintendo WII when playing old NES roms.  Nothing is actually disassembled, modified then compiled into a working version.

When I disassembled Dragons Lair rom that requires the SGM what it looks like is they copied a datapack into one 256k rom of sorts and changed the boot process to look for areas in the rom instead of a datpack.
Technically that seems the most logical process.  Bank switch into a memory address instead of using the EOS to load it into a memory address limited to 64k.

As long as the main program stays in the first 32K a bank switch doesn't care where the next 32k is 0-F are all 32k chunks.

I may even be wrong on that but it seems the most logical.  After that then you slap a new label on it and push it out the door.

This may be how all their ports are from MSX to whatever.  This is most likely why there was no spinner support for the MSX port of Front Line.


All this time I was taking a brute force approach in that I disassemble a rom, update what needs to be updated then compile it.

It is Z80 with all the same chips or a version of those chips which should be backwards compatible.
 

I disassembled Mappy and outside of the polyphonic tunes I have no idea why it needs the extra memory.  Same with a lot of these games.

If they were built from the ground up 16k of video ram, 1k of scratch ram and a 3.58 mhz Z80 cpu can do a lot.

 

When it comes to MSX a lot of their games are like DATA Packs in that the larger games are several rom chunks banked into different sections of memory.

The SGM, again I may be wrong, does the same thing with the added memory and sound chip.
So why not just call it the MSX-SGM?  Or the MSX expansion card that uses the Colecovision BIOS?

Either way, it is a cool piece of hardware that seems to be well designed for what it does.

 

  • Like 1
Link to comment
Share on other sites

6 hours ago, SiRioKD said:

"Team PixelBoy" is a software company/group right? I saw this somewhere but it's quite difficult to find the cartridges. Do you have a buyers list with booking?

All you really need are ROMs, right? If you do a search on these forums with the keywords "Team Pixelboy News Bulletin", and look for news bulletins dated December 25th, between 2013 and 2021, you'll find Team Pixelboy ROMs to download, many of which make use of the SGM.

 

Link to comment
Share on other sites

3 hours ago, Pixelboy said:

All you really need are ROMs, right? If you do a search on these forums with the keywords "Team Pixelboy News Bulletin", and look for news bulletins dated December 25th, between 2013 and 2021, you'll find Team Pixelboy ROMs to download, many of which make use of the SGM.

 

Nope, I'm talking about real cartridges, since the team did an hard job to convert it.

Box, manual, shell, PCB etc. 

No piracy for me. 😊 I download roms only if they're free or public domain/open source.

Link to comment
Share on other sites

49 minutes ago, SiRioKD said:

Nope, I'm talking about real cartridges, since the team did an hard job to convert it.

Box, manual, shell, PCB etc. 

No piracy for me. 😊 I download roms only if they're free or public domain/open source.

I think he is referring to they are already freely released.
A bunch seem to be released each Christmas so they are not pirated.
I mean seriously, if "Pixel Boy" says how to find the "Team Pixel Boy" roms I would take it as he's ok with it.

Edited by Captain Cozmos
Link to comment
Share on other sites

12 hours ago, Pixelboy said:

Most ColecoVision fans who buy homebrew games own an SGM, the CollectorVision Phoenix supports it natively (without requiring the actual unit to be plugged in) and most emulators support it too, so you can consider it as mostly "standard".

@SiRioKid...

 

Another run of the Opcode Games' SGM was planned for this September/October, but due to chip shortages, this new production run has been pushed back to early next year.

 

There were two production runs of the Phoenix and a third is still a possibility, but not looking like anytime soon. Collectorvision | Phoenix

12 hours ago, Pixelboy said:

If you do decide to make use of the SGM, it is standard practice to have a routine that detects the SGM at boot/reset. If the SGM is not detected, then you should display a message on the screen and not allow the software to run any further.

It would be nice if programmers got away from this "definitive" practice seeing as the Coleco ADAM Computer has the additional memory already that the Opcode SGM provides and if the game doesn't utilize the Opcode SGM's additional AY-3-8910 sound chip, there is no reason to stop the game from working on the Coleco ADAM.

 

There is an option or Coleco ADAM Computer users to either build or buy (when available) the ADAM Sound Enhancer. This Expansion Interface contains the AY-3-8910 sound chip and with the ADAM's extra memory, there is no reason that any and all SGM required games shouldn't work on the ADAM Computer.

 

ColecoVision Adam sound chip Ay-3-8910 - Share Project - PCBWay

 

Coleco ADAM Sound Enhancer - #FujiNet

 

An alternate option to add the additional 32K provided by the Opcode SGM to the ColecoVision is 8-Bit Milli's RAMboard. Again, it only provides 32K RAM and not the AY-3-8910 sound chip, but if a game only needs the additional RAM, there is absolutely no reason to prevent an SGM required game from running on the ColecoVision.

 

8 Bit Milli Games RAMBOard 32k - Assembled

 

Link to comment
Share on other sites

12 hours ago, SiRioKD said:

I can use my emulator but for the release version I need to test it on real hardware as always.

Some emulators that you might want to consider besides your own are CoolCV by Nanochess, ColEm by Marat Fayzullin, BlueMSX and OpenMSX as they all support the SGM. For on the go gaming/testing, if you have a Nintendo DS, DSi or 3DS, check out ColecoDS v7.6 by wavemotion.

 

Link to comment
Share on other sites

5 hours ago, NIAD said:

@SiRioKid...

 

Another run of the Opcode Games' SGM was planned for this September/October, but due to chip shortages, this new production run has been pushed back to early next year.

 

There were two production runs of the Phoenix and a third is still a possibility, but not looking like anytime soon. Collectorvision | Phoenix

It would be nice if programmers got away from this "definitive" practice seeing as the Coleco ADAM Computer has the additional memory already that the Opcode SGM provides and if the game doesn't utilize the Opcode SGM's additional AY-3-8910 sound chip, there is no reason to stop the game from working on the Coleco ADAM.

 

There is an option or Coleco ADAM Computer users to either build or buy (when available) the ADAM Sound Enhancer. This Expansion Interface contains the AY-3-8910 sound chip and with the ADAM's extra memory, there is no reason that any and all SGM required games shouldn't work on the ADAM Computer.

 

ColecoVision Adam sound chip Ay-3-8910 - Share Project - PCBWay

 

Coleco ADAM Sound Enhancer - #FujiNet

 

An alternate option to add the additional 32K provided by the Opcode SGM to the ColecoVision is 8-Bit Milli's RAMboard. Again, it only provides 32K RAM and not the AY-3-8910 sound chip, but if a game only needs the additional RAM, there is absolutely no reason to prevent an SGM required game from running on the ColecoVision.

 

8 Bit Milli Games RAMBOard 32k - Assembled

 

Does Adam sports at least 16KB? Does it has the same memory addresses as SGM?

Does the Adam sound enhancer have the same I/O ports as SGM?

Link to comment
Share on other sites

7 hours ago, Captain Cozmos said:

I think he is referring to they are already freely released.
A bunch seem to be released each Christmas so they are not pirated.
I mean seriously, if "Pixel Boy" says how to find the "Team Pixel Boy" roms I would take it as he's ok with it.

Oh. I misunderstood. If they're available for free is ok, even I prefer the real cartridges.

 

 

  • Like 1
Link to comment
Share on other sites

7 hours ago, NIAD said:

Some emulators that you might want to consider besides your own are CoolCV by Nanochess, ColEm by Marat Fayzullin, BlueMSX and OpenMSX as they all support the SGM. For on the go gaming/testing, if you have a Nintendo DS, DSi or 3DS, check out ColecoDS v7.6 by wavemotion.

 

Great infos.

Actually I'm using a customized version of GearColeco which allows me to debug realtime. For hardware testing I was thinking about porting my devkit interface to Colecovision. Actually works on SG-1000 / SC-3000 but is built for every platform.

IMG_20220621_123930.jpg

  • Like 2
Link to comment
Share on other sites

3 hours ago, SiRioKD said:

Does Adam sports at least 16KB? Does it has the same memory addresses as SGM?

Does the Adam sound enhancer have the same I/O ports as SGM?

Yes on the memory being the same between the ADAM and SGM (24K of RAM at the same addressing range) except that the ADAM does not let you replace the first 8K of the Coleco BIOS with regular RAM, and the SGM allows you to do that, if you really need 32K of RAM for your game.

 

Also, the ADAM doesn't have a "sound enhancer" at all, that's strictly a feature of the SGM. That's why an SGM detection routine usually doesn't just check if 24K of RAM is available, it also has to check the I/O port for the MSX sound chip, to distinguish between the cartridge running on an ADAM or a ColecoVision with an SGM plugged in.

 

Finally, plugging an SGM into the ADAM's expansion port works fine in terms of compatibility and detection (the SGM yields to the ADAM for the RAM, if I remember correctly). However, there's a problem with the sound output where the passthrough of the MSX sound chip through the ADAM and to the TV doesn't work properly (the volume is brought down to almost silence) because the designers of the ADAM never imagined that the expansion port would be used in this way to double the number of sound channels (because yes, it's possible to use the CV's native sound chip and the SGM sound chip in tandem for enhanced sound output).

 

Link to comment
Share on other sites

7 hours ago, SiRioKD said:

Does Adam sports at least 16KB? Does it has the same memory addresses as SGM?

Does the Adam sound enhancer have the same I/O ports as SGM?

I’ll defer to Pixelboy’s answer concerning the memory useage, but yes, the memory addresses between the ADAM and SGM are compatible.

 

The ADAM Sound Enhancer made by Chart uses the same I/O ports as the SGM and it’s creator tested all SGM required games that he  had available for  testing.

 

Concerning Coleco’s poor design of the ADAM’s audio output via the Auxillary 7-pin DIN Composite Video with Audio, this is a very well known and easily fixed issue that causes low volume output to a TV or Monitor when using the Opcode SGM and Coleco’s Exp. Mod. #1 Atari Adapter. One can use the available fix that is on www.adamarchive.org in the Technical directory or they have to raise the TV/Monitor volume up to a high level which then introduces unwanted noise. When using RF output, this is not an issue… the sound output works perfectly.

 

if you proceed with development of your game, I would recommend the usual test for the presence of additional memory provided by the SGM or ADAM and if found let the game play on even if the AY-3-8910 audio chip is not present. Just include a notice that any sound played via the AY chip will not be heard. I think this is a lot better approach than stopping the game from working altogether especially since there are a lot of people, and that number is growing, that strictly use an ADAM for all their CV gaming needs.

 

GearColeco is an outstanding emulator!!!

 

Edited by NIAD
Link to comment
Share on other sites

4 hours ago, Pixelboy said:

Yes on the memory being the same between the ADAM and SGM (24K of RAM at the same addressing range) except that the ADAM does not let you replace the first 8K of the Coleco BIOS with regular RAM, and the SGM allows you to do that, if you really need 32K of RAM for your game.

 

 

 

Are  you sure about that or are we talking about something else.
ADAM allows you to use 100% of any ram attached.
Of course the first 64k then the rest through bank switching.

 

If I have this right, booting starts at $8000 and from there you can do anything you want.
I have been experimenting with some code that Boots at $8000 and uses no BIOS routines just I/O in complete blank 64K by calling to port $7F
Colecovision you are stuck with OS7 without some kind of expansion being mapped in.

 

Heck...I'm old and my mind is going so who knows.

Link to comment
Share on other sites

3 hours ago, Captain Cozmos said:

Are  you sure about that or are we talking about something else.
ADAM allows you to use 100% of any ram attached.
Of course the first 64k then the rest through bank switching.

I'm not sure 100% about the ADAM, I'm just assuming that it works the same as the ColecoVision, since it's always possible that a ColecoVision cartridge will interact with the Coleco BIOS which is expected to be in the first 8K range, regardless if this cart is used on the CV or the ADAM.

 

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