Quantcast

Results 1 to 5 of 5

Thread: Possible to hack 32X Doom to use Mode 1 on Sega CD?

  1. #1
    WCPO Agent roadkill's Avatar
    Join Date
    Apr 2014
    Location
    Pennsylvania, USA
    Age
    32
    Posts
    902
    Rep Power
    17

    Default Possible to hack 32X Doom to use Mode 1 on Sega CD?

    I'm just curious about this. Would it be possible for the 32X Doom to be hacked to use Mode 1 on the Sega CD to play burnt audio CD for the level music? Similar to Chilly Willy's Wolfenstein 3D 32X port.

  2. #2
    ESWAT Veteran Chilly Willy's Avatar
    Join Date
    Feb 2009
    Posts
    6,744
    Rep Power
    79

    Default

    Possible, yes. Now you just need to find someone to do it.

    I'm more interested in a new port than in hacking the old game.

  3. #3
    WCPO Agent roadkill's Avatar
    Join Date
    Apr 2014
    Location
    Pennsylvania, USA
    Age
    32
    Posts
    902
    Rep Power
    17

    Default

    Quote Originally Posted by Chilly Willy View Post
    Possible, yes. Now you just need to find someone to do it.

    I'm more interested in a new port than in hacking the old game.
    Yeah, a whole new port would be way better. I remember you mentioning it. I was just curious if it was actually possible.

  4. #4
    Hedgehog-in-Training Hedgehog-in-Training
    Join Date
    Jul 2019
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by roadkill View Post
    Yeah, a whole new port would be way better. I remember you mentioning it. I was just curious if it was actually possible.
    Since I'm unable to create new posts, I'm going to reply to this one instead.

    DOOM 32x: Resurrection
    ----------------------

    https://github.com/viciious/d32xr/

    https://youtu.be/MHTgm9xP-9E

    The goal of the project is to have a code base from which a playable version of Doom for the Sega 32X platform could be compiled. The focus of the project is primarily education and preservation although fixing the original game's idiosyncrasies and improving performance is not out of scope either.

    The project is based on the original Jaguar Doom source code release with a bulk of code taken from the Calico Doom port. I can't thank them enough for taking up the task of translating the original assembler code to C. Without this, the project would have taken me much longer.

    Although I never owned a 32X myself, I've been fascinated with the tech for quite while. Few titles aside I felt that it never quite realized its full potential. DOOM was one of those titles but nonetheless it was rushed to the market. The fact John Carmack (and American McGee, I believe) had managed to get it working and shipped in such a short timeframe was no small feat.

    The project started when I contacted John Carmack on Twitter back in 2020, asking if he had any recollection of where the source code of the Sega 32X port of Doom might be. He believed it had been long lost. And although I never had a 32X myself, I thought this might be an interesting project for me take on.

    Now on to the state of the project so far.

    The Good:
    - The game is mostly playable and runs good enough in the emulator
    - All stock maps load fine
    - Looks nearly identical to the original release, dithering included
    - The "widescreen" (320x180) mode works but needs to be toggled at compile-time
    - Automap works
    - NTSC and PAL support
    - No music (good riddance, right?!)
    - Basic support for DMAPINFO lump

    The bad:
    - No sound
    - No proper 2D graphics in HUD and menus as those were handled in the MD layer and are not present in the original IWAD

    The ugly:
    - The menu and statusbar are rudimentary
    - Intermission screen is missing
    - Sprites rendering is a tiny bit glitchy, probably due to incomplete or a buggy reversal of the original assembler code (fixed?)
    - No palette flashes

    While performance is good enough on the emulator (Kega Fusion), it doesn't quite reach the level of the original release. But all things considered I believe it's OK for the moment, as there isn't any SH-2 assembler code in the engine and the second CPU remains unused. My estimate is that at least 25% performance improvement could be attained from rewriting the hot parts in SH-2 assembler. The fixed-point functions would be a good place to start.

    Now I haven't tested the game on the original hardware because I don't have one. I would imagine it runs worse because of data being constantly streamed from ROM memory, which is rather slow but it's a necessary evil because under no circumstances the game would fit into the RAM. Oh, the RAM.. I went out of my ways to squeeze every kilobyte possible, so the game would load and run without eventually running out of memory. Every data structure was examined and optimized for memory footprint. To give you an example, the original code had roughly 50+kb allocated to trigonometric tables alone - that's a huge deal if you consider the fact that the 32X has only got 256Kb of RAM!

    To compile the rom you're going to need several things:
    - Chilly Willy's 32X SDK
    - 32x.h, m68k_crt0.s, m68k_crt1.s and sh2_crt0.s found in the TicTacToe example from the same SDK, which are not included to avoid GPL violation
    - Dump the IWAD file "doom32x.wad" from your Doom32x cartridge. Dump from address 0xBB010 to the end of the ROM.
    - Clone https://github.com/viciious/jaguardoom and run 'make -f Makefile.mars' in the project directory


    I think I've taken this project as far as I could and thus not planning to actively take it any further but would gladly collaborate with other developers on bringing it on par with the cartridge release or maybe take it even further. Here I've outlined a list of things that would be cool to get working:

    - PWM audio and PCM samples done on the slave SH-2
    - Specialized SH-2 assembler routines
    - Proper free 2D assets embedded into the binary, maybe taken from FreeDOOM
    - CD Audio support if the attachment Sega CD is detected
    - Sega Mouse and Keyboard support (do those even exist?!)
    - Support for more complex maps
    - Support for more games based on idTech1
    - Multiplayer support either via split-screen or the Sega Mega Modem
    - Clean room re-implementation of the game using GPL sources, this project could be used for verification purposes

    License:
    All original code, as well as code derived from the 3DO source code, is available under the MIT license. Code taken from Jaguar DOOM is still under the original license for that release, which is unfortunately not compatible with free software licenses (if a source file does not have a license header stating otherwise, then it is covered by the Jaguar Doom source license).

    Big thanks to Calico Doom team, Chilly Willy, id Software and Songbird Productions
    https://github.com/Arc0re/jaguardoom
    https://github.com/team-eternity/calico-doom/

  5. #5
    Master of Shinobi
    Join Date
    Sep 2012
    Posts
    1,419
    Rep Power
    44

    Default

    Impressive job!

    Quote Originally Posted by viciious View Post
    - CD Audio support if the attachment Sega CD is detected
    you may also consider using its PCM chip to further enhance the sound. Potential uses would be
    - higher quality samples
    - a really baller "soundfont" for the midi music. Load the Roland SC55 samples in there and let it rip.
    - simply offloading the PCM sound samples from the 32x PWM, allowing for the slave cpu to have more performance available for potential speed enhancements (although it probably would not help much)

    You could also take advantage of the extra memory to load some stuff from the ROM to the sega cd work memory (the page the 68k can see, anyway), if ROM access speed is a concern. Maybe it's faster that way?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •