Jump to content

Photo

Jaguar CD Unleashed: the CD BIOS emulation project


60 replies to this topic

#1 Songbird OFFLINE  

Songbird

    Stargunner

  • 1,510 posts

Posted Wed Jun 22, 2016 6:16 AM

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, Mon Aug 8, 2016 6:14 PM.


#2 lachoneus OFFLINE  

lachoneus

    Chopper Commander

  • 195 posts
  • Location:Utah, USA

Posted Wed Jun 22, 2016 7:20 AM

Sir if you are ever in town, remind me to buy you lunch. This is incredible.

#3 Willard OFFLINE  

Willard

    Stargunner

  • 1,340 posts

Posted Wed Jun 22, 2016 8:19 AM

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, Wed Jun 22, 2016 8:23 AM.


#4 Songbird OFFLINE  

Songbird

    Stargunner

  • Topic Starter
  • 1,510 posts

Posted Wed Jun 22, 2016 8:43 AM

Just to be clear, this is a software emulation project. It requires a custom cartridge such as a Jaguar SD cart to fully function. Thus JagCDU is intended to run directly on the Jaguar SD cart (or similar custom cartridge), not compete with it. :)



#5 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • 4,235 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Wed Jun 22, 2016 9:04 AM

This is incredible news, Carl. Your continued support for the Jaguar, even after all this time, is amazing and sincerely appreciated! Sounds awesome and I can't wait.

 

Songbird and SainT! =D



#6 Willard OFFLINE  

Willard

    Stargunner

  • 1,340 posts

Posted Wed Jun 22, 2016 9:38 AM

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, Wed Jun 22, 2016 9:39 AM.


#7 TXG/MNX OFFLINE  

TXG/MNX

    River Patroller

  • 3,627 posts

Posted Wed Jun 22, 2016 10:07 AM

Nice to see this done already great job.

Sent from UMI hammer with Tapatalk

#8 Songbird OFFLINE  

Songbird

    Stargunner

  • Topic Starter
  • 1,510 posts

Posted Wed Jun 22, 2016 11:52 AM

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. :)



#9 Willard OFFLINE  

Willard

    Stargunner

  • 1,340 posts

Posted Wed Jun 22, 2016 12:47 PM

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!



#10 SainT OFFLINE  

SainT

    Dragonstomper

  • 867 posts
  • Location:Gloucestershire, UK

Posted Wed Jun 22, 2016 4:53 PM

Yep, just to say I've been chatting with Songbird about the requirements to get CD emulation working on the JagSD. 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 SD 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.

#11 travistouchdown OFFLINE  

travistouchdown

    River Patroller

  • 3,796 posts
  • Do the math!
  • Location:Burlington, Vermont

Posted Wed Jun 22, 2016 6:33 PM

So it looks like in addition to skunkboards, eBay will be flush with Jag CDs once the SD Cart is released ;)

#12 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • 4,235 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Thu Jun 23, 2016 3:21 AM

So it looks like in addition to skunkboards, eBay will be flush with Jag CDs once the SD Cart is released ;)

Ha... flush even. Would be nice for the prices to come down a bit but I wouldn't hope for it



#13 TXG/MNX OFFLINE  

TXG/MNX

    River Patroller

  • 3,627 posts

Posted Thu Jun 23, 2016 12:31 PM

Ah ok I buy 100 pieces for $1.00 each

Sent from UMI hammer with Tapatalk

#14 orpheuswaking OFFLINE  

orpheuswaking

    Quadrunner

  • 5,648 posts
  • Lone Raider Time!
  • Location:Indianapolis, Indiana, USA

Posted Thu Jun 23, 2016 12:53 PM

So it looks like in addition to skunkboards, eBay will be flush with Jag CDs once the SD Cart is released ;)

 

Nope, I'll buy an SD cart and keep my Skunkboard & JAG CD. 



#15 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • 4,235 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Fri Jun 24, 2016 2:59 AM

Ah ok I buy 100 pieces for $1.00 each

Sent from UMI hammer with Tapatalk

Think you have the numbers turned around there ... you'll get maybe 1 piece for $100 lol



#16 bmx OFFLINE  

bmx

    Chopper Commander

  • 215 posts
  • Location:Germany

Posted Fri Jun 24, 2016 6:03 AM

Great news, keep on the good work!



#17 Songbird OFFLINE  

Songbird

    Stargunner

  • Topic Starter
  • 1,510 posts

Posted Sun Jun 26, 2016 10:37 PM

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.



#18 TXG/MNX OFFLINE  

TXG/MNX

    River Patroller

  • 3,627 posts

Posted Sun Jun 26, 2016 11:30 PM

Very nice seems you msking progress and having fun at the same time :-)

Sent from UMI hammer with Tapatalk

#19 Songbird OFFLINE  

Songbird

    Stargunner

  • Topic Starter
  • 1,510 posts

Posted Mon Jun 27, 2016 5:34 AM

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. ;)



#20 TXG/MNX OFFLINE  

TXG/MNX

    River Patroller

  • 3,627 posts

Posted Mon Jun 27, 2016 2:13 PM

Man you're on speed ! :-)

Sent from UMI hammer with Tapatalk

#21 Guitari OFFLINE  

Guitari

    Stargunner

  • 1,603 posts
  • Location:Kent

Posted Mon Jun 27, 2016 3:12 PM

 
Nope, I'll buy an SD cart and keep my Skunkboard & JAG CD. 


Exactly!

#22 jdollatari OFFLINE  

jdollatari

    Star Raider

  • 97 posts
  • Location:emmett, idaho

Posted Sat Jul 16, 2016 8:45 AM

as someone who ended up with a doa cd unit when collecting and has never since had the chance to own and play a jag cd i thank you sir!



#23 mqark OFFLINE  

mqark

    Space Invader

  • 36 posts

Posted Thu Jul 28, 2016 2:11 AM

@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.



#24 CyranoJ ONLINE  

CyranoJ

    River Patroller

  • 4,983 posts
  • RAPTOR in LOCAL
  • Location:Adelaide, SA

Posted Thu Jul 28, 2016 3:54 AM

Note that session 0 which contains audio-only tracks is completely ignored at the moment.

 

*cough* ULS *cough*



#25 Songbird OFFLINE  

Songbird

    Stargunner

  • Topic Starter
  • 1,510 posts

Posted Thu Jul 28, 2016 4:17 PM

 

*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?






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users