Jump to content
IGNORED

Reverse Porting?


Omega-TI

Recommended Posts

I should note too, that it doesn't require the F18A. I was planning to add F18A enhancements (sprites and bosses, at least), but the base game still runs on the 9918 (heck, it only needs A for the title screen). The ColecoVision has the same A/V chipset as the TI, which makes it nice to play with. ;)

Link to comment
Share on other sites

I did ask Rasmus some time ago how easy it would be to port. But i believe the source code is needed to do this. Was wondering if there are other ways eg. A layer between the other console game and TI platform. Or is mess a better solution to play the games on the real emulated console. The problem is learning all those new command structures to even start it :-)

Link to comment
Share on other sites

I did ask Rasmus some time ago how easy it would be to port. But i believe the source code is needed to do this. Was wondering if there are other ways eg. A layer between the other console game and TI platform. Or is mess a better solution to play the games on the real emulated console. The problem is learning all those new command structures to even start it :-)

Link to comment
Share on other sites

You asked Rasmus how easy it would be to port my game? Or to port in general?

 

The TI and the ColecoVision have the same VDP and soundchip, but different CPUs and memory maps. Starting from source is slightly easier, but you still need to change all the hardware-specific access routines.

 

If we assume single direction (Coleco -> TI) for the sake of this discussion, then the differences we are dealing with are spelled out here:

 

ROM size - 32k Coleco, 8k TI (or 24+8k RAM space for non-cart)

RAM size - 1k Coleco, 256 bytes or 32k TI depending on desire to use memory expansion

VDP - same, hooked up differently

Sound - same

CPU - Z80 @ 3.5Mhz Coleco, TMS9900 @ 3Mhz TI.

 

The first problem is simply memory. If you had a 32k cart that used most of the 1k RAM space, you'd have a hard time fitting it on the TI assuming 1:1 code space. But there's always a way to save some memory. ;)

 

CPU - if you don't have source code, it's theoretically possible to write a tool to translate Z80 code into equivalent 9900 code. The Z80 has some repeat instructions that the 9900 would have to fake, but otherwise it's reasonably feasible. A problem with a machine translation is there isn't likely much feasibility of optimization, meaning that every Z80 instruction becomes at least 1 TI instruction. This means it's likely to take up more space, and run more slowly. The 9900 already runs slower than the Z80 (and that's just taking clock into account, most instructions also take more clocks than the Z80).

 

The VDP and sound on the Coleco attach to a separate address space, rather than being memory mapped. However, most Coleco software uses hard-coded instructions to talk to them, which makes porting easier.

 

The Coleco also has an 8k BIOS ROM that lots (?) of the official games use, per Coleco's requirement, so we'd need to support all the code in there as well.

 

One last difference is that the ColecoVision's VDP vertical blank is a non-maskable interrupt - meaning you can't control when it happens. A worse effect of the same thing is that on the TI, we can't control what the vertical interrupt does until after the console ROM is done with it. This means we can't fake it by just leaving interrupts enabled, we would need a little extra code to do the best we could with it. (In practice, this will usually be doing what we usually do, and it tends to work).

 

Porting a newer, C-based program that you have source code for? That's a little easier. You can just replace the I/O functions, and if it fits in memory, it should run. I've done this both ways, porting Mr Chin from Coleco to the TI, and porting both Super Space Acer and Waterville Rescue to the Coleco. In all three cases, that's all I did, replaced the I/O functions and tweaked up the vertical interrupt handling.

 

I haven't ported Mario Bros because it introduced another factor - the Megacart. The Megacart is a cartridge that divides the 32k space into two 16k spaces - one fixed, and one bankable. We have no equivalent on the TI, or even a way to come close on the cartridge port. This means re-working a lot of the code to work with a more constrained banking system. (Although, I /just/ thought of this... AMS could do it. Now I want to try that... ;) )

 

For Super Space Acer, I ported my libti99 to the Coleco, and I've been tweaking it up with a view to cross-platform. If I do everything right, there's a chance that the port will be greatly simplified. We'll see. ;) For a 32k cart it should be a straight re-compile, but this one is another Megacart. I'll still need to do some work to make the paging right.

  • Like 2
Link to comment
Share on other sites

There is one option there, Tursi, but it is much more limited than the version used by the Coleco. TI used the first 4K of the ROM space as a stable zone that was always present, and only changed code in the last 4K. That may be nowhere near enough to do what you do on a Coleco, but it does use a similar scheme in a smaller space. AMS memory will definitely get you there too--and offers a lot of usable space. :)

Link to comment
Share on other sites

Hi Tursi. It was more a generic question to Rasmus that time as I was curious how to get these new games on the TI like Flappy Bird. I did not realise you also did porting,great explanation! Just thinking out loud maybe these programs can be converted using a collecovision to ti compiler or msx to ti compilers? If i remember correctly that was the purpose of msx to be interchangeable with other msx systems and they use also a same graphical chip? There were games like Pengu. Chucky Egg. But like you mentioned a Super Marios Brothers would be ultimate.

Link to comment
Share on other sites

There is one option there, Tursi, but it is much more limited than the version used by the Coleco. TI used the first 4K of the ROM space as a stable zone that was always present, and only changed code in the last 4K. That may be nowhere near enough to do what you do on a Coleco, but it does use a similar scheme in a smaller space. AMS memory will definitely get you there too--and offers a lot of usable space. :)

Yeah, it's true, I can still do a mixed fixed/banked space, but with only 8k to put it in, it gets a lot tighter, especially with compiled code. I'm building SSA with the 8k banking size in mind, but I will probably still require the 32k just to keep my sanity. ;)

 

If i remember correctly that was the purpose of msx to be interchangeable with other msx systems and they use also a same graphical chip?

Yes, the MSX has the same VDP, same CPU, and a similar (though slightly more featured) sound chip. There are people here on AtariAge who regularly port from MSX to ColecoVision, but I'm not aware what their process is. If the memory map is similar enough, it may be as simple as finding the I/O interfaces and pointing them to the right ports (at least for the basics).

 

But like you mentioned a Super Marios Brothers would be ultimate.

Not Super. ;)

  • Like 1
Link to comment
Share on other sites

It was more a generic question to Rasmus that time as I was curious how to get these new games on the TI like Flappy Bird.

 

I didn't port any code for Flappy Bird - I just looked at the different versions out there and made something similar.

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