English Amiga Board


Go Back   English Amiga Board > Other Projects > project.Amiga Game Factory

 
 
Thread Tools
Old 20 February 2022, 08:40   #1
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 765
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.
BSzili is online now  
Old 20 February 2022, 09:17   #2
Valken
Registered User
 
Join Date: Feb 2009
Location: Amiga
Posts: 460
Does this version support WASD and mouse look controls?
Valken is offline  
Old 20 February 2022, 09:23   #3
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 765
There are no modern controls, it has the same limitations as the original DOS version.
BSzili is online now  
Old 20 February 2022, 15:59   #4
zzbylu
Saberman

zzbylu's Avatar
 
Join Date: Dec 2016
Location: Kielce/Poland
Posts: 222
Gameplay:
[ Show youtube player ]
zzbylu is offline  
Old 20 February 2022, 17:00   #5
DanyPPC
Registered User

 
Join Date: Dec 2016
Location: Italy
Posts: 412
It seems good, but framerate from the video doen't appear to be real.
DanyPPC is online now  
Old 20 February 2022, 17:51   #6
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 765
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.
BSzili is online now  
Old 20 February 2022, 18:20   #7
Estrayk
Registered User

Estrayk's Avatar
 
Join Date: Apr 2015
Location: Spain
Posts: 358
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?
Estrayk is offline  
Old 20 February 2022, 18:23   #8
Nobby_UK
Registered User
Nobby_UK's Avatar
 
Join Date: Jul 2013
Location: Liverpool
Posts: 2,134
So far so good (I miss the music)
Attached Thumbnails
Click image for larger version

Name:	205.png
Views:	251
Size:	17.0 KB
ID:	74767  
Nobby_UK is offline  
Old 20 February 2022, 19:05   #9
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 765
Quote:
Originally Posted by Estrayk View Post
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?
For now it needs an 68020 as a minimum, but later I'll see if I can make a version for higher clocked 68000s. Don't expect it to run on at 7 MHz, the raycaster is not to be underestimated.
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.

Quote:
Originally Posted by Nobby_UK View Post
So far so good (I miss the music)
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.
BSzili is online now  
Old 20 February 2022, 20:00   #10
amiman99
Registered User

amiman99's Avatar
 
Join Date: Sep 2009
Location: San Antonio, TX USA
Age: 48
Posts: 1,138
Are going to have an option to run the game 1x1 on faster Amigas?
amiman99 is offline  
Old 20 February 2022, 20:09   #11
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 765
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.
BSzili is online now  
Old 20 February 2022, 20:23   #12
d4rk3lf
Registered User

d4rk3lf's Avatar
 
Join Date: Jul 2015
Location: Novi Sad, Serbia
Posts: 1,366
Quote:
Originally Posted by BSzili View Post
For now it needs an 68020 as a minimum, but later I'll see if I can make a version for higher clocked 68000s. Don't expect it to run on at 7 MHz, the raycaster is not to be underestimated.
Minimum for Aca 500+ is 14Mhz, but it can go up to 42Mhz, and it have additional 7MB fast Ram.
Can't wait to test, if you make possible to be played on 68k.
d4rk3lf is offline  
Old 20 February 2022, 21:24   #13
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 765
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.
BSzili is online now  
Old 20 February 2022, 22:32   #14
Estrayk
Registered User

Estrayk's Avatar
 
Join Date: Apr 2015
Location: Spain
Posts: 358
Quote:
Originally Posted by BSzili View Post
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.
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!
Estrayk is offline  
Old 20 February 2022, 23:07   #15
suppah
Registered User

suppah's Avatar
 
Join Date: Oct 2019
Location: Tuscany countryside
Posts: 35
Quote:
Originally Posted by BSzili View Post
This means no chunky modes, no fast dedicated video memory, no drawing multiple pixels with a single write, etc.
As C2P will slow down a poor a 68020 it'd be nice to have a key to stop rendering on the screen while mantaining the FPS counter to see how much the CP2 and the copy in slow chip memory eats of the cpu.

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
suppah is offline  
Old 20 February 2022, 23:07   #16
x-vision
Registered User

 
Join Date: Oct 2019
Location: Spain
Posts: 29
great work, congrats!

May those optimizations help improving other fps ports?
x-vision is offline  
Old 20 February 2022, 23:10   #17
Leo42
Senior Member
Leo42's Avatar
 
Join Date: Jan 2003
Location: Paris
Posts: 133
Would it run on an unexpanded 1200 without fast ram?
Leo42 is offline  
Old 20 February 2022, 23:12   #18
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 1,147
This is nice BSzili. Looking forward to try it on my A1200. Thanks.
nikosidis is offline  
Old 21 February 2022, 02:26   #19
Hache
Registered User
Hache's Avatar
 
Join Date: Jan 2013
Location: Buenos Aires, Argentina
Posts: 215
Wow, this is amazing. Congratulations! Waiting for the final version to test it on my 1200! Keep up the good work!
Hache is offline  
Old 21 February 2022, 06:27   #20
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 765
Quote:
Originally Posted by Estrayk View Post
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!
I recompiled just the the C code for 68k and it doesn't look that good, so I'll probably leave this for another day.

Quote:
Originally Posted by suppah View Post
As C2P will slow down a poor a 68020 it'd be nice to have a key to stop rendering on the screen while mantaining the FPS counter to see how much the CP2 and the copy in slow chip memory eats of the cpu.

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
That's already possible as most of the screen uses native (planar) bitmaps. You can render everything save for the 3D view without C2P, i.e. there's no chunky in the menus at all, status bar.
I already measured these, e.g. just the raycaster, ...+walls, ...+sprites, ...+weapon, ...+c2p etc.

Quote:
Originally Posted by x-vision View Post
great work, congrats!

May those optimizations help improving other fps ports?
Thanks. Yes, once I'm done I'll backport everything into Blake Stone.

Quote:
Originally Posted by Leo42 View Post
Would it run on an unexpanded 1200 without fast ram?
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:
Originally Posted by nikosidis View Post
This is nice BSzili. Looking forward to try it on my A1200. Thanks.
Let me know how it runs!

Quote:
Originally Posted by Hache View Post
Wow, this is amazing. Congratulations! Waiting for the final version to test it on my 1200! Keep up the good work!
I just realized that there's a special case for the walls that can have its own drawing function, so watch this space.
BSzili is online now  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Page generated in 0.11505 seconds with 14 queries