Bad Mood : Falcon030 'Doom'

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

ctirad
Captain Atari
Captain Atari
Posts: 299
Joined: Sun Jul 15, 2012 9:44 pm

Re: Bad Mood : Falcon030 'Doom'

Postby ctirad » Fri Jan 17, 2014 8:56 pm

I just tested it on the FX card with 8MB of alternate RAM and it works perfectly. Even the highest speed mode with the 40MHz CPU (double clocked), 20MHz BUS and 50MHz DSP works. The speed increase compared to the plain F030 is not much significant, though. Eventually I will test it on the other machine with the 50/25MHz (Phantom) and 14MB RAM.

I see one unrelated glitch, though. The custom VGA mode you use is probably slightly out of the sync, because on my LCD TV there are flashing lines and the picture is somewhat jumpy.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Fri Jan 17, 2014 9:01 pm

ctirad wrote:I just tested it on the FX card with 8MB of alternate RAM and it works perfectly. Even the highest speed mode with the 40MHz CPU (double clocked), 20MHz BUS and 50MHz DSP works. The speed increase compared to the plain F030 is not much significant, though. Eventually I will test it on the other machine with the 50/25MHz (Phantom) and 14MB RAM.

I see one unrelated glitch, though. The custom VGA mode you use is probably slightly out of the sync, because on my LCD TV there are flashing lines and the picture is somewhat jumpy.


Thanks for reporting this.

The game framerate is capped at 12FPS, but you should find (with any luck) it lets you use a bigger, higher res window without framedropping so easily. It just wont go beyond 12FPS at any time.

I set the VGA mode to 55Hz, but I worry if it might be a bit too low for some more modern monitors to hold sync. Fortunately this is easy to fix if it is the reason...

User avatar
dhedberg
Atari God
Atari God
Posts: 1128
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Bad Mood : Falcon030 'Doom'

Postby dhedberg » Fri Jan 17, 2014 10:26 pm

Ha! I haven't played DOOM for years and years... but today I played it again, for over an hour and loved it... on my Falcon! Crazy!

Doug, what you've accomplished so far is impressive to say the least! I never thought I would play DOOM on my Falcon, at least not with a decent frame rate! Bad Mood is not just DOOM for the Falcon, it's a playable implementation of DOOM. Can't wait for the next release! :wink:

Way to go!
:cheers:
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo and feel the JOY.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Fri Jan 17, 2014 10:29 pm

dhedberg wrote:Ha! I haven't played DOOM for years and years... but today I played it again, for over an hour and loved it... on my Falcon! Crazy!

Doug, what you've accomplished so far is impressive to say the least! I never thought I would play DOOM on my Falcon, at least not with a decent frame rate! Bad Mood is not just DOOM for the Falcon, it's a playable implementation of DOOM. Can't wait for the next release! :wink:

Way to go!
:cheers:


Really this means a lot to me!

And I once again must thank Eero for his time and effort helping me, willingness to modify Hatari just for me (!!) and spend ages profiling stuff for me. It really helped get the alpha ready and out the door.

EvilFranky
Atari Super Hero
Atari Super Hero
Posts: 871
Joined: Thu Sep 11, 2003 10:49 pm
Location: UK
Contact:

Re: Bad Mood : Falcon030 'Doom'

Postby EvilFranky » Fri Jan 17, 2014 10:32 pm

It's ridiculously good Doug, you should be very proud of yourself.

Hatari is faster than my Falcon using a VGA TFT, definitely best on RGB! :)

User avatar
dhedberg
Atari God
Atari God
Posts: 1128
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Bad Mood : Falcon030 'Doom'

Postby dhedberg » Fri Jan 17, 2014 10:36 pm

dml wrote:
dhedberg wrote:Ha! I haven't played DOOM for years and years... but today I played it again, for over an hour and loved it... on my Falcon! Crazy!

Doug, what you've accomplished so far is impressive to say the least! I never thought I would play DOOM on my Falcon, at least not with a decent frame rate! Bad Mood is not just DOOM for the Falcon, it's a playable implementation of DOOM. Can't wait for the next release! :wink:

Way to go!
:cheers:

Really this means a lot to me!

And I once again must thank Eero for his time and effort helping me, willingness to modify Hatari just for me (!!) and spend ages profiling stuff for me. It really helped get the alpha ready and out the door.

True! Many thanks to Eero as well! Great job both of you!
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo and feel the JOY.

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2025
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Postby Eero Tamminen » Fri Jan 17, 2014 10:43 pm

dml wrote:willingness to modify Hatari just for me


I had always wanted to have good profiling utility for Atari. You really helped getting it working, and were essential in getting especially the DSP side accurate. It's always nice when the code is useful also for others, it helping getting Doom working properly for Atari and excellent feedback makes it much more fun.

BM was really huge effort on your part, as they say, the last 20% takes 80% of the time (and requires a lot of perseverance as it needs so much testing & hard debugging). Congratulations on the release! :-)

Btw. Looking at the alpha release limitations list in the readme, these seem me most important for normal Doom gameplay:

Code: Select all

- No visible indication of health damage / pickups (original uses palette
  switches, truecolour mode needs alternative).
- Atari Joypad support incomplete.
- No ingame 'messages' from pickups, progress etc. Text drawing from original
  C code is way too slow, needs replaced.


There was earlier some discussion about how to handle damage indication, have you decided how you're going to do that?

Can one e.g. set on Falcon the border color separately, also on TC mode which doesn't have palette? Then it could have some palette fade in and out too. If that doesn't work, drawing few pixels of red just around the screen area edges might look OK.

As to other limitations... The physics calibration, drawing of some secret walls and finale are important for completing levels, and game recording & replay important for bragging about doing that on Falcon. :-)

[EDIT] Although nowadays, video camera & Youtube is probably more popular option than in-game recording as recording gameplay with Falcon might be too slow... Falcon recordings would be nice for profiling the more optimized BM version though.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Fri Jan 17, 2014 11:18 pm

Eero Tamminen wrote:I had always wanted to have good profiling utility for Atari. You really helped getting it working, and were essential in getting especially the DSP side accurate. It's always nice when the code is useful also for others, it helping getting Doom working properly for Atari and excellent feedback makes it much more fun.


In fact I really meant to put more about Hatari & the profiler in the release notes, but it's one of the things which I didn't actually *write down* and forgot. It really deserves to go in there because it was a big part of the recent push to make a good first release. I'll fix it for next time!

Eero Tamminen wrote:BM was really huge effort on your part, as they say, the last 20% takes 80% of the time (and requires a lot of perseverance as it needs so much testing & hard debugging). Congratulations on the release! :-)


Well the issue list is still quite long and there are some important things on it, but it had to be cut short before everyone gets bored waiting to play something :)

Eero Tamminen wrote:Btw. Looking at the alpha release limitations list in the readme, these seem me most important for normal Doom gameplay:

Code: Select all

- No visible indication of health damage / pickups (original uses palette
  switches, truecolour mode needs alternative).
- Atari Joypad support incomplete.
- No ingame 'messages' from pickups, progress etc. Text drawing from original
  C code is way too slow, needs replaced.



Yes these are important ones. Actually the messages is probably the most tricky because it will be a reasonable amount of effort to optimize (not just drawing but lots of sprawling C console / print stuff behind it). The cost measured quite high in profiling. I probably will do the other things first. But I'll try to address it somewhere along the road.

Eero Tamminen wrote:There was earlier some discussion about how to handle damage indication, have you decided how you're going to do that?


Yes I finally have a few ideas on this one. But I'd like to try them first, in case they get quickly reclassified as 'bad ideas'.

I also thought of a good number of new things, which should map well to the Falcon and improve the look & feel a bit. ;-)

Eero Tamminen wrote:Can one e.g. set on Falcon the border color separately, also on TC mode which doesn't have palette? Then it could have some palette fade in and out too. If that doesn't work, drawing few pixels of red just around the screen area edges might look OK.


I think if all else fails, drawing some sort of border overlay will be ok. But we'll see if the current idea works first. I just need to do some tests.

BTW there are other issues associated with this, which is why I'd like to try some other tricks. e.g. invulnerability and invisibility modes.
Eero Tamminen wrote:As to other limitations... The physics calibration, drawing of some secret walls and finale are important for completing levels, and game recording & replay important for bragging about doing that on Falcon. :-)


I think demo record/replay should be quite possible. I just need to review the game code optimizations to make sure none of them cause desync by implication, i.e. initial conditions are fixed and all state is deterministic.

Physics calibration and secret walls are important for gameplay and high on my list.

Eero Tamminen wrote:[EDIT] Although nowadays, video camera & Youtube is probably more popular option than in-game recording as recording gameplay with Falcon might be too slow... Falcon recordings would be nice for profiling the more optimized BM version though.


I would definitely like to have demo replay for profiling/optimization, you can be sure of it :-)

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2025
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Postby Eero Tamminen » Fri Jan 17, 2014 11:28 pm

Based on earlier messages, I did some testing in Hatari for the alpha release binary.

With non-functional or missing DSP, BM crashing after loading statusbar. FPU missing doesn't matter.

With just 4MB, BM freezes at startup after outputting "Z_Init: Init zone memory allocation daemon.".

With 8MB, BM bus errors at level loading.

-> Maybe some early check for the amount of RAM could be added.

Starting a game and letting game idle for ~10 minutes with Hatari crashes BM. Could this be related to the IKBD trouble?

With fast-forward I see crash to Exception 3 & 2, without fast-forwarding I get:

Code: Select all

 Illegal IO memory access: IoMem_lput($fffffe)


[EDIT] Completely reproducible. Not affected whether I have NatFeats enabled or not, or whether Hatari's window is visible or not (which might make some difference to SDL from which Hatari gets its input events).

Reason why I haven't seen this while profiling might be it ending faster and actually doing something, or me using GCC 2.x builds.
Last edited by Eero Tamminen on Fri Jan 17, 2014 11:42 pm, edited 1 time in total.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Fri Jan 17, 2014 11:40 pm

Eero Tamminen wrote:With non-functional or missing DSP, BM crashing after loading statusbar. FPU missing doesn't matter.


Haha, it won't get far without a DSP - no. :-)

Eero Tamminen wrote:With just 4MB, BM freezes at startup after outputting "Z_Init: Init zone memory allocation daemon.".


Yes, I have seen this one.

Eero Tamminen wrote:With 8MB, BM bus errors at level loading.


Ok. Is it possible at all to have 8MB on a Falcon though?

Eero Tamminen wrote:-> Maybe some early check for the amount of RAM could be added.


Yes, that's fair - for 4MB anyway. It's reasonable to assume somebody will try it on 4MB and get confused.

Eero Tamminen wrote:Starting a game and letting game idle for ~10 minutes with Hatari crashes BM (NatFeats not enabled). Could this be related to the IKBD trouble?


Unlikely, I've only seen the IKBD thing while (very) actively using the mouse. I also haven't encountered it in the alpha release yet, with the most recent changes (although I haven't fully diagnosed it either).

Crashing while idling - never seen that - although some rare printfs might still be active and those can cause problems. I planned to stub them all out but kept them for the sake of the familiar startup sequence. I'll conduct a review of all printfs again soon.

I'll also test here to see if I can reproduce.

Eero Tamminen wrote:With fast-forward I see crash to Exception 3 & 2, without fast-forwarding I get:

Code: Select all

 Illegal IO memory access: IoMem_lput($fffffe)


Reason why I haven't seen this while profiling might be it ending faster and actually doing something, or me using GCC 2.x builds.


What is it doing while idling? Sitting on the menus, or in a level somewhere?

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2025
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Postby Eero Tamminen » Fri Jan 17, 2014 11:47 pm

dml wrote:What is it doing while idling? Sitting on the menus, or in a level somewhere?


I just start the shareware level, and leave BM there for some minutes.

As the adress in error is large/negative, maybe something is stomping all over memory? Or takes negative signed offset from NULL?

[EDIT] "--trace io_write" might help, but produces huge amount of output.

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2025
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Postby Eero Tamminen » Sat Jan 18, 2014 12:01 am

After waiting ~8 mins, the IO write output changed to this pattern:

Code: Select all

0x05f34e: IO write.b $fffa1b = $08
0x05f33c: IO write.b $fffa07 = $21
0x05f342: IO write.b $fffa1b = $00
0x05f346: IO write.b $fffa21 = $a6
0x05f34e: IO write.b $fffa1b = $08
0x05f33c: IO write.b $fffa07 = $21
0x05f342: IO write.b $fffa1b = $00
0x05f346: IO write.b $fffa21 = $a6
0x05f34e: IO write.b $fffa1b = $08
0x05f33c: IO write.b $fffa07 = $21


Shortly after that the emulation rebooted.

ctirad
Captain Atari
Captain Atari
Posts: 299
Joined: Sun Jul 15, 2012 9:44 pm

Re: Bad Mood : Falcon030 'Doom'

Postby ctirad » Sat Jan 18, 2014 12:41 am

dml wrote:Ok. Is it possible at all to have 8MB on a Falcon though?


It is possible when you have Magnum or FX card.

BTW, the pmdoom runs at 4MB, while it is still use the truecolor mode.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 10:05 am

Eero Tamminen wrote:I just start the shareware level, and leave BM there for some minutes.


So it's actually in the level itself waiting for player input? Not sitting in the attractmode/titles/menus?

Eero Tamminen wrote:As the adress in error is large/negative, maybe something is stomping all over memory? Or takes negative signed offset from NULL?
[EDIT] "--trace io_write" might help, but produces huge amount of output.


TBH I have not tested much with the old shareware WAD, I'll look at it next chance I get.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 10:29 am

ctirad wrote:It is possible when you have Magnum or FX card.


Ok, that seems fair. I had pretty much assumed any FastRAM upgrades would always add a significant amount of RAM (e.g. 16MB+) since the address bus for local ram is 32bits and isn't limited in the same way as STRam... but I suppose 4MB+4MB is quite possible too.

ctirad wrote:BTW, the pmdoom runs at 4MB, while it is still use the truecolor mode.


I wasn't sure if PMDoom ran in 4MB, although I think somebody else here may have mentioned the specs earlier in the thread.

However - there are significant differences between PMDoom and BadMood, they don't use truecolour in the same way. PMDoom is essentially a port and optimization of the C code, whereas BM was coded independently, and then 'glued' onto Doom.

BadMood uses custom texture formats, mipmaps (up to 5 pages for each texture), unrolled textures to accelerat tiling etc. etc. PMDoom uses 8-bit compressed posts direct from the WAD, for everything.

It's also important to take into account the fact that 'BMDoom' is Doom with a smallish portion snipped out, and a larger object 'piggybacking' on top of it (the BadMood viewer/engine). Note that the executable is already 750k (approaching 1/4 of the 4MB budget, and ignoring GEM and the framebuffers and so on). Both Doom and BM want to own their own ram - they need independent memory pools which are in competition for space. Some data is even loaded twice (once by Doom, once by BadMood). This is a side effect of the way two completely separate systems were joined together.

This is a bit unfortunate, but space inefficiency is the current price for a 'fast' engine on Falcon. Some of it is also temporary and can be fixed. Some of it is permanent, and needed for speed.

I will address some of the more obvious memory problems in time, but even after optimizing memory use, It may still end up needing 6MB of logical ram.

There are some things which can probably be done to make it run on a 4MB machine but those won't involve shrinking code or data or dynamic memory use. It will probably involve virtual memory and a swapfile, to make lots of logical ram available, through a small amount of physical ram. For now I'm speculating but will see what happens later.

User avatar
shoggoth
Nature
Nature
Posts: 989
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Bad Mood : Falcon030 'Doom'

Postby shoggoth » Sat Jan 18, 2014 12:45 pm

Playable Doom on a stock machine. Omg. Just tried it - it exceeds all expectations. Been playing for an hour.
Ain't no space like PeP-space.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 1:22 pm

shoggoth wrote:Playable Doom on a stock machine. Omg. Just tried it - it exceeds all expectations. Been playing for an hour.


Great! :)

Once the bug reports start to tail off I'll go through them and fix what I can, and post an updated binary.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 1:23 pm

Eero Tamminen wrote:After waiting ~8 mins, the IO write output changed to this pattern:


I was able to confirm this quickly before leaving this morning - it happened in Hatari with FF enabled. I also booted the Falcon and did the same, but it seemed to last for 10 mins or more, before I had to shut things down.

I'll look at it more closely in Hatari and see what's going on.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 1:35 pm

ctirad wrote:I see one unrelated glitch, though. The custom VGA mode you use is probably slightly out of the sync, because on my LCD TV there are flashing lines and the picture is somewhat jumpy.


I think I have seen this myself, although it is infrequent. Somebody else has reported it detecting a VGA monitor as RGB (or something to that effect). So it seems the display setup code and Videl settings need a closer look.

ctirad wrote:I just tested it on the FX card with 8MB of alternate RAM and it works perfectly. Even the highest speed mode with the 40MHz CPU (double clocked), 20MHz BUS and 50MHz DSP works. The speed increase compared to the plain F030 is not much significant, though. Eventually I will test it on the other machine with the 50/25MHz (Phantom) and 14MB RAM.


BTW I'm tempted to send you a special version without the 12Hz cap (e.g. raise it to 24 or 25Hz) to see what happens.

It is quite possible though you will see strange performance behaviour on such a machine - there might be a lot of variance. Some textures will be in FastRAM and some in STRam and the speed of drawing will change quite dramatically from one texture to another, and it might even be flaky in the fastest cases (although, with a 50MHz DSP I think you should avoid most of those kinds of problems even with fast CPU and FastRAM)

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 1:44 pm

EvilFranky wrote:Hatari is faster than my Falcon using a VGA TFT, definitely best on RGB! :)


I don't know if you saw it in the README but there's a hint to try XLOD+YLOD+fullscreen on VGA. It may run faster - or at least, about the same speed as default with full sized display. It can only use hardware pixel doubling in fullscreen on VGA (which gives it a speed kick).

Generally, RGB is preferred though - yes.

I might add a special mode which allows both fullscreen and no statusbar at the same time, so the videl can be put to sleep on unused scanlines, and claw back some bus cycles on VGA.

I still need to finish implementing Shoggoth's idea of custom SCP modes loaded on startup, for fullscreen (or equiv.) display. That's another way to speed up VGA mode a bit. The dynamic profiles are already in there but not quite able to read the data yet.

User avatar
jvas
Captain Atari
Captain Atari
Posts: 462
Joined: Fri Jan 28, 2005 4:30 pm
Location: Budapest, Hungary
Contact:

Re: Bad Mood : Falcon030 'Doom'

Postby jvas » Sat Jan 18, 2014 1:55 pm

Really outstanding!!! Thanks four your hard work!
Is it me, or what, but the game saves 0Byte files. Should saving/loading work? (I use an external SCSI CF card reader)

User avatar
viking272
Captain Atari
Captain Atari
Posts: 411
Joined: Mon Oct 13, 2008 12:50 pm
Location: west of London, UK

Re: Bad Mood : Falcon030 'Doom'

Postby viking272 » Sat Jan 18, 2014 1:55 pm

dml wrote:
BTW I'm tempted to send you a special version without the 12Hz cap (e.g. raise it to 24 or 25Hz) to see what happens.


I think many would be interested to see how this performs.

I know I shouldn't raise this but.. would 060/SuperVidel support be out the question?
Edit: For someone else potentially
Sent from my GT-I9300 using Tapatalk 4
Last edited by viking272 on Sat Jan 18, 2014 2:13 pm, edited 1 time in total.

User avatar
jvas
Captain Atari
Captain Atari
Posts: 462
Joined: Fri Jan 28, 2005 4:30 pm
Location: Budapest, Hungary
Contact:

Re: Bad Mood : Falcon030 'Doom'

Postby jvas » Sat Jan 18, 2014 2:06 pm


User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 2:11 pm

jvas wrote:Really outstanding!!! Thanks four your hard work!
Is it me, or what, but the game saves 0Byte files. Should saving/loading work? (I use an external SCSI CF card reader)


Thanks for letting me know - I tested game saves last week and it seemed fine, but I didn't try more than a few times. Will check it again in case something broke before the release.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Postby dml » Sat Jan 18, 2014 2:16 pm

viking272 wrote:I know I shouldn't raise this but.. would 060/SuperVidel support be out the question?


It's not out of the question but it would immediately become DSP-limited, and the limit might be quite severe if the DSP is 32MHz.

...compared with the 060 doing everything on its own, at 60-100MHz or so, as the superscalar thingumybob that it is :-)


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 4 guests