News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Badstarr

Idea! A CPC+/GX4000 Cartridge Emulator?

Started by Badstarr, 16:17, 05 September 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Badstarr

Hi guys!


I have been thinking a bit... With all the clever add ons we have for the CPC these days like Megaflash and HxC, why (unless I'm mistaken?) has no one made a Cartridge Emulator? I can't seem to find any evidence that such a project has been attempted before but correct me if I'm wrong.


Anyway, my idea is, to take a plus cartridge, preferably NO EXIT remove the ROM and replace it with a suitably large RAM chip, then through some electronic wizardry, interface an SD card via a PIC, or ATmega or something like that so that it copies a Cartridge image into the RAM chip which the Plus/GX4000 can use thinking its the real thing. This would mean the modded cartridge would contain an ACID chip and function as a medium to access the image.


I'm no electronics genius, I do have some knowledge as I have a degree in sound engineering and understand the basics, but have never attempted something complex as this or even made anything that includes PICs etc. Due to a screw up when I ordered a copy of switchblade and fired it up to find it was actually NO EXIT I now have a spare cartridge to play with!


Anyone think its possible? I would love to try to produce something like this my self but I think I need to do a lot of reading up on the subject first and I get easily distracted these days.


Anyway... anyone have any opinions/thoughts?
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

steve

#1
Could the Megaflash PCB be modified so the user can either plug into the expansion port for read/write or the cartridge port for read only?

I also like Badstarr's idea, but I'm not the one who will have to design it.

Gryzor

I *think* it has been discussed to some extend.

Well, we could all chip in and make the prototype a birthday present for Bryce II's first birthday ;)

steve

Another possibility might be to have a dual port ram card, one side plugs into the cartridge port, and the other side connects to the expansion port.

It might even be possible to connect two machines together this way with one being the development machine and the other being the target machine.

Badstarr

Hey, great to see some responses already! @Steve, I was thinking about checking out any Megaflash schematics to see if it could form the basis of my idea. I'm sure someone with more experience with this sort of project may chime in soon!


I would be most interested in learning how to retrieve data from the SD card and supply it to intermediate RAM and how this sort of thing is achieved in the Megaflash (I assume this is how it works but haven't checked yet!). I totally want to take on this project and make something that works, but my progress may be slow as I'm someone that is always busy with loads of car, music and general repair projects. Plus I need to get up to speed on the necessary skills so I have the faintest clue on what I'm doing!.


I think the first step would be to create a plus cart with a RAM chip installed, then dump some 1s and 0s to it using another device and read them back on the CPC. the next step would be to devise a way to pull info from the SD card and dump it to the RAM then access it in the CPC. Then we have a proof of concept. This could be difficult without access to amsdos/basic but if for example we can dump the amsdos ROM to the RAM then boot as normal then its basically job done!


Ideally eventually I would like this device to work in the following way, The emulator plugs into the cartridge port and the a plus cart plugs into the emulator and "borrows" the ACID chip, if this is possible then there would be no need to destroy a cartridge. And the emulator could be permanently plugged in with the burnin rubber/basic cart always available.
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

steve

I am pretty sure you cannot write to a device plugged into the cartridge port, so it would also need to connect to an expansion port.

For SD card , I would suggest the HXC floppy emulator since the work has already been done and many people have them already.

You might consider modifying the man in the middle cartridge to take a 512KB battery backed ram chip, this would plug into a standard cartridge and then disconnect to attach to an expansion port memory interface, the only risk that springs to mind is when you remove the cartridge from the cartridge port, the man in the middle cartridge may get left behind, still plugged into the cartridge port, and if the interlock no longer functions, it will be possible to remove the cartridge whilst the power is still on causing a lot of damage.

steve

If the device connects to a second CPC/Plus, then it offers the possibility of writing games that run on two machines simultaneously.

Badstarr

That's correct Steve you can't write to it as far as I know, what I had in mind is that you select a ROM image and load it to the RAM, before you power up the CPC so when the CPC boots it sees a cartridge with a valid 'Pseudo ROM' and executes it.


So what I intend to do, most likely with battery backed up RAM is dump an image (through some means) to a modified cart and hopefully it will work, then all the SDCard gubbins can eventually be bolted on.


If I understand correctly, a Plus Cartridge cannot be used in the expansion port as it can not be addressed correctly, however, I haven't read the plus documentation in a while so I might be getting something mixed up so correct me if I'm wrong :-)


If it can be used in the expansion port then the Megaflash can probably potentially already do the job!
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

Badstarr

Almost forgot! a second interlock could be used to prevent accidental removal of the cartridge. However if the acid chip can also be emulated and we can build a solution in a box, then I would think it would be as safe as using the real thing.
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

Bryce

Hi Badstarr,
          the idea you have would work, I've looked at it in detail before and made a few similar projects such as the Multi-Cart, where four games fit on one Cartridge: http://www.cpcwiki.eu/index.php/Multi_Cartridge (still needs an ACID however) and the Man-in-the-Middle Cartridge, which as you described above "borrows" the ACID from an original Cartridge: http://www.cpcwiki.eu/index.php/MITM (This is short enough for the second interlock tab on the original Cart to block the removal while switched on)
The problem with the SD solution was the fact that there are so few Cartridge Games available, that it's cheaper just to put a large Flash on the board, than to add all the hardware required for SD read/write etc. The Multi-Cart only has 512K, so it only has 4 games, but it was also just an experiment or proof of concept. I could just as easily have put a few MB of Flash on there and had all the games ever released on one cart and it would still be cheaper than a PIC / ATmega with SD functionality.

Bryce.

MacDeath

The answer is : why try to do a cartridge emulator when you actually need  new cartridge production.


You don't emulate a cartridge... well ok, you can emulate the ACID chip inside the cartridge...

The actual problem are...

==who will fund this ? (bringing up the cash needed to launch the first batches, provided you can't really tell if you'll get this ca$h back...)

==What exact solution to produce ?
"Many" solution actually exist and not everyone aggree on what to do.

==What to put on those ?
Is it to copy existing games or to actually produce new products/Softs ?


the problem...
Peoples need some cartridge dev.kit to actually start to develop... Also peoples are awaiting for the "actual company to produce those" to really get started.


No offer = no market...

Another problem...
While C64 cartridge can actually get some success, the Amstrad PLUS is quite a limited market.

Bryce

I fully agree, I know first hand how much money you have to spend before a project like the MegaFlash is ready to release and even if it's only a small batch being produced, the sums you need to pay up front are substantial and it's still a huge gamble whether you ever get your investment back. But I don't think money is the issue in this case, it's more of a who would really want it. It's no good investing months of time and all that money, if the project is only going to interest a handful of people.

Bryce.

Badstarr

Thanks for confirming my idea can work Bryce! I know there are not very many plus games available on cartridge when compared to other platforms, however, the reason why this idea came to mind is that people could possibly start to produce cart based games and the SD card solution makes it fairly easy to run the images on a real plus/gx4000. In other words, once you have the board installed you only need to transfer stuff via an SD card. But I totally understand why SD access seems overkill right now.


However, I'm sure with some tweaking, it could be possible to 'stack' cart images together, using the RAM as a buffer, sort of bank switching. This could mean some pretty epic stuff could be achieved software wise. And just to wheel it out again...Street Fighter II anyone? Well it's only the limits of my imagination I suppose. Some 3D stuff maybe?, Perhaps classic CPC stuff instantly available on cart on power up? I dunno... I guess I will give it some more thought, but I reckon I'll still give it a shot over the next few months or so.


Anyone else dream up some uses for this sort of device?


Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

Bryce

#13
Technically speaking, you could develop a 256K - 512K game for the CPC, that ran on all CPCs and ran directly from the MegaFlash. Just noboby's done it yet....

Bryce.

Edit: With detection for Plus / 128K etc so that the game made the most of the CPC. Plus a seperate detection whether it's MacDeaths CPC, in which case DMA and ALL colours must be used :D

steve

If you want to load programs from SD card then it would be better to leave the basic/os cartridge in the cartridge port and have a 512KB ram card attached to the expansion port then you would not need the acid chip and any programs developed could be written to run on a cpc or plus according to which machine it is loaded into.

The same card (with a different connector) would also fit the CPC expansion connector, increasing the number of people who would buy/build it.
You can get a 512KB ram chip with battery backup and real time clock in the same package.

Badstarr

You do have a good idea there steve, however, I don't think cartridge images would work through the expansion port without being patched as I believe there is a specific address range reserved for the cartridge port so the programs would be looking for data in the wrong place? I still haven't checked the plus tech docs as of this time though.


What I thought would be a good idea would be to have the Amsdos rom loaded into say one RAM bank, and have a second with a ready and waiting image then simply power down, press a button, power up and game/prog loads up instead, or you could have parados etc instead. Then we wouldn't have the old Burnin Rubber loads up when you get distracted which can become a little tedious. 


To a large extent, I suppose the Megaflash has ROM games covered if someone wants to make some, its just a case of, can plus carts like Pang for example be loaded through the Megaflash and work correctly? If it can then a cart emulator becomes unnecessary, and I will be buying a megaflash a lot quicker than I thought I would be! But what about GX4000 users? I assume there are a few out there!


I still personally like the idea of the cartridge emulator, even its just for the pure geek factor of being able to say, there I did it lol!
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

MacDeath

#16
GX4000 sucks... it has no way to save scores or games progression hence it must stick to "low level arcade" games.

Also, I prefer my console with a Keyboard, DiskDrive and some real extension ports....

So I prefer a computer i guess...


While sticking in 128K roms as were the official cartridge, the RAM difference is somewhat not really usable...

You really must compress like a pork to get actual use of it.


But if you concieve a 512K cartridge and Disk support, then having 128K RAM can really be usefull...


Despite supposed to features Hardware sprites, the PLUS/GX4000 capabilities on the matter are quite unsufficient... and you may still need some soft sprites routines...Extra RAM could then be used to pre-modify existing ROM sprites or tiles perhaps...Or to uncompress some datas more easily, or whatever...

You also get some extra room to work in full screen or doublebuffering perhaps...


Saddly a 64K or 128K RAM Amstrad are actually quite different machines (while being exactly the same minus some Disk support or whatever).

You can simply code and program it differently provided enough RAM/ROM to really manage better CPU performances.


Just have a look at Fano's work just in getting RickDangerous or R-Type into 128K RAM instead of 64K.


But ok just exploit 512K ROM + 64k RAM can still kick serious butts as 512K is something like 1 disk and half...(3" disks)

redbox

Quote from: Badstarr on 21:38, 05 September 11
What I thought would be a good idea would be to have the Amsdos rom loaded into say one RAM bank, and have a second with a ready and waiting image then simply power down, press a button, power up and game/prog loads up instead, or you could have parados etc instead. Then we wouldn't have the old Burnin Rubber loads up when you get distracted which can become a little tedious. 

If you have a spare cartridge and an EPROM burner then you can make a patched Plus System Cartridge.

Badstarr

That's the sort of thing that interests me Macdeath, having access to disk as well as the 512k RAM/ROM in the Cartridge. So as well as playing some classics like Switchblade and Pang, we can have new software that exploits the CPC+ in new ways. Just using Street Fighter II as an example, from what I have read, one of the biggest barriers to getting a good/impressive version is memory, so maybe this could be overcome with a combination of Cart and Disk. I'm not saying SFII is the only reason why something like this would be useful, well certainly to me anyway.


I like the idea that it may be possible to automate some sort of cart ROM switching so there is in effect, no 512k limit.


I intend to read the relevant tech docs today to get some ideas. Like I said earlier though, if Cart games can be loaded via Megaflash, then my idea is not necessary. Hopefully reading the specs properly will give an answer to that.
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

Bryce

Saving the games to MegaFlash won't be the problem, but the game will need to be patched somehow to switch to the correct 16K ROM during loading.

The reason why more Cartridge Stuff doesn't exist is that no good / cheap alternative for the ACID has been found. The functionality of the ACID has been documented by nocash, but no realistic hardware solutions have been made. As soon as someone does this, then the Cartridge possibilities are endless.

Bryce.

Badstarr

You just beat me to it Bryce! I was going to say something pretty much along those lines having just read up on how the cartridges ROMs are addressed. As I understand it, this is handled via the ASIC. Basically it takes data from the Cart and maps it via the ROM mapping port, DFxxh to pages 128-159.


If I'm understanding correctly the ASIC is simply routing the cart to the expansion bus. A ROM installed at the expansion bus would take precedence over the cartridge ROM anyway. So it seems to me that a ROM that occupies the same addresses (over 127) could maybe loaded by typing |GAME from Basic?   I assume this is how the Burnin Rubber game is selected, so in a way the ROM in the expansion bus would hijack the process?


I of course could have gotten this completely wrong but maybe all that would be needed is some code added to the ROM to ensure it loads to the correct pages?
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

Powered by SMFPacks Menu Editor Mod