VIC20 .crt format ... for real :)

You need an actual VIC.

Moderator: Moderators

Post Reply
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

VIC20 .crt format ... for real :)

Post by groepaz »

So well, those who follow VICE commits and/or nightly builds may have already noticed it, i am in the process of added .crt file support to xvic. The emulator itself already has working support for it, cartconv still takes a bit more refactoring and cleanup (especially for creating "generic" cartridges in a good way).

In any case, the format is as close as possible to the existing C64 format, the only VIC20 specific things right now is the changed header (which says "VIC20 CARTRIDGE") and that i bumped the version number to 2.0. Besides that it uses the following .crt IDs right now:

0 - generic
1 - Mega-Cart
2 - Behr Bonz
3 - Vic Flash Plugin
4 - UltiMem
5 - Final Expansion

Detailed documentation will follow later when everything is implemented and working and tested (i am working on an updated crt spec with some comments etc while doing this)

Contrary to an earlier proposal, the generic type does not try to cover certain special cases, because this keeps everything much simpler and straightforward. Instead it does only handle loading into blocks 1/2/3/5 - which already covers a whole lot of cartridges anyway. All other cartridges will require a seperate ID (which can be used by all similar cartridges of course). The "tricky" type in the earlier proposal seemed a bit overengineered and too complex to justify its existance only to save a handful more seperate crt types. That means if you already have code for the C64 .crt format, it is almost trivial to also use it for this Vic20 (and soon also Plus4) variant.

Now, since i am not that much into VIC20 things, here are some questions :)

- for generic cartridges, when a block is used only partially (eg the upper half of a block), should we mirror the rom into the other half? My guess would be that it was common to use the cheapest way, which usually ment creating mirrors. Interesting here are the cartridges that will not work with or without a certain mirroring scheme.
- do you have more examples of edge cases (other than the ones mentioned in this thread)? for those i'll have to make extra IDs and support those in xvic
- for the above mentioned extra types i'd like to know what block they start in

shoot! :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: VIC20 .crt format ... for real :)

Post by Mike »

groepaz wrote:- for generic cartridges, when a block is used only partially (eg the upper half of a block), should we mirror the rom into the other half?
VICMON only maps into the lower half of BLK3 ($6000..$6FFF) and Programmer's Aid only maps into the upper half of BLK3 ($7000..$7FFF), and both cartridges can be used together in a cartridge extender. Likewise the ROM of Super-Expander also only used the lower half of BLK5 ($A000..$AFFF).

This had been eased by the fact that the often used 2332 PROM has a CE2 pin, which is either active-low or active-high as bond-out option. CA12 then is connected to CE2 (or /CE2) to select the correct half of BLKx. Even "worse", the IEEE-488 cartridge *only* goes to $B000..$B7FF - it's a 2316 PROM with *three* CS inputs (connected to CA11, CA12 and /BLK5): VIC-1110 IEEE 488 cartridge (schematic).
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: VIC20 .crt format ... for real :)

Post by groepaz »

Interesting.... that sounds more like a limitation of xvic than the .crt format to me though.

So if we make "no mirror" the general case (and assume a smaller ROM when the block is not fully occupied), are there cartridges that will no more work? :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: VIC20 .crt format ... for real :)

Post by groepaz »

Just comitted updated cartconv, you can now create vic20 generic carts too... except those that have a "hole" in them (eg block1+block5), will look at adding this next

i have found the following variants for testing so far:

0-generic-2000-a000-DonkeyKong.crt
0-generic-4000-4k-vicmon-sys16384.crt
0-generic-4000-6000-Adventureland-sys32592.crt
0-generic-6000-4k-vicmon-sys24576.crt
0-generic-6000-a000-JungleHunt.crt
0-generic-7000-4k-programmersaid-sys28681.crt
0-generic-b000-2k-victool-sys45056.crt
0-generic-b000-4k-vicmon-sys45056.crt

plus superexpander, mikroassembler and rabbit-tape-turbo - these will require some extra support.

if you stumble about additional variants, please tell :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: VIC20 .crt format ... for real :)

Post by groepaz »

OK, so now it also handles multiple input files, so you should be able to convert existing dumps, like

cartconv -t vic20 -i BuckRogers-6000.prg -i BuckRogers-a000.prg -o BuckRogers.crt

crt to prg does not work correctly yet with those files, but thats not terribly important, i guess

please test!

PS: we have automatic builds for each commit now, check https://github.com/VICE-Team/svn-mirror/releases
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Post Reply