20 February 2022, 08:40 | #1 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
|
Wolfenstein 3D on 68020 14 MHz
A long time ago I experimented with a Wolfenstein 3D port for the CD32, but concluded that the raycaster is simply too slow and abandoned the project. I recently saw some videos of Wolf3D running on 286 machines, which got me thinking: an A1200 with some Fast RAM might just be fast enough for the game. You would assume the A1200 is faster than a 286, but there's one crucial component missing: the VGA card. This means no chunky modes, no fast dedicated video memory, no drawing multiple pixels with a single write, etc. You also can't do self-modifying code on the 68020+ without disabling or flushing the cache. Throwing some fast RAM at it could offset this.
I cleaned my old port, fixed most of the issues, implemented the missing features. I was able to reuse some code from Blake Stone, but I still had a lot of issues with the speed. For example I had to make the scalers mostly 16-bit fixed point, but fortunately this didn't have a big impact on the graphics at 320x200. One advantage Wolf3D has over Blake Stone is that it doesn't draw any sprites outside the 3D view area, so all the 2D graphics around it can be native bitmaps, only the 3D view uses chunky. As expected the biggest roadblock turned out to be the raycaster. I tried a 16-bit variant, but it wasn't much faster and produced a lot of glitches due to the lack of precision. I ended up settling for halving the horizontal resolution, so the 3D view is drawn in 2x1. Then again the official GBA port of Wolf3D was also in 2x1, and that's more powerful system so I don't think it's a bad result. The minimum requirements: - 68020 14 MHz - AGA chipset - 1 MB Chip RAM - 2 MB Fast RAM - about 3 MB free disk space TL;DR The target system is an A1200 with some Fast RAM, no CPU accelerator required. You need the Wolf3D 6-episode registered data files (*.WL6) except CONFIG.WL6. Currently not supported, but planned: - AdLib sounds and music done! - EHB 64-color mode - Spear of Destiny done! You can get an very early test version here: http://bszili.morphos.me/stuff/wolf3d.zip http://bszili.morphos.me/stuff/spear.zip It's now available on Aminet: http://aminet.net/package/game/shoot/wolf4amiga http://aminet.net/package/game/shoot/spear4amiga Source code: https://bitbucket.org/BSzili/wolf4sdl-amiga Last edited by BSzili; 06 March 2022 at 06:14. |
20 February 2022, 09:17 | #2 |
Registered User
Join Date: Feb 2009
Location: Amiga
Posts: 465
|
Does this version support WASD and mouse look controls?
|
20 February 2022, 09:23 | #3 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
|
There are no modern controls, it has the same limitations as the original DOS version.
|
20 February 2022, 15:59 | #4 |
Saberman
Join Date: Dec 2016
Location: Kielce/Poland
Posts: 327
|
Gameplay:
[ Show youtube player ] |
20 February 2022, 17:00 | #5 |
Registered User
Join Date: Dec 2016
Location: Italy
Posts: 729
|
It seems good, but framerate from the video doen't appear to be real.
|
20 February 2022, 17:51 | #6 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
|
Oops. I forgot to change the FPS counter, it currently displays the frame time. To get the framerate you can use this formula: 1000 / frame time.
|
20 February 2022, 18:20 | #7 |
Registered User
Join Date: Apr 2015
Location: Spain
Posts: 511
|
Amazing BSzili! waiting for a EHB 64-color (OCS) mode for test in A500 with ACA500+
will require a 020? or will work with 68000? |
20 February 2022, 18:23 | #8 |
Registered User
Join Date: Jul 2013
Location: Liverpool
Posts: 2,595
|
So far so good (I miss the music)
|
20 February 2022, 19:05 | #9 | |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
|
Quote:
On the bright side there won't be a speed penalty for using the EHB mode as I convert all the in-game graphics at load time. This means the palette effects will be preserved as well. That'll come, I already have the AdLib sound/music converter program ready, I just have to figure out how to deal with the sound effects. I'm using Paula this time, so I'll probably make a simple mixer so the music and sound effects can share two hardware channels. |
|
20 February 2022, 20:00 | #10 |
Registered User
Join Date: Sep 2009
Location: San Antonio, TX USA
Age: 50
Posts: 1,184
|
Are going to have an option to run the game 1x1 on faster Amigas?
|
20 February 2022, 20:09 | #11 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
|
I'll think about it, but on faster machines you can already play AmiWolf and AmiSpear. For now I'm focusing on the base machines with a little extra RAM.
|
20 February 2022, 20:23 | #12 | |
Registered User
Join Date: Jul 2015
Location: Novi Sad, Serbia
Posts: 1,645
|
Quote:
Can't wait to test, if you make possible to be played on 68k. |
|
20 February 2022, 21:24 | #13 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
|
Based on the IPS numbers on the 68000 you'd need at least 28 MHz. It's not that simple though, as many instructions are missing on the 68000, which would further degrade the performance. The C2P routine also probably uses a few 68020 opcodes.
|
20 February 2022, 22:32 | #14 |
Registered User
Join Date: Apr 2015
Location: Spain
Posts: 511
|
Try to do some tests for 68000, but don't make too much effort either, being able to run this on an A1200 with fast or on an A3000 is already quite an achievement. good work m8!
|
20 February 2022, 23:07 | #15 | |
Registered User
Join Date: Oct 2019
Location: Tuscany countryside
Posts: 44
|
Quote:
Essentially, an offscreen renderer. Best would be: - normal renderer - straight buffer copy to chipram (memcpy without c2p, even if it messes the display) - offscreen only |
|
20 February 2022, 23:07 | #16 |
Registered User
Join Date: Oct 2019
Location: Spain
Posts: 35
|
great work, congrats!
May those optimizations help improving other fps ports? |
20 February 2022, 23:10 | #17 |
Senior Member
Join Date: Jan 2003
Location: Paris
Posts: 134
|
Would it run on an unexpanded 1200 without fast ram?
|
20 February 2022, 23:12 | #18 |
Registered User
Join Date: Jan 2020
Location: oslo/norway
Posts: 1,607
|
This is nice BSzili. Looking forward to try it on my A1200. Thanks.
|
21 February 2022, 02:26 | #19 |
Registered User
Join Date: Jan 2013
Location: Buenos Aires, Argentina
Posts: 255
|
Wow, this is amazing. Congratulations! Waiting for the final version to test it on my 1200! Keep up the good work!
|
21 February 2022, 06:27 | #20 | ||||
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
|
Quote:
Quote:
I already measured these, e.g. just the raycaster, ...+walls, ...+sprites, ...+weapon, ...+c2p etc. Quote:
That's a tough one, probably not in its current state. It's not really the amount of memory that's the problem, but the speed. Quote:
I just realized that there's a special case for the walls that can have its own drawing function, so watch this space. |
||||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blizzard 1230 IV running at 1/3 clock speed (16.7 MHz instead of 50 MHz) | pyksy | support.Hardware | 20 | 26 September 2015 05:36 |
FPU 68882 40 Mhz and crystal 48 Mhz | paulo_becas | support.Hardware | 10 | 09 July 2012 16:47 |
68020 33 MHz | Leandro Jardim | support.WinUAE | 2 | 02 January 2012 19:21 |
For sale: APOLLO 630 33 MHZ for Amiga 600 - 33 MHZ with FPU (brand new) | martin-flash | MarketPlace | 25 | 21 June 2005 10:13 |
|
|