Bad Mood : Falcon030 'Doom'

All 680x0 related coding posts in this section please.

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

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

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Trixster wrote: Sat Dec 03, 2022 9:16 pm However, I've just tried the latest 030 build above and it runs fine now, nice one!
Thanks for letting me know - I probably just broke one or more binaries in that update without realising.
User avatar
Trixster
Captain Atari
Captain Atari
Posts: 194
Joined: Sat Nov 07, 2015 1:15 pm
Location: England

Re: Bad Mood : Falcon030 'Doom'

Post by Trixster »

It's no longer possible to bring the fps counter up?
Atari Falcon CT60e | Atari 2600 | Atari Jaguar | A1200 80mhz B1260 Indi AGA2 Ide-fix Express | SNES
A4000/060 CS Mk2 Indi AGA Voodoo3 G3 950Mhz PPC Deneb | A3000/060 WarpEngine CV64 Deneb 486SXLC2 | PS1
Acorn A3020 | A3000 | A420/1 | BBC B | Atom | Master Turbo | A500 | C64 | 3DO | Saturn | PS2 | CPC6128 | X68000
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Trixster wrote: Sat Dec 03, 2022 9:55 pm It's no longer possible to bring the fps counter up?
It is part of the internal code profiler and which uses FPU, so hitting the '0' key to bring it up would crash machines without FPU. So I turned it off for safety.

I could add it back with a .cfg switch though.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2837
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

With Hatari debugger, one could a very have crude console "FPS counter" using:
  • A tracing breakpoint on a BM function called once per frame ("b pc=symbol :trace :quiet :file frame-inc.ini"), calling debugger "frame-inc.ini" file:

    Code: Select all

    r v0="v0+1"
    
  • VBL tracepoint triggering once a sec ("b VBL != VBL :60 :trace :file show-frames.ini"), calling debugger "show-frames.ini" file:

    Code: Select all

    e v0
    r v0=0
    
BM Hatari binary not being stripped would help in getting suitable BM function name / address. And for 50Hz resolution, one would obviously use ":50", instead of ":60", for the VBL breakpoint trigger count.

I bet BM's normal FPS counter won't be showing the FPS in binary, hex and decimal, like above would do. ;-)

PS. "v0" is one of the 8 Hatari debugger's "virtual" registers, which can be used for storing values.
User avatar
Trixster
Captain Atari
Captain Atari
Posts: 194
Joined: Sat Nov 07, 2015 1:15 pm
Location: England

Re: Bad Mood : Falcon030 'Doom'

Post by Trixster »

dml wrote: Sat Dec 03, 2022 10:22 pm
Trixster wrote: Sat Dec 03, 2022 9:55 pm It's no longer possible to bring the fps counter up?
It is part of the internal code profiler and which uses FPU, so hitting the '0' key to bring it up would crash machines without FPU. So I turned it off for safety.

I could add it back with a .cfg switch though.
If you wouldn’t mind, that’d be great! I find it really interesting to compare the affect of render routines and viewport sizes, plus the impact of using midi or internal sounds when using the 030
Atari Falcon CT60e | Atari 2600 | Atari Jaguar | A1200 80mhz B1260 Indi AGA2 Ide-fix Express | SNES
A4000/060 CS Mk2 Indi AGA Voodoo3 G3 950Mhz PPC Deneb | A3000/060 WarpEngine CV64 Deneb 486SXLC2 | PS1
Acorn A3020 | A3000 | A420/1 | BBC B | Atom | Master Turbo | A500 | C64 | 3DO | Saturn | PS2 | CPC6128 | X68000
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Small update - this version allows the FPS counter to work again. It also sets the FastRAM bit in the 03x/0x0 builds by default.

https://www.dropbox.com/s/zfijpkwg58zve ... 6.zip?dl=1

Just change 'enable_console' to 1 in the .cfg file and it will allow the FPS counter to be toggled with F9, assming you have an FPU fitted (I could rewrite it to separate the FPS counter from the internal profiler and avoid the FPU but I'd rather get on with some other things!)
User avatar
Trixster
Captain Atari
Captain Atari
Posts: 194
Joined: Sat Nov 07, 2015 1:15 pm
Location: England

Re: Bad Mood : Falcon030 'Doom'

Post by Trixster »

Superb, many thanks indeed
Atari Falcon CT60e | Atari 2600 | Atari Jaguar | A1200 80mhz B1260 Indi AGA2 Ide-fix Express | SNES
A4000/060 CS Mk2 Indi AGA Voodoo3 G3 950Mhz PPC Deneb | A3000/060 WarpEngine CV64 Deneb 486SXLC2 | PS1
Acorn A3020 | A3000 | A420/1 | BBC B | Atom | Master Turbo | A500 | C64 | 3DO | Saturn | PS2 | CPC6128 | X68000
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2837
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

dml wrote: Sun Dec 04, 2022 12:05 pm Small update - this version allows the FPS counter to work again. It also sets the FastRAM bit in the 03x/0x0 builds by default.

https://www.dropbox.com/s/zfijpkwg58zve ... 6.zip?dl=1

Just change 'enable_console' to 1 in the .cfg file and it will allow the FPS counter to be toggled with F9, assuming you have an FPU fitted
Works fine, thanks!

I think BM would be pretty much complete if it could also quit gracefully. That can be quite a lot of work though, saving at start all necessary state, and at end stopping DMA sounds + sending MIDI resets + notes off messages, restoring interrupts, video mode and palette... (Did I miss anything?)

Maybe if you give pointers to BM code files (at bitbucket) where one could implement those things, somebody else could (eventually) contribute it?
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Eero Tamminen wrote: Sun Dec 04, 2022 3:58 pm I think BM would be pretty much complete if it could also quit gracefully. That can be quite a lot of work though, saving at start all necessary state, and at end stopping DMA sounds + sending MIDI resets + notes off messages, restoring interrupts, video mode and palette... (Did I miss anything?)

Maybe if you give pointers to BM code files (at bitbucket) where one could implement those things, somebody else could (eventually) contribute it?
It is mostly all implemented and did work at some point, but it is a bit broken. It seems to be trying to draw a gfx patch from the WAD at a time during shutdown when its not available. maybe the disk icon or something. and probably the order of init steps has changed which might have worsened things. i just have not had time to look into it properly.

so its not as if a big pile of code needs written it just need debugged and fixed really.

(i need to commit the current fixes to BB as it is)
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2837
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

dml wrote: Sun Dec 04, 2022 4:01 pm Quit is mostly all implemented and did work at some point, but it is a bit broken. It seems to be trying to draw a gfx patch from the WAD at a time during shutdown when its not available. maybe the disk icon or something. and probably the order of init steps has changed which might have worsened things. i just have not had time to look into it properly.

so its not as if a big pile of code needs written it just need debugged and fixed really.

(i need to commit the current fixes to BB as it is)
Could you provide "bmhat.ttp" with symbols in next update? That way one would see backtraces e.g. to crashes when invoking the debugger (if profiling was enabled in debugger beforehand).
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Eero Tamminen wrote: Mon Dec 05, 2022 12:03 pm Could you provide "bmhat.ttp" with symbols in next update? That way one would see backtraces e.g. to crashes when invoking the debugger (if profiling was enabled in debugger beforehand).
Here is a debug build: https://www.dropbox.com/s/qptbmzzyqwm2n ... g.ttp?dl=1

It's slower than a release build of course and more spammy. It talks to Hatari console via natfeats.

It has symbols but these are difficult to work with because up to as 6 of the 8 available chars is used by symbol prefixes on engine API e.g. _BM_S_????? and I don't think Hatari will read the extended 22-character symbol format straight from the binary. At least earlier versions didn't. Anyway... only the basic symbol format is generated for now at postlink time.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2837
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

dml wrote: Tue Dec 06, 2022 10:32 am Here is a debug build: https://www.dropbox.com/s/qptbmzzyqwm2n ... g.ttp?dl=1

It's slower than a release build of course and more spammy. It talks to Hatari console via natfeats.
Thanks!

I guess these audiodevice warnings are expected?

Code: Select all

I_InitSound: begin...
audiodevice: warning - getsfx failed: DSDSHTGN
audiodevice: warning - getsfx failed: DSDBOPN
audiodevice: warning - getsfx failed: DSDBCLS
audiodevice: warning - getsfx failed: DSDBLOAD
audiodevice: warning - getsfx failed: DSVIPAIN
audiodevice: warning - getsfx failed: DSMNPAIN
audiodevice: warning - getsfx failed: DSPEPAIN
audiodevice: warning - getsfx failed: DSBSPSIT
audiodevice: warning - getsfx failed: DSKNTSIT
audiodevice: warning - getsfx failed: DSVILSIT
audiodevice: warning - getsfx failed: DSMANSIT
audiodevice: warning - getsfx failed: DSPESIT
audiodevice: warning - getsfx failed: DSSKEPCH
audiodevice: warning - getsfx failed: DSVILATK
audiodevice: warning - getsfx failed: DSSKESWG
audiodevice: warning - getsfx failed: DSBSPDTH
audiodevice: warning - getsfx failed: DSVILDTH
audiodevice: warning - getsfx failed: DSKNTDTH
audiodevice: warning - getsfx failed: DSPEDTH
audiodevice: warning - getsfx failed: DSSKEDTH
audiodevice: warning - getsfx failed: DSBSPACT
audiodevice: warning - getsfx failed: DSBSPWLK
audiodevice: warning - getsfx failed: DSVILACT
audiodevice: warning - getsfx failed: DSFLAME
audiodevice: warning - getsfx failed: DSFLAMST
audiodevice: warning - getsfx failed: DSBOSPIT
audiodevice: warning - getsfx failed: DSBOSCUB
audiodevice: warning - getsfx failed: DSBOSSIT
audiodevice: warning - getsfx failed: DSBOSPN
audiodevice: warning - getsfx failed: DSBOSDTH
audiodevice: warning - getsfx failed: DSMANATK
audiodevice: warning - getsfx failed: DSMANDTH
audiodevice: warning - getsfx failed: DSSSSIT
audiodevice: warning - getsfx failed: DSSSDTH
audiodevice: warning - getsfx failed: DSKEENPN
audiodevice: warning - getsfx failed: DSKEENDT
audiodevice: warning - getsfx failed: DSSKEACT
audiodevice: warning - getsfx failed: DSSKESIT
audiodevice: warning - getsfx failed: DSSKEATK
audiodevice: warning - getsfx failed: DSRADIO
audiodevice: warning - can't compute joinpoints for sample [beep]
audiodevice: warning - can't compute jumppoints for sample [beep]
audiodevice: warning - can't compute joinpoints for sample [sqrwv]
...pre-cached all sound data
dml wrote: Tue Dec 06, 2022 10:32 am It has symbols but these are difficult to work with because up to as 6 of the 8 available chars is used by symbol prefixes on engine API e.g. _BM_S_????? and I don't think Hatari will read the extended 22-character symbol format straight from the binary. At least earlier versions didn't. Anyway... only the basic symbol format is generated for now at postlink time.
Hatari supports nowadays all symbol (DRI, a.out, Pure-C) formats thanks to patches by Thorsten Otto, and has supported extended symbol names for a long time. So it would be good to have full symbol information available.

(Loading symbol information from pre-processed ASCII files is nowadays needed only for removing extra symbols, so that things like loop symbols don't slow down profiling and confuse people interpreting the profiles.)

When the crash on Quit happens, EmuTOS shows this:

Code: Select all

Panic: Bus Error
Panic: Bus Error
fw=b008 ir=0000 ssr=0065
fw=b008 ir=0000 ssr=0065
addr=ffff0000 sr=2304 pc=000368a8
addr=ffff0000 sr=2304 pc=000368a8

D0-3: 00000000 00000000 ffff0000 00b800ff

D0-3: 00000000 00000000 ffff0000 00b800ff
D4-7: 00000280 00000011 00002d26 000f0892
D4-7: 00000280 00000011 00002d26 000f0892
A0-3: 001957e0 000004f0 ffff0000 0000210f
A0-3: 001957e0 000004f0 ffff0000 0000210f
A4-7: 0052fb64 00000000 00508066 0021c760
A4-7: 0052fb64 00000000 00508066 0021c760
 USP: 00b8c480

 USP: 00b8c480

basepage=0001539c
basepage=0001539c
text=0001549c data=0008a952 bss=000d3b02
text=0001549c data=0008a952 bss=000d3b02
Crash at text+0002140c
Crash at text+0002140c

*** Press any key to continue ***
And invoking Hatari debugger shows following backtrace (when I've enabled profiling earlier):

Code: Select all

Finalizing costs for 4 non-returned functions:
- 1. 0xe502d2: _V_DrawP +0xe19af8 (_etext +0xdc5980)
- 2. 0x022970: _M_Write +0x74
- 3. 0x022c40: _M_Drawe +0x104
- 4. 0x01e7ac: _D_Displ +0x396
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Eero Tamminen wrote: Tue Dec 06, 2022 1:48 pm Hatari supports nowadays all symbol (DRI, a.out, Pure-C) formats thanks to patches by Thorsten Otto, and has supported extended symbol names for a long time. So it would be good to have full symbol information available.
(Loading symbol information from pre-processed ASCII files is nowadays needed only for removing extra symbols, so that things like loop symbols don't slow down profiling and confuse people interpreting the profiles.)
I think the last time I tried to use extended symbols was around Hatari 1.7-1.8. At that time it was not working. I tried it directly from Devpac and it wasn't working there either. We had some brief conversations about it but I don't remember what the conclusion was. Probably 20 or 30 miles back in the post history :P

We used your ASCII based import at that time for BM, which worked ok.

However I think that was before moving to the elf-based GCC. So it's not easy to retest that situation now on this project.
Eero Tamminen wrote: Tue Dec 06, 2022 1:48 pm And invoking Hatari debugger shows following backtrace (when I've enabled profiling earlier):

Code: Select all

Finalizing costs for 4 non-returned functions:
- 1. 0xe502d2: _V_DrawP +0xe19af8 (_etext +0xdc5980)
- 2. 0x022970: _M_Write +0x74
- 3. 0x022c40: _M_Drawe +0x104
- 4. 0x01e7ac: _D_Displ +0x396
Yes this is what I saw too when I backtraced it. It's trying to draw a patch which is no longer available. However I am sure its not the only issue shutting down, just the first thing in line...
User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 843
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Bad Mood : Falcon030 'Doom'

Post by Anima »

Thanks Doug for the ongoing development. I yet have to check BM out on a real machine, though.

My AI generation of gfx assets attempt stalled somehow but here‘s an another interesting story. Probably less important for the DSP path but still worth a read:

https://towardsdatascience.com/how-deep ... 4557e9f861
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Anima wrote: Thu Dec 08, 2022 12:08 pm Probably less important for the DSP path but still worth a read:
https://towardsdatascience.com/how-deep ... 4557e9f861
Yeah that's an interesting result.

It also appears possible to replace matrices entirely in some cases with approximations using very simple arrangements of 'neurons' themselves.

This will only be an approximation for range-bounded inputs. And to be worthwhile the network implementation needs to use a very simplified activation function so it can be flattened down to mul+add sequences. I played with this a bit in the past but was time consuming and didn't fit the thing I was doing.

What I found interesting is a kind of area-to-volume thing going on with the number of neurons needed vs the number of matrix cells, it gets more efficient as the matrix gets bigger. The kind of matrices we use in 3D stuff are at the threshold though - it works better for functions using matrices combined with something else.
User avatar
shoggoth
Nature
Nature
Posts: 1222
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Bad Mood : Falcon030 'Doom'

Post by shoggoth »

Finished EP 4. I had to IDCLIP myself back to the map a couple of times (where a couple == two). I had 2-3 hangs too, but "remember, save early, save often" saved me. EP 4 clearly was designed later, has higher CPU requirements etc, but except for a few places it was pure action.
Ain't no space like PeP-space.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2837
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

shoggoth wrote: Fri Dec 09, 2022 6:38 pm Finished EP 4. I had to IDCLIP myself back to the map a couple of times (where a couple == two). I had 2-3 hangs too, but "remember, save early, save often" saved me. EP 4 clearly was designed later, has higher CPU requirements etc, but except for a few places it was pure action.
I'm not too familiar with Doom terminology. Is "EP 4" some well know additional Doom WAD, or just reference to last of the Doom I levels?

And what's IDCLIP?
User avatar
Ragstaff
Atari Super Hero
Atari Super Hero
Posts: 631
Joined: Mon Oct 20, 2003 3:39 am
Location: Melbourne Australia
Contact:

Re: Bad Mood : Falcon030 'Doom'

Post by Ragstaff »

Eero Tamminen wrote: Fri Dec 09, 2022 10:40 pm I'm not too familiar with Doom terminology. Is "EP 4" some well know additional Doom WAD, or just reference to last of the Doom I levels?

And what's IDCLIP?
The full Doom WAD originally had 3 episodes. The shareware WAD had only the first episode.
Ultimate Doom (version 1.9) was the final release of Doom 1 to hit shelves, a couple of years later. It included a new episode 4, "Thy Flesh Consumed", as well as minor bug fixes and small revisions to the existing levels.
IDCLIP is a cheat code you type while playing to turn off clipping. You can walk through walls and enemies. I remember the original cheat code was harder to remember. IDKPISPOPD or something like that 😂 Became IDCLIP in Doom 2
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

idclip/idspispopd = walk through walls
idfa = full armour & helalth
idkfa = get all the nice kit, armour and health
iddqd = god mode
idchoppers = chainsaw
idclev eXmY = hop to episode X mission Y
idmus NN = change music

and... idbehold? gave some extras but I forget what they are, on a wiki somewhere!
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

shoggoth wrote: Fri Dec 09, 2022 6:38 pm Finished EP 4. I had to IDCLIP myself back to the map a couple of times (where a couple == two). I had 2-3 hangs too, but "remember, save early, save often" saved me. EP 4 clearly was designed later, has higher CPU requirements etc, but except for a few places it was pure action.
Achievement unlocked :) EP4 is hard.

I wonder if those hangs are repeatable. I should have a go with a debug build to see if i can catch anything.

As you point out, EP4 was made later and for faster PCs, so the levels are made quite differently. Lots of sector joins, high depth complexity (esp. e4m2 - which I think is the one that has nearly the whole map in view from the very start, not really in the spirit of the BSP scene management idea!). So at 16mhz that is pushing things as a realtime experience in places :) Some maps do play well though and the map design is good.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2837
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

"mt32-pi" (mentioned in another thread here): https://github.com/dwhinham/mt32-pi

Sounds like nice standalone (build-your-own) MIDI output companion for Bad Mood, if the real Roland MT-32 is too hard to find or expensive. :-)
User avatar
LaceySnr
Captain Atari
Captain Atari
Posts: 223
Joined: Wed Jun 26, 2013 5:00 am
Contact:

Re: Bad Mood : Falcon030 'Doom'

Post by LaceySnr »

dml wrote: Fri Sep 30, 2022 8:31 am (AGT now supports ultraDev as a remote console on the VGA port, with coloured warning/error logging, game entity metrics & profiling)
So I have my ultraDev cart now - for AGT is it just the one switch in the Makefile to enable that output? Hopefully get my code running tonight. Bought a cheapy VGA->HDMI adapter so I can get the output from the cart on one half of my monitor.
Post Reply

Return to “680x0”