Re: wolfenstein demo for sega genesis
Posted: Mon Aug 13, 2018 1:01 pm
when will there be new episodes?
Sega Megadrive/Genesis development
http://gendev.spritesmind.net/forum/
http://gendev.spritesmind.net/forum/viewtopic.php?f=8&t=1537
I signed up to this forum to support another project (Civilization for Genesis) and then I heard about this project on another site, clicked on some links and ended up right back in this forum in this thread haha.
gasega68k wrote: ↑Sat Apr 15, 2017 3:42 amHello 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.
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.
Thanks!
There is not texture tiles precalculated, the render works as in the original pc wolfenstein 3d, first it is just a 256x144 frame buffer in ram where you draw pixel by pixel (really a pixel pair, or a byte) by colums, but to be able to do this is necesary to setup the nametables in a specific way, however the version with resolution of 256x128 is not made in the same way as the version with 256x144, I can expand on this but I think I talk about it in previous posts, to made it short in the end is the same, draw the pixels (pixel pair or byte) by columns on Ram and then do DMA to transfer to Vram.masteries wrote: ↑Thu Sep 16, 2021 11:02 amSecond, some technical questions regarding how the drawing process is implemented for MegaDrive / Genesis:
-Due to this system only manages 8x8 tiles, ¿are texture tiles precalculated in the ROM space? ¿These contain all possible scaling and rotation?
¿Or all the on screen displayed 8x8 tiles are software generated by the 68k, and copied into VRAM framebuffer?
This is just a coincidence, you can check that movement is not tied to a 8 pixel using strafe to move or "walk" to left or right, and then just do that against a wall with a slight rotated angle (ie instead 90 degree you have someting close) in a way that you will move forward or backward slowly.masteries wrote: ↑Thu Sep 16, 2021 11:02 amPersonally, I noticed, that the minimum forward / backward movement produces an entire column change, such a 8 pixel displacement.
If you rotate to left / right, I notice the same, it appears to be a 8 pixel movement (or rotation) that correspond to one column.