Login
Back to forumReply to this topicGo to last reply

Posted By

zzarko
on 2021-01-08
07:11:29
 Adding a new cartridge to VICE's Plus/4 emulation

As my friend and I are working on a banking eprom cartridge for Plus/4 line of computers, I'm interested to add a new cartridge to Plus/4 emulation in VICE, for testing purposes.

I have looked at the source code of existing cartridges, but I'm unsure where I need to make changes to make it work. It looks to me that I would need to change around 10-15 files for that, but I'm still not sure what goes where and why.

I wanted to ask is there maybe some documentation about what needs to be changed/added and where for a new cartridge to be emulated?

Posted By

Csabo
on 2021-01-08
08:43:35
 Re: Adding a new cartridge to VICE's Plus/4 emulation

Hey!

I hope I understand your question correctly. AFAIK, you should not need to change the source code for VICE (or any other popular emulator) to support cartridges - they all do this out-of-the-box.

In VICE, click File | Attach Cartridge Image.

In YAPE, click Machine | Configuration | Browse.

For resting, I would strong discourage using VICE; the emulator isn't good. Be sure to use either YAPE or Plus4Emu. You can find both of them in the Tools section.

Posted By

gerliczer
on 2021-01-08
09:00:01
 Re: Adding a new cartridge to VICE's Plus/4 emulation

@Csabo: I think, you are wrong. It seems to me that the cartridge they make would add more than 2x2x16kB ROM banks to the system. That certainly needs modification.

@zzarko: Thank you for your interest in our machines. Unfortunately, AFAIK, there are no people frequenting this site involved in the VICE project. Your best chance would be contacting them directly. By the way, there was in the ancient times some similar product. Do you plan something compatible? Even if not I'd suggest to reuse the original I/O space mapping. That you can find here: I/O Area Map.

Posted By

siz
on 2021-01-08
10:30:27
 Re: Adding a new cartridge to VICE's Plus/4 emulation

gerliczer is right. Out of the box VICE, YaPE and plus/4 emu support the simplest ROM extension cartridges. To implement a banking logic you have to emulate the banking logic too (like the one for 256k RAM).
And he is also right that maintainers of (or other people who are familiar with) the emulator sources are not frequent here.

Posted By

Luca
on 2021-01-08
10:44:08
 Re: Adding a new cartridge to VICE's Plus/4 emulation

Have to second Csabo, I've read the post but didn't actually understand the request, so I would have finished to give him the same answer happy Btw, I've had the change to meet zzarko both in Forum64.de and TouTube today, giving him some hints when needed about different questions wink

Posted By

zzarko
on 2021-01-08
12:47:37
 Re: Adding a new cartridge to VICE's Plus/4 emulation

Thank you all for the answers, and especially to Luca who already helped me on forum64. My friend Marko is in charge of hardware, and we are making something kind-of-similar to Magic Desk Compatible Cartridge for C64 (https://github.com/msolajic/c64-magic-desk-1024k), but now for Plus4/C16/C116.

Current prototype with 64K is tested on all three of the machines and for now works as it should (including banking). The final goal is to make hardware and software so that anyone can assemble their own compilation of programs for it (as is the case with current C64 version), probably up to 1MB in size. Software will be fully open source (PC/Python and Plus4 part), and probably hardware too.

Posted By

zzarko
on 2021-01-08
12:48:12
 Re: Adding a new cartridge to VICE's Plus/4 emulation

Anyway, we would be much faster with testing if we could implement banking cartridge emulation in any emulator. VICE is fully open source, that's why I asked initial question (and it runs on Linux!). I also found some YAPE SDL port from about 5 years ago (https://github.com/calmopyrin/yapesdl) that I may also give a try (I do not know if current YAPE source is available, but from what I have seen it is windows only, so not for me).

Also, is it better to ask here about Plus4 programming (I have more questions, as I do not know about the machine as much as I know about C64), or should I continue on Forum64, where I initially found raster code?

Posted By

zzarko
on 2021-01-08
12:48:40
 Re: Adding a new cartridge to VICE's Plus/4 emulation

First code prototype with 16k ROM can be seen here:
https://www.youtube.com/watch?v=Y_yv0J647sM
At the start, Plus4 source code is compiled, prg files are added to the cartridge image and then that image is run in VICE.

Posted By

zzarko
on 2021-01-08
12:52:25
 Re: Adding a new cartridge to VICE's Plus/4 emulation

Cartridge initialization and program starting was taken from this code:
https://github.com/cbmuser/gamecart_plus-4

(sorry for multiple posts, I was geting some spam filter messages when I tried to put all in one post)

Posted By

gerliczer
on 2021-01-08
14:53:39
 Re: Adding a new cartridge to VICE's Plus/4 emulation

Some remarks.

I checked your project page. To my best knowledge, there was never a Magic Desk Cartridge for the 264 series machines, therefore there's nothing to be compatible with. Unless it is necessary for some reason to design it differently I'd suggest to use the $FDFE address for Banking Control as that is already "reserved" for such a thing.

There's no need to add a Reset Button to the 264 compatible cartridge design as there's such a button on the machines and it probably wouldn't work on the board as the /Reset signal is buffered, IIRC.

If your ROM content won't try extending the system seamlessly then there seems no problem with that kind of start-up code. Otherwise I'd suggest studying either the built-in 3-Plus-1 software initiation or the Octasoft Basic 7.0 Cartridge's operation.

That SDL YAPE should be quite good as it is the base of the online emulation used here and there in this site for example to play games. But you should contact Gaia for further information. Besides YAPE, there's another excellent emulator called plus4emu which is an open source portable software, has Linux, Windows and in some builds maybe ever MacOS distributions. You can find it on github: https://github.com/istvan-v/plus4emu.

Also, you should register here so you could write longer posts. Luca will surely help with that.

And I think there are at least a handful of people here who could help you with programming these machines.

Posted By

zzarko
on 2021-02-26
11:27:55
 Re: Adding a new cartridge to VICE's Plus/4 emulation

It would be nice for me to have an account here, so how could I proceed with that? I haven't seen a registration form, just Login, but I could have missed it.

Many thanks for plus4emu link, I'll look at its code too.

I know that there was no Magic Desk for 264 series, but our prototype hardware is in part based on that solution, and the software is very similar. Actually, I was able to use at least 70-80% of C64 ASM code, and PC/Python part is 99.9% identical.

I have Plus/4, C16 16k, C16 64k and C116 and we tested the prototype cartridge on all of them, and so far it is good. Next step is to make a 512k or 1MB version, and to test that one.

EDIT:
VICE team wants to expand cartridge support for their Plus/4 emulation, and I got this message: "I need as much info on plus4 cartridges as possible - perhaps you can throw some links at me :) what i need to know is the different types of cartridges that exist, what kind of control lines exist at the userport, and the different "blocks" ROM and IO that can be used by cartridges. links to different kind of cartridge dumps would be super helpful too"

I know about several pages form Plus/4 Encyclopedia here that could be helpful, but has anyone have any more links that could be recommended?

EDIT2:
Initial support for banking cartridges is added by groepaz to VICE's Plus/4 emulation:
https://github.com/VICE-Team/svn-mirror/releases/tag/r39807
and in latest snapshot it is quite usable, at least with cartridge developed my Marko and me:
https://github.com/VICE-Team/svn-mirror/releases/tag/r39830



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon