Page 3 of 4

Re: Could the Dragon use CoCo banked cartridges?

Posted: Wed Jan 11, 2017 11:08 pm
by jmk
I don't have a Dragon (at the moment) but I do have a CoCo 2. So I should be able to find out whether it will work or not, as I've just ordered one of these flash carts: CoCoFlash

Which also seems to support this as well: Orchestra 90

While I wait, I've made the new storyline for the game, bu not much else: Glove+

Re: Could the Dragon use CoCo banked cartridges?

Posted: Thu Jan 12, 2017 2:21 pm
by Bosco
I'm trying to get my new (32k) game finished this year and putting it out on cartridge had crossed my mind too, even if it was just a one off.

Problem is I use a lot of self-modifying code, although I understand it's possible to program carts to copy code from the cart into Ram then jump to the necessary address to run the game?

That said, I'm not very familiar with the hardware side of things so it may never happen. :cry: :)

Re: Could the Dragon use CoCo banked cartridges?

Posted: Thu Jan 12, 2017 3:11 pm
by robcfg
I think that's what I did to Flagon Bird to make a ROM version.

It copies the binary data to the same position as the tape version and jumps to it.

What I don't know is if you can map the whole upper 32KB to the cartridge (less the 256 I/O port bytes).

I've seen 2x4KB and 2x8KB cartridges, but no 2x16KB ones though they may be well possible and not too difficult to get them done.

Re: Could the Dragon use CoCo banked cartridges?

Posted: Fri Jan 13, 2017 12:48 am
by jmk
If your game runs on a 32K machine, it might be possible to get it to run on a 16K cartridge. It depends on a few factors such as compressibility, code vs data balance and whether you have data that could be calculated instead of stored on the cartridge.

The simplest method is to simply compress the ~32K into the 16K cartridge and then decompress all of it to RAM. But, the chances of compressing something by 100% are pretty slim. If you can isolate which parts are code, data and variables, you'll have a smaller amount to compress.

Also consider that you actually have a 48K memory space when you use a 16K cartridge (32K RAM and 16K ROM in the memory map at the same time). You could rewrite some routines to suit the additional memory. If you have tables of data, you could calculate them with a ROM routine instead of storing them on the cartridge.

In my case, I tend to sort the memory usage anyway. I always have the variables at the start (meaning the start of the code is higher, making it easier to load from BASIC) and the data tables and code later. I ended up building some tables with small ROM routines, compressing my graphics using LZ77 and then compressing my level data with a ridiculously specific routine, in order to make it fit. Some of the code is run from ROM, some is copied to RAM and run from there (it was easier because of the banking).

You may have a publishing avenue, if John Linville is still interested in new games. His cartridges are 16K, but he was looking at adding the mapper to allow multiple 16K banks.

32K mapped to the upper half of memory is a technical possibility, according to an earlier post in this thread, but that's beyond my hardware knowledge and is not a feature of John's carts.

Re: Could the Dragon use CoCo banked cartridges?

Posted: Fri Jan 13, 2017 2:01 pm
by Bosco
Thanks for the info James. Plenty to think about there.

I suppose I ought to finish the game first before getting too carried away. :)

Re: Could the Dragon use CoCo banked cartridges?

Posted: Fri Jan 13, 2017 4:54 pm
by sorchard
@jmk: Great story line - I love it!

I'm also considering the use of a banked cart for something I'm working on. I haven't tried yet but I think it would be possible to test banked software under xroar by making use of MPI support. That should give four ROM images and a means of selecting between them in software with the only code difference (MPI vs banked cart) being the address of the select register.

As far as memory organisation goes, I quite like using named sections and let the assembler do the work of gathering stuff together. This gives me the freedom to split the project into many files, while keeping related code and data together in the source. This would also come in handy for putting all the self-modifying code together for copying to RAM.

@Bosco
In development hell, game finishes you ;)
To be taken very lightly of course. The reality is that life has a habit of keeping me busy with other stuff just when I think I might be on a roll with the coding...

Re: Could the Dragon use CoCo banked cartridges?

Posted: Fri Jan 13, 2017 9:12 pm
by sixxie
Would be pretty easy to implement a "proper" banked cart if you can point to a spec...

Re: Could the Dragon use CoCo banked cartridges?

Posted: Fri Jan 13, 2017 9:39 pm
by robcfg
Would a 32KB non-banked cartridge possible?

Re: Could the Dragon use CoCo banked cartridges?

Posted: Fri Jan 13, 2017 11:52 pm
by Bosco
sorchard wrote: In development hell, game finishes you ;)
I've been to dev hell many a time Stew. Dragon dev is heaven.... if a little slow going. :lol:

+1 for XRoar banked cart emulation.

Re: Could the Dragon use CoCo banked cartridges?

Posted: Sat Jan 14, 2017 12:12 am
by bluearcus
A 32k cart should be possible... the !DSD line would have to be used to disable the internal ROM.