OpenBoR Dreamcast port

A forum for news and discussion about Beats of Rage and its modification.
Post Reply
User avatar
Christuserloeser
Moderator
Moderator
Posts: 5948
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu Aug 28, 2003 12:16 am
Location: DCEvolution.net
Has thanked: 10 times
Been thanked: 0
Contact:

OpenBoR Dreamcast port

Post by Christuserloeser »

Beats of Rage doesn't actually use KOS but Neill Corlett's own libraries. Here is a toolchain to compile the original Beats of Rage (along with 50/60Hz support and rumble support):

http://la.cible.free.fr/DreamCast/BOR/b ... lchain.zip


And here's a discussion where SamuraiX (the maintainer of OpenBOR between 2006 and 2009-ish) mentions some issues he encountered when porting the engine to KOS: viewtopic.php?p=1009741


In the end we decided to stick with the original instead of using KOS.


The biggest issues with the engine as far as I remember:
- RAM limitations, RAM limitations and RAM limitations (I do remember roel's and utunnels' advancements made to the original engine in this regard)
- no support for stereo ADPCM files
- no support for 480x272 and 640x480 resolution (other resolutions supported by the engine that might be possible to support on Dreamcast: 720x480, 800x480, and 800x600)
- no support 16 bit color mode (currently only 8-bit is supported)


Any of these features would be a huge improvement and would greatly enhance the port. The most important to me personally would be stereo support. For the majority of people 480x272 and 16 bit mode would be of the most value I imagine as it would make the port compatible to a ton of existing games using the engine.
Insane homebrew collector.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: OpenBoR Dreamcast port

Post by Chilly Willy »

First, let's talk about resolutions... the DC seems to have a fixed pixel clock with the ability to divide it in half for "low res" modes. The pixel clock is fixed at a frequency that gives the usual 640/320 wide display. The 768x480 mode in KOS is merely showing more of the overscan area of the 640x480 TV mode. With VGA, you have 320x240 (double-scan), and 640x480. Pier Solar (or Polo Solo to us PS old-timers :wink: ) has a "true wide-screen" that is 740x416. I submit this is merely the 640x480 VGA with slightly longer lines (which lowers the horz rate, which in turn lowers the vert rate), and fewer lines (to bring the vertical rate back up to 60 to keep monitors happy). That's why it doesn't work on all monitors - only ones where the horz rate can be off from the standard VGA spec.

If you've ever checked the KOS source, you'll notice the 800x608 mode is just a copy of the 320x240 mode - it doesn't actually set an 800x600 mode. That's because you need to set the horz lines longer AND use more lines. This lowers the horz rate and the vert rate below values most multi-sync monitors can handle. It would be very much like the 800x600/400x300 mode on the Amiga ECS/AGA chipset. The Amiga ECS and AGA chipsets also had a fixed pixel clock with programmable sync. So you could make lines longer or shorter, and have more or fewer lines, with the horz and vert rates changing based on both. So if we ever see a "real" 800x600 mode, it will be like the Amiga Euro36 monitor driver. So I don't see anything other than up to 720x480 for TV, and up to 640x480 for VGA, at least for the time being.

Supporting 480x272 can be done initially by just drawing it centered in a 640x480 display. After things are working, this could be altered to stretch it to full-screen.

As far as ADPCM goes, the openbor source has a library that supports encoding and decoding mono and stereo ADPCM. Supposedly, the engine handles ADPCM while the backend just outputs regular stereo samples. I'll check into that a bit more.

My port is basically modifying the SDL port to use the current KOS instead. I'm using what I learned in my Doom port here... like making a double-buffered audio output that fills the buffers via a separate thread.

As to ram limitations, there's not a whole lot that can be done... BoR is written for PCs with tons of memory, with a few ports to consoles with more memory than the DC. The thing to do is get the port working, then start looking at where the memory goes. At least the DC has more memory than previous generation consoles. Imagine trying to shoe-horn this into the PS1 or Saturn! :lol:

I've got several of the files converted over to KOS... they just need debugging. I'm working on the main file and the menu at the moment. One thing I needed was SD support, and now I've got that with my sdfs library posted the other day. I plan on posting the code once I have it running, but if someone wants to see some code for parts like the controllers, I can post that in the thread. On the topic of controllers, I have done the code for the controllers, supporting four and six button controllers as well as the rumble pad. I haven't finished the keyboard code yet... not sure how important that is on this. Should I bother? I figure people will have (up to) four controllers plugged in for fights, not a keyboard. Toward that end, I bought a bunch of 6-button controllers for testing.
Post Reply