Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores
r/emulation icon
r/emulation icon
Go to emulation
r/emulation
A banner for the subreddit

News and discussion about emulation.


Members Online

The Doom SNES source code has been released

Share
Sort by:
Best
Open comment sort options
u/botsbro avatar
Edited

"These backup disks were created by Randy Linden and obtained from Jeff Hughes, both former employees of Sculptured Software. This is the complete source code for Doom on SNES, including modem code and assets."

In the past there have been legal obstacles to releasing the source code (such as the 3rd party sound driver and Cutter tool). This is the first time the source code has been released in full with all legal hurdles overcome. The source files are for use on an Amiga system or WinUAE Amiga emulator.

u/imkrut avatar

Randy Linden

What a fucking coding legend, this guy was part of the Bleem emulator for PC (a PS1 emulator that allowed you to play PS1 games back when the PS1 was actually still commercial) and Bleemcast, a PS1 emulator for the Dreamcast that allowed you not only to run PS1 games on the Dreamcast, a competitor console from SEGA (technically just the previous generation), but also it ran in a enhanced mode with double the resolution.

Fucking black magic. Also the Bleemcast encryption was unhacked for ages and ages, somehow nobody could figure it out for 10+ years.

u/CoconutDust avatar

with all legal hurdles overcome

There is not a single word of information that at all even remotely suggests that “legal hurdles” have been overcome.

I am not saying there is any ethical or moral or any other real issue. I’m saying the law is not “if a random former employee releases source code copies to internet from an old disk, that’s legal.”

u/dogen12 avatar

I think randy linden mentioned that he was working through the legal stuff when he first started dropping parts of the code a few years ago. Haven't heard about it since though.

I'm assuming the legal hurdles was everyone with a stake in it is dead now considering those drivers are probably 30+ years old

/S

More replies

Wow

More replies

Could it be optimized further?

u/dogen12 avatar
Edited

Yes, by using the snes ppu to stretch the pixels (it renders like doom's low detail mode, with doubled pixels) instead of spending superfx fillrate. There are a few ways to do it. This should also reduce the cartridge bus traffic (unless I'm mistaken), increasing the theoretical maximum frames you can transfer back to the SNES. I'm not sure how much of a difference this would make, but it could be significant.

u/RobobotKirby avatar

Are you referring to the mosaic feature? I'm pretty sure that is for reducing higher resolutions, not the other way around.

u/dogen12 avatar

I don't have direct SNES experience (only NES and PCE) so I don't know the specifics, but people who do have referred to it as a way to essentially magnify pixels and I trust them. I'll check the docs now though.

There are other ways tough, I'm told.

u/RobobotKirby avatar

Mosaic does "magnify pixels" in that it makes them larger, but it can't scale a sub-native resolution image upwards (it can only reduce resolution)

more replies More replies
More replies
u/DXGL1 avatar

I think they meant Mode 7.

More replies
More replies
More replies
u/Dwedit avatar

I wonder if anyone will try to integrate in the Mosaic Trick that supposedly could have increased the game's framerate.

(copy-pasting my post from HackerNews)

The "mosaic trick" is a way to perform horizontal pixel doubling in hardware rather than software. And to do this trick, you turn on the SNES's Mosaic feature, scroll 1 pixel to the left (right?) every other scanline, and scroll upward one pixel after each two scanlines have been drawn.

Normally the SNES mosaic feature just the top-left pixel of a 2x2 square into that entire square. But the trick makes a different set of pixels get doubled horizontally on the next scanline.

It requires a different arrangement of pixels than the normal way of drawing tiles. A tile containing these pixels:

01234567

becomes this when viewed on two scanlines:

00224466

11335577

Actually performing these scroll writes does not require any CPU intervention because you use the SNES's HDMA feature to do those scroll writes.

User "93143" on Nesdev describes the Mosaic trick in this post: https://forums.nesdev.org/viewtopic.php?p=205633#p205633, other discussion here: https://forums.nesdev.org/viewtopic.php?t=20393&start=135

u/collegetriscuit avatar

This is incredible. I know the SNES version hasn't aged very well, but it's an amazing accomplishment that they were able to create such a relatively faithful port on the extremely limited hardware (of course, with help from the SuperFX chip).

u/CoconutDust avatar

amazing accomplishment

No it isn’t, it’s just work. The compromises are obvious.

incredible

No it isn’t.

hasn’t aged very well

No, it was always a heavily compromises and “worst” kind of port compared to others. Though it did the job for kids who had no better way to play it.

No disrespect to the work of the programmers for doing their job. I’m just disagreeing with these cliches of Amazing for what is a straightforward programming job of heavily compromising a thing for weaker hardware. The nature of ports.

u/dogen12 avatar

The part where he had to reverse engineer the snes and superfx to make a custom dev kit was cool.

Plus, the engine was from written from scratch in superfx asm and not based on doom (no official support until it was already working). The doom engine and map format weren't open source or really documented yet either.

I think that earns it a bit more than straightforward port.

u/transmogisadumbitch avatar

You're right but the clueless mob can't handle the truth. The only thing that would have made this impressive is if it DIDN'T use the SuperFX chip. On a technical level, none of the SNES or Genesis games are really anything special. They pretty much did the obvious things you'd do with the hardware all while generally having tons of slowdown and/or flickering.

More replies
More replies
u/Bob_The_Doggos avatar

This has already been uploaded on Randy's github for over 4 years now: https://github.com/RandalLinden/DOOM-FX

u/botsbro avatar
Edited

The GitHub release doesn't include the sound driver or all of the development tools. This contains all the code and assets + all of the Amiga tools to set up a development environment exactly like the one Randy would have had in 1995.

The Development section on the wiki gives a good explanation https://doomwiki.org/wiki/Super_NES

More replies

What is the modem code ?

u/botsbro avatar
More replies
u/DatChernobylGuy_999 avatar

YES

HELL YEAH

u/Scared_Management613 avatar

I enjoyed SNES Doom for what it was. It's still the most impressive technological feat I've ever seen. It had minimal compromises compared to other console ports at the time. The most glaring issue it had was the single-digit framerate. Other than the lower resolution and lack of monster in-fighting, I don't think much else was sacrificed.

The most insane thing about the SNES port, however, was that it had online multi-player. If you had an Xband cartridge, you could play deathmatch with other players online.