Re: wolfenstein demo for sega genesis
Posted: Sat Apr 15, 2017 3:42 am
Hello all, I wanted to post a new "enanced" version of Wolf3d.
Although the game is complete (that is, it has all levels, music, sfx, etc), there are some things I want to add such as automap, I also increased the resolution of the game to 256x144 in the area of vision (before was 256x128), still works with a framerate slightly higher than the previous one since I used a code to draw columns of walls faster, but to make this change I had to modify many things.
In the version with the resolution of 256x128 (the one you know), I only needed a 16KB buffer in Vram, since the entire framebufer (which is in Ram) could be transferred to Vram in a frame, during the "Extended Vblank" of 86 scanlines.
In Vram are present all the frames of all the weapons and all the frames of the face of BJ and still there is a little of free space.
In the case of the version of 256x144 (which requires 18KB for the framebuffer in Ram), it is necessary to double buffer in Vram (well, not exact 2 buffer is required, I explain below), since 2 frames are needed to transfer the framebuffer To Vram, because now it is not possible to do it in one frame due to the increase of the resolution.
Since it requires double buffering in Vram (to avoid tearing), it really does not require 36KB of Vram, only half of the image requires double buffering, because one half (let's call it "L1") is transferred in one frame and the other half (we call it "L2") is seen on the screen, in the next frame the second half of the image (call it "R") is transferred to Vram and the first two halves are exchanged ("L1", "L2"), So only 27KB of Vram is required.
In this version only the weapons and all their frames are in Vram, the faces of BJ is only present the ones that is currently needed.
There are also some minor bug fixes.
Here are some pictures comparing the two versions.
BEFORE.......................................AFTER
And here is the rom, is a "demo version"(only first episode, sorry) with increased resolution.
Because there are some big changes I wanted to post this version, so everyone can test this on real hardware and/or on diferent versions of Genesis/MD. Enjoy.
Although the game is complete (that is, it has all levels, music, sfx, etc), there are some things I want to add such as automap, I also increased the resolution of the game to 256x144 in the area of vision (before was 256x128), still works with a framerate slightly higher than the previous one since I used a code to draw columns of walls faster, but to make this change I had to modify many things.
In the version with the resolution of 256x128 (the one you know), I only needed a 16KB buffer in Vram, since the entire framebufer (which is in Ram) could be transferred to Vram in a frame, during the "Extended Vblank" of 86 scanlines.
In Vram are present all the frames of all the weapons and all the frames of the face of BJ and still there is a little of free space.
In the case of the version of 256x144 (which requires 18KB for the framebuffer in Ram), it is necessary to double buffer in Vram (well, not exact 2 buffer is required, I explain below), since 2 frames are needed to transfer the framebuffer To Vram, because now it is not possible to do it in one frame due to the increase of the resolution.
Since it requires double buffering in Vram (to avoid tearing), it really does not require 36KB of Vram, only half of the image requires double buffering, because one half (let's call it "L1") is transferred in one frame and the other half (we call it "L2") is seen on the screen, in the next frame the second half of the image (call it "R") is transferred to Vram and the first two halves are exchanged ("L1", "L2"), So only 27KB of Vram is required.
In this version only the weapons and all their frames are in Vram, the faces of BJ is only present the ones that is currently needed.
There are also some minor bug fixes.
Here are some pictures comparing the two versions.
BEFORE.......................................AFTER
And here is the rom, is a "demo version"(only first episode, sorry) with increased resolution.
Because there are some big changes I wanted to post this version, so everyone can test this on real hardware and/or on diferent versions of Genesis/MD. Enjoy.