Amiga CD32 and Amiga CDTV Cores?

KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

Given that Minimig is one of the most mature, if not the most mature core in the MiSTer ecosystem, I think it'd be cool if the Minimig had a consolized core forked that specifically played Amiga CDTV and Amiga CD32 games (as a consolized Amiga experience).

There was a topic in the Amiga section mentioning this: viewtopic.php?t=268.

As you can see, the big hurdle is that the Minimig core doesn't play games in the bin/cue format, but you can play these CD32 and CDTV games as part of a kickstart set, but you lose out on all the CD audio.

If the games could be loaded with the bin/cue method and the CD audio was supported for both the CD32 and CDTV consoles, then would it be an easy fork to create a separate CD32/CDTV core?

P.S. I know the PSX core is coming along very well, but if there was a complete CD32 experience, it would technically be the first 5th generation home console (not handheld (GBC)) supported in MiSTer. Just a thought :)

User avatar
Reed_Solomon
Posts: 65
Joined: Sun May 24, 2020 7:37 pm
Has thanked: 40 times
Been thanked: 8 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by Reed_Solomon »

I don't think you'd need to go all the way and fork Minimig. Just add the support for bin/cue and set up to boot with the CD32 Kickstart ROM and you're essentially already thereas far as I can tell.
KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

Thanks for getting back to me Reed. I made a feature request in the Minimig core, given your suggestion. That certainly seems like an easier option than forking a core lol.
cursedverses
Posts: 180
Joined: Sun May 24, 2020 9:13 pm
Has thanked: 186 times
Been thanked: 34 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by cursedverses »

Alas, the CD32 had extra hardware in it - the Akiko chip.
While the chip doesn't look like it does a lot, it could affect things to not have it implemented - I believe it added hardware accelerated video and chunky/planar conversion.

How much they were used though...
KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

Good to know. Does the CDTV have any custom hardware? According to Wikipedia it says, "The CDTV is essentially a Commodore Amiga 500 home computer with a CD-ROM drive and remote control." Unless otherwise stated, I'm guessing that the CDTV only needs to be able to read bin/cue games to work just like a physical CDTV.

I know that the CD32 is backwards compatible with the majority of the CDTV titles, except some of the earlier games, so you could theoretically play most of the CDTV games with the ditigal CD32 gamepad given its current state in the Minimig core.

Would it be worth adding an option for the CDTV controller or "remote"? I know that the CDTV has an odd controller. I don't even know if these pause, play buttons, numbers, etc. are even inputs for games, because the CDTV was part of that stupid edutainment trend in the early 90s like the Philips CD-i lol:
Attachments
cdtv_remotecontrol.jpg
cdtv_remotecontrol.jpg (795.9 KiB) Viewed 11690 times
robinsonb5
Posts: 130
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 58 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by robinsonb5 »

cursedverses wrote: Sun Dec 27, 2020 11:05 pm Alas, the CD32 had extra hardware in it - the Akiko chip.
While the chip doesn't look like it does a lot, it could affect things to not have it implemented - I believe it added hardware accelerated video and chunky/planar conversion.

How much they were used though...
The Akiko chip was primarily the interface to the CD drive, so if you want to use a CD32 ROM (i.e. the authentic bootscreen, cd player interface and savegames interface) it will need to be implemented. However, imitating an ATAPI CD drive in the IDE register block and using an existing cd.device with it should be sufficient run many CD32 games.

The hardware chunky-2-planar cornerturn memory was basically something they threw into the ASIC because they had some unused space on the chip - I already implemented that bit for MiST and Turbo Chameleon 64.

Akiko doesn't do anything else for video. (the only reason the RTG registers currently live in the Akiko register block is that on my platforms I have very few spare logic elements to play with, so didn't want to try to squeeze in whole new virtual expansion board when I wasn't sure how big the RTG implementation would be, and I was already decoding that block of registers. RTG doesn't conceptually belong there, however.)

There was a separate MPEG-decoding module available for the CD32, but I don't know how that worked, or where it lived in the memory map.

Again, I don't know what the CDTV's CDROM controller looked like, but it will need to be imitated if you want to use the CDTV's actual ROM - as opposed to just an imitation of an ATAPI CD drive in the IDE register block.

As for the CDTV controller, it's *much* better than you'd expect it to be from its appearance. The TC64 has an infra-red receiver intended specifically for that controller and most people who try it are surprised by how well it works.
KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

@robinson5, if the Akkiko chip isn't completely necessary for booting all games, then I wouldn't mind being a guinea pig and testing many CD32 and CDTV games and giving you my feedback if this feature was implemented.

Would adding bin/cue support be a big undertaking or is that something that's fairly easy to do since it's been implemented in the MegaCD and TurboGrafx-16 cores? Also, when adding bin/cue support, does that also make iso/cue work natively? I'm no software engineer so I legit don't know, but I have many PC Engine CD games that are iso/cue games that also work just like bin/cue games.
robinsonb5
Posts: 130
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 58 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by robinsonb5 »

KremlingKuthroat19 wrote: Mon Dec 28, 2020 9:32 am Would adding bin/cue support be a big undertaking or is that something that's fairly easy to do since it's been implemented in the MegaCD and TurboGrafx-16 cores? Also, when adding bin/cue support, does that also make iso/cue work natively? I'm no software engineer so I legit don't know, but I have many PC Engine CD games that are iso/cue games that also work just like bin/cue games.
Bin/cue support is a firmware (i.e ARM-side) feature, and in theory that can be shared between cores.
What's needed is some way of the virtual Amiga seeing the CD image.
Real Amigas can connect a CD drive in several different ways:
* IDE/ATAPI - either using the onboard IDE port or one of a number of different add-in cards
* SCSI - again either onboard or via a PCMCIA SCSI interface
* CDTV / A570 custom interface (fun fact: the A570 CD drive for Amiga 500 contained an FPGA)
* CD32 custom interface controlled by Akiko

At least one of those interfaces needs to be implemented, and made to talk to the ARM.
KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

Interesting. So the bin/cue is a firmware that can be reused from the existing cores and retrofitted to the Miniming core.

Since there seems to be 4 interfaces on how to get the Amiga to connect to the CD drives, which option seems like the most feasible and/or robust to you @robinsonb5?

The CD32 custom interface option seems the most complicated since it would require reverse-engineering the Akiko chip, but at the same time it would completely recreate the CD32 in FPGA (if my assumption is right). Since the CD32 is mostly backwards compatible with the CDTV, this might be an appealing option. You did mention that you didn't want to implement the Akiko chip due to concerns about taking too much of the FPGA or spare logic elements up. Would that still be a hindrance?

A CDTV custom interface would most likely just require the bin/cue firmware to be retrofitted from the Sega CD/TurboGrafx core to get working. However, it may also need a CDTV kickstart, which I don't know if there's one out there or how easy or hard it is to make a Kickstart rom (I don't have a coding bone in my body lol). Also, the CDTV controller might have to be replicated with that option so that's another consideration (again, correct me if I'm wrong).

The first two options seem to be the easiest options of the four you presented since these options probably only need to have bin/cue support and the existing CD32 kickstart could be used. If my assumption is correct and the first two options are easier to implement, then it might be a good idea to start with either of those options or both and maybe implement the Akiko chip later down the road. Just my two cents.
robinsonb5
Posts: 130
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 58 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by robinsonb5 »

KremlingKuthroat19 wrote: Mon Dec 28, 2020 12:22 pm Interesting. So the bin/cue is a firmware that can be reused from the existing cores and retrofitted to the Miniming core.
Bin/cue is a file format, kind of like HDF for CDs. The firmware is responsible for handing over the right part of the HDF or Bin/Cue at the right time. There's an interface between the firmware and the core - and both that firmware and interface should be largely re-usable between cores.

The bit that's unique to the Amiga will be translating between that firmware/core interface to an imitation of one of the types of hardware found on real Amigas. (Another option, of course, is to define a whole new one, and then write a driver for it.)
Since there seems to be 4 interfaces on how to get the Amiga to connect to the CD drives, which option seems like the most feasible and/or robust to you @robinsonb5?
The simplest would probably be ATAPI support in the existing IDE interface - but the most interesting and appealing would be to implement Akiko properly.
The CD32 custom interface option seems the most complicated since it would require reverse-engineering the Akiko chip, but at the same time it would completely recreate the CD32 in FPGA (if my assumption is right).
WinUAE implements Akiko (at least well enough for most games to run), so that could be used for reference.
Since the CD32 is mostly backwards compatible with the CDTV, this might be an appealing option.
That compatibility is mostly at the software level - a CDTV boot ROM wouldn't have a clue how to talk to Akiko.
You did mention that you didn't want to implement the Akiko chip due to concerns about taking too much of the FPGA or spare logic elements up. Would that still be a hindrance?
What I said about space was that RTG / videocard registers don't belong in the Akiko register space. I put them there because on my primary target platform (Turbo Chameleon 64) I'm almost out of space. That's not a concern on MiSTer.
A CDTV custom interface would most likely just require the bin/cue firmware to be retrofitted...
In FPGA-land it's never a case of "just"! :D
KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

The simplest would probably be ATAPI support in the existing IDE interface - but the most interesting and appealing would be to implement Akiko properly.

WinUAE implements Akiko (at least well enough for most games to run), so that could be used for reference.
Neat. So would you be interested in developing the Akiko chip using the WinUAE emulator as a reference? If you're up for working on the Akiko chip, I can't help you with the code, but I want to help. I can test games and give feeback. Is there anything else that you'd need help with?
In FPGA-land it's never a case of "just"! :D
Lol shows my lack of coding knowledge :)
robinsonb5
Posts: 130
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 58 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by robinsonb5 »

KremlingKuthroat19 wrote: Mon Dec 28, 2020 2:54 pmNeat. So would you be interested in developing the Akiko chip using the WinUAE emulator as a reference? If you're up for working on the Akiko chip, I can't help you with the code, but I want to help. I can test games and give feeback. Is there anything else that you'd need help with?
At the moment I have too much else on my plate to put significant time into this (I had some extra free time earlier this year thanks to the pandemic - but I've been back at work full-time since the beginning of October until the Christmas break, so less time to play.) - but it's certainly on my list of "projects-of-interest" for as and when time allows.
KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

robinsonb5 wrote: Mon Dec 28, 2020 9:04 pm
KremlingKuthroat19 wrote: Mon Dec 28, 2020 2:54 pmNeat. So would you be interested in developing the Akiko chip using the WinUAE emulator as a reference? If you're up for working on the Akiko chip, I can't help you with the code, but I want to help. I can test games and give feeback. Is there anything else that you'd need help with?
At the moment I have too much else on my plate to put significant time into this (I had some extra free time earlier this year thanks to the pandemic - but I've been back at work full-time since the beginning of October until the Christmas break, so less time to play.) - but it's certainly on my list of "projects-of-interest" for as and when time allows.
No worries. I have some time off too which is why I created this thread. I tried loading up a bin/cue for Lotus Trilogy for CD32 and realized that bin/cue wasn't supported lol.

Thanks for your interest in this project. Since we all have real-life responsibilities, take your time and you can either message me or continue this thread if you decide to start working on it in the future.

The Amiga CD32 is an interesting console to me because it's the swan song of Commodore, which was a gaming giant in the 80s and early 90s.

The CD32 also was the first western (excluding the FM Towns Marty - which ironically was also a consolized PC), 5th generation console ever released. There were even some exclusives like Defender of the Crown II, Amiga CD Football, Summer Olympix, and a few others.

Since it's a consolized Amiga 1200 with a CD drive, I view playing Amiga classics like Lotus Trilogy, Cannon Fodder, and James Pond as the definitive experience since they also have CD audio. It's kind of like TurboGrafx-16 versus TurboGrafx-CD versions of the same game. If a game was on either platform, I'd always go for the CD version.
ClassicGamerNL
Posts: 5
Joined: Thu Sep 24, 2020 9:16 am
Been thanked: 3 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by ClassicGamerNL »

Would be fantastic if this Core will be available. Still have the original guy laying around somewhere, but I'm afraid the capacitors are all death. :|
ZigZag
Posts: 99
Joined: Sun Jun 28, 2020 7:05 am
Has thanked: 1 time
Been thanked: 6 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by ZigZag »

I cloud relive the time I upgraded from C64 to CDTV. Then realising what a turd of a machine it was immediately took it back to the shop & exchanged it for an A1200!
KremlingKuthroat19
Posts: 237
Joined: Sat Aug 22, 2020 3:08 am
Has thanked: 27 times
Been thanked: 50 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by KremlingKuthroat19 »

Glad to see other people who appreciate the Amiga CD32. I'm also a fan of swan song consoles like the Atari Jaguar, NEC PC-FX, Amiga CD32, and Sega Dreamcast. It's interesting to see what went wrong with these former juggernaut console manufacturers. All these consoles definitely have games worth playing too, especially the Dreamcast.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by Caldor »

Sure would be nice with cores that supported these. I am guessing it would become part of the Minimig core since it already supports CD32 controllers and so on, so would make sense to have as options and settings.

I am not sure but the 020 CPU in Minimig being as fast as possible might be an issue for CD32 compatibility but not sure. Pretty sure it depends on the different games, but an option to limit the 020 speed would probably help with compatibility I think.

I found a thread in the Amiga thread about how you can mount ISO files already and how you then use them.
https://misterfpga.org/viewtopic.php?f=4&t=268

I also found something called SquirrelSCSI which can make a boot disk that can boot several CDTV games and some CD32 games using this method. The method being that I customized the SquirrelSCSI boot disk a bit to use the settings BBond007 suggested in that thread.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Amiga CD32 and Amiga CDTV Cores?

Unread post by Caldor »

Progress is good. Squirrel SCSI seems to support CDTV games very well, and SimCD32 I have customized so that it now uses the shared folder for MiSTer and looks in an ISO folder on it asking you to select an ISO file during boot. It now works with Microcosm, Simon the Sorcerer, Bubble Bobble Trilogy Collection and Beneath a Steel Sky. Which is all the ones I have tested this way so far.

I used a few tricks from the Squirrel SCSI boot disk. It had a few nice ways of supporting CDTV and CD32, but expects a real CD drive. Oh, and another thing that helped was to use the CD32 kickrom. I did not think it would make any difference but apparently it does.

Savegames do not work yet, but I got that to work on my A1200 and it should be fixable. It should be possible to make it save to the floppy disk using a assign the right way.

I used a really nice command called QueryFile.

Here is a video I made about how to get CD32 and CDTV running on the MiSTer core using SimCD32 and SquirrelSCSI:
https://www.youtube.com/watch?v=LVj6dRChpfU
Post Reply