Skip to content

Releases

v0.1.1: Wolf 3D MD: Reduce the size of the full version to a 5 Megabytes ROM.

Choose a tag to compare

@haroldo-ok haroldo-ok released this 14 Nov 09:20

🐺 Wolfenstein 3D (Mega Drive) --- v0.1.1 Size Reduction Update

The v0.1.1 update significantly trims the physical file size of the full commercial version (WL6), successfully shrinking the ROM down from 7.3 MB to under 5 MB (4,980,736 bytes) to vastly improve compatibility with physical flashcarts (such as Everdrive models).

📉 How the Size Reduction Was Achieved

  • Sound Asset Trimming (2.7 MB $\rightarrow$ 1.6 MB):

    • Removed Redundant AdLib Renders: AdLib sound effect variants that already had superior digitized equivalents were completely dropped. If the in-game audio option is set to AdLib, those specific events now trigger their digitized counterpart seamlessly.

    • Trimmed Silence: Unused trailing silence was stripped from the ends of the remaining AdLib sound files.

  • Optimized Memory Layout:

    • The sound data package was relocated directly behind the program code starting at address 0x320000 (instead of being padded out and pushed past the 4 MB mark).

    • Audio samples are strictly structured to never cross a 512 KB boundary, preserving full compatibility with banked flashcart architectures.

🕹️ Testing & Compatibility Status

  • Emulation Check: Successfully booted in emulators, verifying that intro sequences, title screens, and audio pipelines load properly from the new layout.

  • Audio Fidelity: In-game sound effect checks confirm loudness matches the previous 7.3 MB build, with audio waveforms aligning closely.

  • Flashcart & Hardware Note: While standard linear-mapping emulators and modern carts handle the straight-through path cleanly, this specific sub-5 MB revision has not yet been physically verified on real Everdrive hardware (unlike the heavier predecessor).

  • Developer Safeguard: Code and audio assets now completely fill their allocated 0x320000 slot. Any future asset additions will cause packrom.py to gracefully halt with a warning, requiring developers to bump WOLF_PCM_BASE in increments of 0x20000.

Full Changelog: v0.1.0...v0.1.1

v0.1.0: Wolf 3D MD: Implement support for the full version data files.

Choose a tag to compare

@haroldo-ok haroldo-ok released this 13 Nov 09:10
image image

Here is a clear, player-friendly summary of the v0.1.0 update for Wolfenstein 3D (Sega Genesis / Mega Drive):

🐺 Wolfenstein 3D (Mega Drive) --- v0.1.0 Full Version (WL6) Release

The v0.1.0 update marks a massive milestone for the Genesis port, adding full support for the retail 6-episode commercial data files (WL6) alongside the existing shareware version, resulting in a robust 7 MB full-version ROM (wolf3d-genesis-wl6.bin).

🌟 What Works in the Full Version (WL6)

  • Full 6-Episode Selection: Selecting "New Game" now presents the complete 6-episode selection menu before moving to difficulty selection (with the B button cleanly stepping backward). Shareware data still routes straight to difficulty selection.

  • All 60 Levels Fully Supported: Every single one of the 60 maps features its own dedicated music track, ceiling color, par time, episode-specific victory text, and custom dataset palette. Save games now correctly remember and persist your active episode.

  • Compressed Level Storage: Map data is fully compressed to conserve valuable ROM space.

  • Expanded Sound Bank (2.7 MB): Because the massive library of full-game sounds exceeds the standard 3.5 MB threshold, tools/packrom.py automatically appends them as extra 512 KB pages starting at address 0x400000, while patching the ROM header end address and checksum.

🎮 Verified Testing & Performance

  • Genesis Plus GX Emulation: All 60 levels successfully load and render. Walking, gun firing, and HUD updates have been verified on Episode 2 floors. All sound effects driven through the extended ROM pages match the original PC audio assets.

🛠️ Technical Notes & Limitations

  • Banked-Window Sound Fallback: The banked-window sound path couldn't be tested because emulator SSF header modes remain silent even with linked sounds. The game gracefully falls back to a plain linear mapping at 0x400000 (which is fully tested and supported by most flash carts and modern emulators). If neither is available, sound effects safely turn off.

  • Real Hardware: Still untested on physical Genesis / Mega Drive hardware.

  • Shareware Rebuilds: The shareware ROM (wolf3d-genesis.bin) remains the earlier build; regenerating it requires running make data with local shareware files.

  • Untested Scenarios: Boss fights, final victory sequences, and episode-specific save/load flows have not yet been played completely through from start to finish.

Full Changelog: v0.0.4...v0.1.0

v0.0.4: Wolf 3D MD: Improve the game's performance: it went from ~11 FPS to ~16 FPS.

Choose a tag to compare

@haroldo-ok haroldo-ok released this 11 Nov 09:46

Full Changelog: v0.0.3...v0.0.4

Wolfenstein 3D (Sega Genesis / Mega Drive) --- v0.0.4 Performance Update

The v0.0.4 performance update for Wolfenstein 3D MD introduces massive optimizations---pushing engine speeds up by 39% to 87% and hitting the strict 4 MB ROM limit.

⚡ Performance Benchmarks (-DVT_TOUR)

Scene / Test Configuration Base Build Detail: High Detail: Low
Start Room (72 views) 11.31 fps 15.77 fps (+39%) 21.18 fps (+87%)
Tour with Objects & Guards (160 views) 9.38 fps 13.39 fps (+43%) 17.58 fps (+87%)

🏎️ Key Optimizations & Features Added

1. Low Detail Mode (Toggleable in Main Menu)

  • How it Works: Casts and draws only the even rays (each 4 pixels wide), while keeping the status bar and weapon at crisp full resolution.

  • Visual Fidelity: The rendered image matches high-detail frames with odd rays mirroring their left neighbors.

  • Performance Impact: Nearly doubles frame rates (up to +87% speed boost).

2. Skipping Unchanged Frames

  • Smart Hashing: The engine hashes the viewpoint, doors, push walls, and visible sprites. When nothing changes, the current frame remains on screen without redundant redrawing.

  • Idle Efficiency: While standing still, the game loop runs at roughly 29 FPS in emulation instead of 15 FPS.

3. Hardware Sprite Weapon Rendering

  • Pre-Rendered VDP Tiles: All 20 weapon animation frames are rendered directly into ROM VDP tiles (~29 KB) derived from converted graphics, eliminating per-frame software scaling overhead.

  • Double-Buffered Bank Switching: New frames upload to an off-screen tile bank before the sprite table switches instantly, preventing visual tearing.

  • Palette Line 3 Integration: Uses view color 0 (transparent in sprites) paired with a dedicated palette copy managed by vid.c to handle fades and damage flashes dynamically.

4. Low-Level Assembly & Data Tables (src/r_asm.s)

  • Hand-Written 68000 Loops: Replaced GCC stack-shuffling overhead with optimized assembly for raycasting, tile-column loops, and sprite column drawers.

  • Lookup Tables over Arithmetic: Wall heights use a lookup table instead of divu, sprite post endpoints use row tables instead of mulu, and scalers are fetched via direct per-height pointer tables.

  • Merged DMA Uploads: Bundles up to four adjacent tile columns into single DMA bursts (~8 transfers per frame instead of 32).

  • Optimized Object Caching: Caches static object tile positions and applies a quick nine-compare early rejection check before running full actor visibility tests.

  • RAM Reallocation: Moved the sprite list into the unused tail of screenbuf, increasing free stack headroom from 740 bytes to over 2.1 KB.

💾 ROM Size & Technical Constraints

  • Maximum Capacity Reached: The ROM now sits at exactly 4 MB (the absolute ceiling without a bank-switching mapper). Duplicated wall textures and secondary scaler sets account for ~670 KB, leaving just ~90 KB of free space.

🧪 Testing & Validation Summary

  • Frame Equivalence: All 240 frames of the standard VT_SEQ and the new -DVT_DOORS push-wall/door test suite match the original build pixel-for-pixel in high-detail mode.

  • Interactive Checks: Verified smooth operation during pause-menu round trips, weapon firing, damage/death fades, and general gameplay loops.

  • New Test Flags Added: -DVT_NOWEAPON, -DVT_WEAPON, -DVT_LOWDETAIL, and -DVT_EVENSUM.

v0.0.3: Wolf 3D MD: Improve the performance (Achieved 10 FPS)

Choose a tag to compare

@haroldo-ok haroldo-ok released this 28 Oct 09:13

Full Changelog: v0.0.2...v0.0.3

Here is a clear, player-friendly summary of the v0.0.3 update for Wolfenstein 3D (Sega Genesis / Mega Drive):

⚡ Performance Boost: Reaching ~10.5 FPS!

The game logic and rendering engine received a series of low-level optimizations to boost the frame rate by ~27%--29% across all scenarios while keeping the graphics 100% pixel-identical to the original port.

Benchmark Comparison (Emulated Genesis Plus GX)

Benchmark Scene Original Version Intermediate Version v0.0.3 Version Performance Gain
Start Room (Scripted views) 8.17 FPS 8.80 FPS 10.51 FPS +28.6%
Tour (Near guards & items) 6.86 FPS 7.19 FPS 8.71 FPS +27.0%
Spinning in Place 8.01 FPS 8.61 FPS 10.17 FPS +27.0%

🛠️ Key Engine Optimizations

  • Smart Background Redraws: Plain ceiling and floor rows that don't change between frames are no longer re-rendered or re-uploaded to video memory, saving massive amounts of VRAM transfer time.

  • Direct DMA & VBlank Batching: Video transfers now write directly to the hardware's DMA registers during VBlank, pausing the audio chip once per batch rather than per transfer (~7% frame rate increase alone).

  • Faster Wall & Ray Calculations: Wall-drawing routines reuse loaded textures with faster instructions, and ray interpolation uses optimized 16-bit math instead of slow 32-bit operations.

  • Optimized Weapon & Sprite Rendering:

    • Sprites now skip empty transparent columns (so weapons no longer waste processing time walking through 40+ blank pixels each frame).

    • Fast-path processing added for 2× weapon scaling.

    • Screen columns now only calculate active overlapping sprites.

  • Unused Code Cleanup: Removed redundant controller reads (such as polling Player 2's controller port every frame).

🐛 Bug Fixes

  • Fixed Menu Black Screen: Fixed a pre-existing bug where choosing "Back to Game" or pressing B in the pause menu caused the screen to turn black. Gameplay now resumes normally.

v0.0.2: Wolf 3D MD: speed up column rendering and fix persistent cyan square.

Choose a tag to compare

@haroldo-ok haroldo-ok released this 20 Oct 10:11

Full Changelog: v0.0.1...v0.0.2

image image image

⚡ Performance Optimization Summary

  • Framerate Change: Increased from ~5.5 FPS to ~8.7 FPS (measured in the starting room on emulator).

  • Precompiled Wall Scalers: Replaced generic runtime column-scaling loops with height-specialized assembly routines in ROM.

    • Trade-off: ROM binary size grew from 3.1 MB to 3.4 MB.
  • Ray Interpolation: Full ray-casting calculations are now performed for every second ray. Intermediate rays hitting the same wall face interpolate height and texture coordinates.

    • Trade-off: Causes minor ±1 texel shifts on wall textures in certain angles.
  • Overdraw Reduction: Floor and ceiling spans are filled conditionally, bypassing areas obscured by wall geometry.

  • Ray-Stepping & Distance Math: Tightened register allocation for the primary DDA step loop and optimized distance calculation setup.

🕹️ Input Handling Adjustments

  • Action Button Latching: Button taps (Start, Fire, Use) are latched in state until consumed by the frame loop to prevent dropped inputs at low framerates (~8 FPS).

  • Movement Unlatched: D-pad directional input remains instantaneous to prevent controls from feeling floaty or continuing after release.

🐛 VRAM Glitch Fix

  • Issue: Persistent cyan square rendered on-screen during movement.

  • Cause: SGDK's default sprite attribute table location (0xF400) overlapped with tile RAM, causing the VDP to interpret tile patterns as hardware sprite attributes.

  • Fix: Relocated the sprite table base address to an unused, zeroed VRAM block, disabling unwanted VDP sprite rendering.

v0.0.1: Wolf 3D for Sega Mega Drive: initial port using Claude.

Choose a tag to compare

@haroldo-ok haroldo-ok released this 19 Oct 14:48

Full Changelog: https://github.com/haroldo-ok/wolf-3d-md/commits/v0.0.1

image image image

Step back into the halls of Castle Wolfenstein! id Software's legendary 1992 first-person shooter milestone, Wolfenstein 3D (Shareware Episode 1: Escape from Wolfenstein), has been brought to the Sega Genesis / Mega Drive.

Here is everything you need to know to jump into the action:

🛡️ What's Included?

  • The Complete Shareware Campaign: All 10 levels of Episode 1 converted directly from the original PC data files (VSWAP.WL1, GAMEMAPS.WL1, etc.).

  • Classic Arsenal & Enemies: Face off against guards, dogs, and officers using your knife, pistol, or machine gun.

  • Authentic Audio: Digitized PC sound effects powered by a custom Z80 PCM driver, along with original AdLib effects and IMF music arranged for the Genesis YM2612 sound chip and PSG channels.

  • Save Support: Save your progress across 3 battery-backed SRAM slots (high scores are saved here too!).

🕹️ Controls

Standard 3-Button Controller

Button / Input Action
D-Pad Move forward/backward, turn left/right
B Fire weapon
A Run
C Use / Open (doors, elevators, switches)
C + Left / Right Sidestep (Strafe)
A + C Switch to next weapon
START Pause Menu (New Game, Sound, Options, Save/Load, Read This!, Scores)

6-Button Controller Shortcuts

  • X Button: Quick-switch to Knife

  • Y Button: Quick-switch to Pistol

  • Z Button: Quick-switch to Machine Gun