SNES Doom Source Released! Now What?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Maxwelthuthu
Posts: 13
Joined: Mon Mar 12, 2018 9:58 pm

Re: SNES Doom Source Released! Now What?

Post by Maxwelthuthu »

The actual rendered area in both versions would look like this:

Image
128x72 on Genesis - 112x64 on SNES

Counting how many frames are repeated in one second, you can see that the SNES version runs at 30 fps and the Genesis version at 20 fps.
That's kind of a huge difference, they could used the same rendering size and level layout on SNES at 20 fps too. I don't know why they changed... maybe they disliked the framerate on Genesis.
The level still good tho, it just have some colision problems (Woody feels kinda fat).

Both versions also has a neat trick in one level, a background CPU rendered to look like 3 layers in one.

https://youtu.be/drr8t4sTqnw?t=1548
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: SNES Doom Source Released! Now What?

Post by Nikku4211 »

Maxwelthuthu wrote: Fri Dec 11, 2020 2:50 pm Counting how many frames are repeated in one second, you can see that the SNES version runs at 30 fps and the Genesis version at 20 fps.
That's kind of a huge difference, they could used the same rendering size and level layout on SNES at 20 fps too. I don't know why they changed... maybe they disliked the framerate on Genesis.
SNES is 30 and Mega is 20 only to people living in NTSC regions(or PAL-M). This game was developed by people in the UK, so to them, the SNES version is 25 fps and the Mega Drive version is around 16.666 fps.
Maxwelthuthu wrote: Fri Dec 11, 2020 2:50 pm Both versions also has a neat trick in one level, a background CPU rendered to look like 3 layers in one.

https://youtu.be/drr8t4sTqnw?t=1548
Got to love how the SNES version is more colourful than the Mega Drive version.

Lol, they could have used mode 0, but nope. Instead, they flex their programming skills, not that I'm complaining.

If only someone combined this with the extra amount of layers mode 0 gives you...
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: SNES Doom Source Released! Now What?

Post by TmEE »

I imagine the stage is probably 25FPS in 50Hz, the ~16% extra CPU time per frame and a whole lot more DMA time will help a lot in things like that. All the 3D games will run a lot faster in 50Hz compared to 60Hz just because of these things.
User avatar
Señor Ventura
Posts: 233
Joined: Sat Aug 20, 2016 3:58 am

Re: SNES Doom Source Released! Now What?

Post by Señor Ventura »

TmEE wrote: Fri Dec 11, 2020 9:38 pm I imagine the stage is probably 25FPS in 50Hz, the ~16% extra CPU time per frame and a whole lot more DMA time will help a lot in things like that. All the 3D games will run a lot faster in 50Hz compared to 60Hz just because of these things.
The same for megadrive version, and the difference is still there.
User avatar
Señor Ventura
Posts: 233
Joined: Sat Aug 20, 2016 3:58 am

Re: SNES Doom Source Released! Now What?

Post by Señor Ventura »

Having in mind the "mega color" doom version of genesis/megadrive, running from the cartridge with all the processing power of its FPGA... at 512 colors?.

What about if snes do the same in HD mode?, and, What about 256x224?.

Could be possible 512x120 at 4BPP and 15/20fps?.
And about normal resolution (256x120?), one port of doom running completely fron the cartridge, What color depth could it reach, no matter what the frame rate it can get?.


I can't do any calculations right now ^^
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: SNES Doom Source Released! Now What?

Post by tepples »

This effect relies on ability to write to video memory while rendering is turned on. The VDP has a write queue of four 16-bit words. It reserves some cycles each scanline for committing these words to VRAM, and if the queue is full, it can halt the CPU until a slot in the queue opens up. This is something that the Genesis does and even Super Nintendon't.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: SNES Doom Source Released! Now What?

Post by TmEE »

It actually turns rendering off for mostly offscreen parts every line so that it can do many more writes in short span than normal rendering process allows, it also avoids artifacts that would appear in middle of the screen in several predefined locations.

Image

The stuff seen in right edge are palette updates, rendering is disabled during the black portion and DMA started within it as soon as possible. I don't know how many entries are updated but I imagine 2 palettes worth at least. My own experiments allowed up to 3 palettes but it was difficult to avoid artifacts on left edge then. Also sprites are lost on those lines because rendering of them takes place in that part of the line.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES Doom Source Released! Now What?

Post by Oziphantom »

load it up in MESEN and look at the even viewer should make it clear as day what it writes and how much.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: SNES Doom Source Released! Now What?

Post by TmEE »

There seems to be no Mesen for MD/genny, only NES, SNES, GB and GBC.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES Doom Source Released! Now What?

Post by Oziphantom »

oh that is the MD version, my bad.
M2m
Posts: 24
Joined: Mon Feb 15, 2021 12:53 pm

Re: SNES Doom Source Released! Now What?

Post by M2m »

Maxwelthuthu wrote: Fri Dec 11, 2020 1:13 am
Señor Ventura wrote: Thu Dec 10, 2020 10:05 am
Oziphantom wrote: Thu Dec 10, 2020 7:30 am Given an A500 can't run Doom, even a A1200 can't really run Doom. A MD has no chance.

That being said the Toy Story 3D sections are pretty good. https://www.youtube.com/watch?v=LMWEknq-Now however single plane, no windows, simple geometry, no enemies etc etc
I post it quickly...

Image
The SNES version has a higher framerate, but there are less screen being rendered and the walls are way closer.
Both have scalled up screens, on Genesis is by software with some tilting to create dithering and on SNES by Mode 7.
Also, the screen is mirrored vertically to save processing.
The guy who worked on MD Toy Story has a pretty nice Youtube channel:

https://www.youtube.com/watch?v=OL3cuHoquUk

Might be helpful to reach out to him for further details and help ?
niuus
Posts: 8
Joined: Wed May 05, 2021 1:30 am

Re: SNES Doom Source Released! Now What?

Post by niuus »

Just curious, is there people actively working on any kind of upgrades for the source code? Recently i've been reading the discussions over here:
https://www.doomworld.com/forum/topic/8 ... on/?page=6

Also:
https://www.romhacking.net/forum/index. ... ic=20843.0

And they seem to be positive about the possibility of speed improvements to the engine. I will always be amazed at the technical achievement made with this port. :beer: :D
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: SNES Doom Source Released! Now What?

Post by 93143 »

niuus wrote: Thu Jun 03, 2021 9:46 pmJust curious, is there people actively working on any kind of upgrades for the source code?
Actively? Not that I'm aware of. But I'm not very plugged into the Doom scene.

There was a small hack that added circle-strafing and fixed an item name display bug, but that was a while back and not much else has shown up as far as I know. Randy seems to be busy with another project, and there's still some work he has to do to get the source archive to the point where it can be assembled into a working ROM...
And they seem to be positive about the possibility of speed improvements to the engine.
I don't know what their level of understanding of the game was when those posts were made, but I have looked into this a bit myself. My perspective is somewhat different, since I know the SNES and Super FX reasonably well but have only a rudimentary understanding of the Doom engine. I came up with a number of ideas, one of which (the mosaic trick, which doubles pixels in hardware instead of software at the cost of a slightly weird framebuffer format) seems to have made a positive impression on Randy himself. If I were to take this on as a project, the main things I would start with would be:

- add fast CPU-ROM (up to 6 MB exclusively for the SNES CPU. This was an official option that no game used; Randy apparently wasn't offered it*)
- use intermediate buffering to avoid pixel cache stall during rendering of vertical runs and framebuffer effects
- use the mosaic trick to speed up rendering and DMA and allow larger frame sizes without overloading VRAM
- implement additional texture compression (Randy says he ran out of time for this; I have a couple of ideas)
- add a save RAM

With CPU-ROM available, the Super FX's 2 MB ROM doesn't have to contain data unrelated to rendering, like music and splash screens. This frees up some space, which is a big deal - the reason there were levels missing is the same reason the title screen was ugly. Also, since the SNES CPU can freely access CPU-ROM while the Super FX is running, it may be able to help more with the game engine - it's a lot slower than the Super FX, but it's more general-purpose and much more efficient at exploiting large quantities of memory for both code and data.

Once the game isn't constrained by the 2 MB global limit, a lot of room could open up for optimizations and improvements, particularly if the extra texture compression frees up a lot of space as well. If my rendering ideas were to pan out, the resulting speedup could provide more headroom for improvements too. I have a long list of things I'd want to do if I were revisiting Doom on SNES.

I'd try this for real, but my shmup port is higher priority, and I'm limited in the time I can spend even on that...


* IIRC he said he used the second most expensive cartridge Nintendo offered, and that the difference between it and the most expensive was the lack of save RAM. I'd guess that either his publisher lied to him (possible) or CPU-ROM wasn't available yet by the time they had to pick a design.
I will always be amazed at the technical achievement made with this port.
The original SNES port is indeed impressive. Particularly since he had no access to the original source code and had to fit it into 2 MB of ROM and 64 KB of RAM. (The PC version uses more RAM than that just for a single data structure related to rendering flats.) Also, it seems that he had to figure out the Super FX on his own, at least initially. And the game was ready to ship in less than a year from the start of the project...
niuus
Posts: 8
Joined: Wed May 05, 2021 1:30 am

Re: SNES Doom Source Released! Now What?

Post by niuus »

93143 wrote: Fri Jun 04, 2021 1:53 am
niuus wrote: Thu Jun 03, 2021 9:46 pmJust curious, is there people actively working on any kind of upgrades for the source code?
Actively? Not that I'm aware of. But I'm not very plugged into the Doom scene.

There was a small hack that added circle-strafing and fixed an item name display bug, but that was a while back and not much else has shown up as far as I know. Randy seems to be busy with another project, and there's still some work he has to do to get the source archive to the point where it can be assembled into a working ROM...
And they seem to be positive about the possibility of speed improvements to the engine.
I don't know what their level of understanding of the game was when those posts were made, but I have looked into this a bit myself. My perspective is somewhat different, since I know the SNES and Super FX reasonably well but have only a rudimentary understanding of the Doom engine. I came up with a number of ideas, one of which (the mosaic trick, which doubles pixels in hardware instead of software at the cost of a slightly weird framebuffer format) seems to have made a positive impression on Randy himself. If I were to take this on as a project, the main things I would start with would be:

- add fast CPU-ROM (up to 6 MB exclusively for the SNES CPU. This was an official option that no game used; Randy apparently wasn't offered it*)
- use intermediate buffering to avoid pixel cache stall during rendering of vertical runs and framebuffer effects
- use the mosaic trick to speed up rendering and DMA and allow larger frame sizes without overloading VRAM
- implement additional texture compression (Randy says he ran out of time for this; I have a couple of ideas)
- add a save RAM

With CPU-ROM available, the Super FX's 2 MB ROM doesn't have to contain data unrelated to rendering, like music and splash screens. This frees up some space, which is a big deal - the reason there were levels missing is the same reason the title screen was ugly. Also, since the SNES CPU can freely access CPU-ROM while the Super FX is running, it may be able to help more with the game engine - it's a lot slower than the Super FX, but it's more general-purpose and much more efficient at exploiting large quantities of memory for both code and data.

Once the game isn't constrained by the 2 MB global limit, a lot of room could open up for optimizations and improvements, particularly if the extra texture compression frees up a lot of space as well. If my rendering ideas were to pan out, the resulting speedup could provide more headroom for improvements too. I have a long list of things I'd want to do if I were revisiting Doom on SNES.

I'd try this for real, but my shmup port is higher priority, and I'm limited in the time I can spend even on that...


* IIRC he said he used the second most expensive cartridge Nintendo offered, and that the difference between it and the most expensive was the lack of save RAM. I'd guess that either his publisher lied to him (possible) or CPU-ROM wasn't available yet by the time they had to pick a design.
I will always be amazed at the technical achievement made with this port.
The original SNES port is indeed impressive. Particularly since he had no access to the original source code and had to fit it into 2 MB of ROM and 64 KB of RAM. (The PC version uses more RAM than that just for a single data structure related to rendering flats.) Also, it seems that he had to figure out the Super FX on his own, at least initially. And the game was ready to ship in less than a year from the start of the project...
Thanks for the detailed response! That was an interesting reading. I hope something comes out of this in the future.
iNCEPTIONAL

Re: SNES Doom Source Released! Now What?

Post by iNCEPTIONAL »

niuus wrote: Sat Jun 05, 2021 11:12 pm
93143 wrote: Fri Jun 04, 2021 1:53 am
niuus wrote: Thu Jun 03, 2021 9:46 pmJust curious, is there people actively working on any kind of upgrades for the source code?
Actively? Not that I'm aware of. But I'm not very plugged into the Doom scene.

There was a small hack that added circle-strafing and fixed an item name display bug, but that was a while back and not much else has shown up as far as I know. Randy seems to be busy with another project, and there's still some work he has to do to get the source archive to the point where it can be assembled into a working ROM...
And they seem to be positive about the possibility of speed improvements to the engine.
I don't know what their level of understanding of the game was when those posts were made, but I have looked into this a bit myself. My perspective is somewhat different, since I know the SNES and Super FX reasonably well but have only a rudimentary understanding of the Doom engine. I came up with a number of ideas, one of which (the mosaic trick, which doubles pixels in hardware instead of software at the cost of a slightly weird framebuffer format) seems to have made a positive impression on Randy himself. If I were to take this on as a project, the main things I would start with would be:

- add fast CPU-ROM (up to 6 MB exclusively for the SNES CPU. This was an official option that no game used; Randy apparently wasn't offered it*)
- use intermediate buffering to avoid pixel cache stall during rendering of vertical runs and framebuffer effects
- use the mosaic trick to speed up rendering and DMA and allow larger frame sizes without overloading VRAM
- implement additional texture compression (Randy says he ran out of time for this; I have a couple of ideas)
- add a save RAM

With CPU-ROM available, the Super FX's 2 MB ROM doesn't have to contain data unrelated to rendering, like music and splash screens. This frees up some space, which is a big deal - the reason there were levels missing is the same reason the title screen was ugly. Also, since the SNES CPU can freely access CPU-ROM while the Super FX is running, it may be able to help more with the game engine - it's a lot slower than the Super FX, but it's more general-purpose and much more efficient at exploiting large quantities of memory for both code and data.

Once the game isn't constrained by the 2 MB global limit, a lot of room could open up for optimizations and improvements, particularly if the extra texture compression frees up a lot of space as well. If my rendering ideas were to pan out, the resulting speedup could provide more headroom for improvements too. I have a long list of things I'd want to do if I were revisiting Doom on SNES.

I'd try this for real, but my shmup port is higher priority, and I'm limited in the time I can spend even on that...


* IIRC he said he used the second most expensive cartridge Nintendo offered, and that the difference between it and the most expensive was the lack of save RAM. I'd guess that either his publisher lied to him (possible) or CPU-ROM wasn't available yet by the time they had to pick a design.
I will always be amazed at the technical achievement made with this port.
The original SNES port is indeed impressive. Particularly since he had no access to the original source code and had to fit it into 2 MB of ROM and 64 KB of RAM. (The PC version uses more RAM than that just for a single data structure related to rendering flats.) Also, it seems that he had to figure out the Super FX on his own, at least initially. And the game was ready to ship in less than a year from the start of the project...
Thanks for the detailed response! That was an interesting reading. I hope something comes out of this in the future.
Yeah, I'd really love to see someone push the SNES version of Doom to its absolute limits, because I know it's know doing that just now.
Post Reply