Jump to content
IGNORED

Jaguar CD Unleashed: the CD BIOS emulation project


Songbird

Recommended Posts

I recently decided to pick up a project I've always wanted to work on: emulating Jaguar CD games by replacing the Atari-installed CD BIOS with a custom BIOS that doesn't require the CD unit, but instead can load games via a large external memory such as SD card. And I thought it would be especially appropriate to announce this in light of the upcoming Jaguar SD cart project. Welcome to Jaguar CD Unleashed (JagCDU). :D

 

Yes, this is Mystery Project #3 which didn't remain a mystery for very long, because the basic feature is working now. ;) I thought I would announce here to let other developers and gamers alike know what I'm working on, how it works, and what is left to do.

 

 

What works right now?

 

A multi-track CD game which fits within the 6MB cartridge ROM space and only requires simple reads from CD to a designated RAM buffer is working in emulation.

 

The simple CD_read function which normally moves data from CD to a provided buffer in Jaguar RAM now does a m68k memory copy instead. This is actually a fairly fast operation, faster than most Jaguar CD reads would be. The CD tracks have been mapped to the 6MB cartridge ROM space, so that means the largest CD game right now can be just shy of 6MB in size.

 

Eventually the 6MB limit will be removed once I have a way to load data from external storage. Supporting streaming data will be a bigger challenge, since it requires custom HW on the other side of the I2S link.

 

What games are supported?

  • Protector SE + Protector Resurgence (1 boot track)
  • Frog Feast (1 boot track + 2 data tracks, but the last 2 tracks are filler and encryption, respectively)
  • CGE 5th slide show (1 boot track + 4 data tracks)

Other "boot track only" games such as Native should be supported but have not been tested yet. I need to find more multi-track games which fit within 6MB to properly test the emulation. Note that session 0 which contains audio-only tracks is completely ignored at the moment.

 

What new software is required to support JagCDU?

  • jagcdu.s – Replacement CD BIOS file which installs at $3000.
  • jagcdub.s – Simple boot code which runs from cartridge ROM and installs the JagCDU TOC at $2c00 and the JagCDU BIOS at $3000 and the boot track in Jaguar RAM.
  • testcdu.s – Test program which is very similar to the JagFree code included in Protector SE. It executes a number of CD BIOS calls to confirm proper function. It's not technically "required software," but it sure is useful in debugging BIOS calls. :)

In addition, the JagCDU TOC is a modified and extended version of the existing CD TOC. The timecodes have been simplified to essentially match the track number, and a secondary TOC (using the same track index as the first TOC) provides the descriptor of where the file is actually located.

 

What new hardware is required to support JagCDU?

 

JagCDU is a software emulation project, so it requires something like SainT's proposed Jaguar SD cart to actually work for end users. JagCDU is not a stand-alone product.

 

Current status of BIOS functions

  • BIOS_VER @ $3004 = 5.00
  • CD_ack – Supported. Hard-coded to always clear err_flag.
  • CD_getoc – Supported as a no-op, since JagCDUB always installs the TOC upon boot.
  • CD_init – Not supported.
  • CD_initf – Not supported.
  • CD_initm – Supported. Needs to be simplified.
  • CD_jeri – Not supported. Requires external microprocessor / HW to support I2S interface connected to external storage.
  • CD_mode – Supported as a no-op.
  • CD_mute – Not supported.
  • CD_osamp – Not supported.
  • CD_paus – Supported as a no-op.
  • CD_ptr – Supported for CD_read.
  • CD_read – Partially supported. D1 partition marker is supported. D2 circular buffer is not supported. Just seek bit is not supported. Requires prior call to CD_initm currently.
  • CD_setup – Supported. Only clears err_flag.
  • CD_spin – Supported as a no-op.
  • CD_stop – Supported as a no-op.
  • CD_switch – Not supported.
  • CD_umute – Not supported.
  • CD_upaus – Supported as a no-op.
  • CD_uread – Supported as a no-op.
Edited by Songbird
  • Like 24
Link to comment
Share on other sites

And I thought it would be especially appropriate to announce this in light of the upcoming Jaguar SD cart project.

 

Because the SD cart is supposed to do the same thing?

 

...you'd just select the CD ISO from the SD card and play.

 

As neither is completed yet I guess it's still nice to have both projects running alongside each other. I remember anticipating the JagCF :P

Edited by Willard
Link to comment
Share on other sites

nice to hear it could add the CD functionality to the SD card right off hand, considering SainT said his implementation would probably be an update.

 

whether he works on his own / uses yours / works with you, I think it's a nice feature and good to know more than one dev has it in mind.

 

Too bad nobody utilized the skunkboard as a usb storage flash solution, would've been great to see projects like this work with that.

Edited by Willard
Link to comment
Share on other sites

Too bad nobody utilized the skunkboard as a usb storage flash solution, would've been great to see projects like this work with that.

Considering I am doing all of my JagCDU development on the Skunk, I think it's fair to say it works on the Skunk right now. :D Whether or not it works on the Skunk in its final form depends on what kind of support is available (or needs to be developed) to access external USB memory.

 

Again, I am not developing JagCDU with a specific target platform in mind. I just wanted to get the announcement out there to ensure widest compatibility with these sorts of cartridges. I will happily work with other hobby developers to get this running on multiple platforms. :)

  • Like 3
Link to comment
Share on other sites

Considering I am doing all of my JagCDU development on the Skunk, I think it's fair to say it works on the Skunk right now. :D Whether or not it works on the Skunk in its final form depends on what kind of support is available (or needs to be developed) to access external USB memory.

 

that's great, look forward to seeing what becomes of this on the Skunkboard, although I understand no guarantees yet :) but taking some of the workload off of other devs or just making sure that there's a first day solution available for some potential upcoming projects is also really nice!

Link to comment
Share on other sites

Yep, just to say I've been chatting with Songbird about the requirements to get CD emulation working on the cart. It doesn't look like it will require much more than bringing the I2S lines to the controller chip and having the option to stream memory card data back via I2S as opposed to parallel. I currently don't have these mapped, so it's great to start talking about these things now before I've done any board layout.

Edited by SainT
  • Like 11
Link to comment
Share on other sites

CGE 5th anniversary slide show is now supported. This is my first true multi-track program where it contains 4 separate slide shows for CGE shows from 1998-2001. Each slide show is over 1MB in size. Program is fully emulated using JagCDU BIOS calls to boot the program and load the slide shows, so CGE 5th doesn't know it's running on emulation.

 

This gives me confidence that more CD games which only use CD_initm and always pass a data marker (such as "TRAK") to CD_read will be straightforward to emulate.

  • Like 3
Link to comment
Share on other sites

I've updated the first post with more functions which are supported. I think CGE 5th was probably over-designed in how it used the CD BIOS, because I had calls to CD_paus, CD_upaus, and CD_uread in there, but it gave me a good reason to debug those JagCDU functions so now they work. :)

 

I also tried to get Primal Rage running because it only has four data tracks (and a whole bunch of audio tracks in the first session, which I can ignore for now), but it turns out one of the data tracks is about 50MB in size so it won't work on Skunk without either USB or PC file reads implemented... guess I found my next project. ;)

  • Like 6
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

@Songbird,

 

Thanks for all your work - it's hero's like you that keep the retro scene so fascinating and alive.

 

Would you perhaps have video of a CD image booting from the Skunkboard yet? This isn't to nag you, I'm really just excited to see the progress of the development.

 

Thanks,

Mark.

Link to comment
Share on other sites

 

*cough* ULS *cough*

I've never used ULS, but I presume the Reboot splash screen is a data track in session 0? If so, that could be another good test for JagCDU emulation -- a single-load game such as Native built into a CD via ULS would then have two data tracks.

 

Since ULS is obsoleted, does JiFFI do all of the same things for producing a CD game?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...