Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A600 Memory

AuthorTopic: AmiWolf AGA - new Wolfenstein 3D Port  (Read 13079 times)

0 Members and 1 Guest are viewing this topic.

Offline ChaosLord

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #30 on: August 02, 2013, 01:51:51 AM »
Quote from: commodorejohn;743392
Just curious, if you're already doing MIDI playback would it be much trouble to have an option to send it over the serial port instead? It'd lighten the CPU load and allow for a significant increase in music quality.


Sending data over the serial port is extremely CPU intensive.

How many bits of data would be getting sent per second?

I assume not much so maybe it won't be a big deal.
But it won't lighten the cpu load compared to playing the sound samples with Paula.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #31 on: August 02, 2013, 01:55:20 AM »
Quote from: NovaCoder;743393
Hiya,

To use the chipset to play MIDI is pretty easy because I can re-use the code I did from BOOM (my DOOM port).


And everyone who plays the game will be able to hear the soundfx.  No external hardware required.

And using Paula to play the samples will lighten your CPU load.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline commodorejohn

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #32 on: August 02, 2013, 02:01:16 AM »
Quote from: ChaosLord;743398
Sending data over the serial port is extremely CPU intensive.

How many bits of data would be getting sent per second?
The MIDI transfer rate is 31.25Kbps, 10 bits per byte (7 data bits + 1 status/data flag + start and stop bits.) Each event consists of one to three bytes. The number of events per second depends on the song, but Wolf3D's music isn't terribly intensive.

(Just spitballing, but a song at 120bpm = 2b/s, or a probable maximum of 8 notes/second if it's all 16th notes - unlikely - and no more than eleven channels for OPL2 music if it's in rhythm mode. That would be a total of maybe 528 bytes for an unusually high number of note events, plus maybe some controller changes - so we'll say 640 bytes. That's a measly 6400 bits/second.)

Quote
But it won't lighten the cpu load compared to playing the sound samples with Paula.
Playing samples with Paula is no CPU load; mixing audio (which you'd have to do in order to play MIDI music of any complexity along with sound effects) can be quite a lot, depending on the quality.
« Last Edit: August 02, 2013, 02:06:11 AM by commodorejohn »
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/FB-01, Korg MS-20 Mini, Ensoniq Mirage/SQ-80, Sequential Circuits Prophet-600, Hohner String Performer

"\'Legacy code\' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup
 

Offline bbond007

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #33 on: August 02, 2013, 02:06:31 AM »
Quote from: ChaosLord;743398
Sending data over the serial port is extremely CPU intensive.

How many bits of data would be getting sent per second?

I assume not much so maybe it won't be a big deal.
But it won't lighten the cpu load compared to playing the sound samples with Paula.

MIDI is MAX of 31250BPS but that does not mean that its continuously transferring that much. In most cases I'm sure its transferring substantially less.

I do have an 060, but playing MIDI files in the background does not seem to put much of a load on my CPU at all while iBrowse or do whatever.... Not much difference between that and MODs...
 

Offline commodorejohn

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #34 on: August 02, 2013, 02:11:03 AM »
The only MIDI files my A1200 chokes up on are my 200KB Yes/Genesis/ELP MIDIs ;) (And that only on the initial loading/parsing.)
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/FB-01, Korg MS-20 Mini, Ensoniq Mirage/SQ-80, Sequential Circuits Prophet-600, Hohner String Performer

"\'Legacy code\' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup
 

Offline ChaosLord

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #35 on: August 02, 2013, 02:33:15 AM »
Quote from: commodorejohn;743400
The MIDI transfer rate is 31.25Kbps, 10 bits per byte (7 data bits + 1 status/data flag + start and stop bits.) Each event consists of one to three bytes. The number of events per second depends on the song, but Wolf3D's music isn't terribly intensive.

(Just spitballing, but a song at 120bpm = 2b/s, or a probable maximum of 8 notes/second if it's all 16th notes - unlikely - and no more than eleven channels for OPL2 music if it's in rhythm mode. That would be a total of maybe 528 bytes for an unusually high number of note events, plus maybe some controller changes - so we'll say 640 bytes. That's a measly 6400 bits/second.)

So if it was 500 bytes per second that means the code will trigger 500 interrupts per second.  Responding to an interrupt is equivalent to a giant pile of cpu instructions plus it thrashes the cache.

The UART in the Amiga is very very primitive with only a 2 byte buffer.  So the CPU must laboriously put 1 byte in, then RTI back to the game, execute some game code then respond to an interrupt to load up the next byte to send.  All the cpu registers have to keep getting saved and restored each time this happens.

If we had a better UART in AGA, one with a 16-byte buffer then using the serial port would be a breeze.



Quote

Playing samples with Paula is no CPU load; mixing audio (which you'd have to do in order to play MIDI music of any complexity along with sound effects) can be quite a lot, depending on the quality.


Oic.  You want to use MIDI in order to get a bunch of extra sound channels for free.  In that case your original statement stands: it would lighten the cpu load to use the serial port to send MIDI commands to play >4 channels of muzak and let the game just play the sfx on Paula.  That would be much less cpu power than software mixing 16 channels or whatever.

Of course if we had an 800 Mhz 060 it wouldn't be a problem to software mix as many channels as we wanted...
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline commodorejohn

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #36 on: August 02, 2013, 02:56:05 AM »
Quote from: ChaosLord;743403
So if it was 500 bytes per second that means the code will trigger 500 interrupts per second.  Responding to an interrupt is equivalent to a giant pile of cpu instructions plus it thrashes the cache.

The UART in the Amiga is very very primitive with only a 2 byte buffer.  So the CPU must laboriously put 1 byte in, then RTI back to the game, execute some game code then respond to an interrupt to load up the next byte to send.  All the cpu registers have to keep getting saved and restored each time this happens.

If we had a better UART in AGA, one with a 16-byte buffer then using the serial port would be a breeze.
I am aware that the Amiga's serial port is no great shakes - but even 640 interrupts/second (which I think is a generous overestimate for this scenario) isn't that much off the performance of any AGA Amiga. Heck, a stock A500 can manage serial communications faster than MIDI's transfer rate and still have time leftover for other tasks.

Quote
Oic.  You want to use MIDI in order to get a bunch of extra sound channels for free.  In that case your original statement stands: it would lighten the cpu load to use the serial port to send MIDI commands to play >4 channels of muzak and let the game just play the sfx on Paula.  That would be much less cpu power than software mixing 16 channels or whatever.
Right. The overhead of mixing 9-11 channels of music plus four SFX is bound to be more than the overhead of sending even whole lot of MIDI data over the serial port - and for those of us without 060s, that could make a significant difference in framerate, not to mention music quality.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/FB-01, Korg MS-20 Mini, Ensoniq Mirage/SQ-80, Sequential Circuits Prophet-600, Hohner String Performer

"\'Legacy code\' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup
 

Offline haywirepc

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #37 on: August 02, 2013, 04:42:47 AM »
What great work your doing, I love it.

I would like to donate some paypal funds and I think others should too...

Its a shame these things you've been porting didn't make it right to amiga at the time they were so hugely popular. I can't tell you how many amiga people I knew who switched to pc just for some of the stuff you've been porting lately.

Had these been available on amiga, well you never know...

Sad it took so long to get proper ports, but awesome to seem them running on amiga 1200. KEEP IT UP!
 

Offline haywirepc

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #38 on: August 02, 2013, 04:43:28 AM »
Oh and just a thought but why not try to get someone to convert some of the music to just standard mod format?
 

Online NovaCoder

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #39 on: August 02, 2013, 04:51:47 AM »
Quote from: haywirepc;743413
What great work your doing, I love it.

I would like to donate some paypal funds and I think others should too...

Its a shame these things you've been porting didn't make it right to amiga at the time they were so hugely popular. I can't tell you how many amiga people I knew who switched to pc just for some of the stuff you've been porting lately.

Had these been available on amiga, well you never know...

Sad it took so long to get proper ports, but awesome to seem them running on amiga 1200. KEEP IT UP!


Thanks for the support,  I know a few people that have been inspired to upgrade to 060's to run some of my recent ports :)

I don't want to accept donations though as this would put pressure on me to finish stuff, this is just a part-time hobby for me.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline B00tDisk

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Dec 2002
  • Posts: 1670
  • Total likes: 0
    • http://www.thedelversdungeon.com
Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #40 on: August 02, 2013, 06:06:33 AM »
Quote from: NovaCoder;743415
Thanks for the support,  I know a few people that have been inspired to upgrade to 060's to run some of my recent ports :)

I don't want to accept donations though as this would put pressure on me to finish stuff, this is just a part-time hobby for me.

Now port Firefox!

:D
Back away from the EU-SSR!
 

Offline haywirepc

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #41 on: August 02, 2013, 06:13:13 AM »
yeah you lazy slob, and chromium too... :)
 

Offline matt3k

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #42 on: August 02, 2013, 12:04:28 PM »
Will this work with RTG also?

Would love to try on my3000-060 with CV64...
 

Online NovaCoder

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #43 on: August 19, 2013, 12:33:07 AM »
Project status:

Graphics: 100%
Input: 100% (now has WASD support)
Menus: 100%
Sound FX: 70% (missing some samples, also got to tidy it up a bit)
Music: 0% (I think this will be possible using MUS files)
Loading/Saving: 90% (config file is not saved on exit)

Slowly getting there, still lots to do though.

[youtube]5OLouMmVI1Y[/youtube]
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline commodorejohn

Re: AmiWolf AGA - new Wolfenstein 3D Port
« Reply #44 on: August 19, 2013, 01:54:53 AM »
WASD support alone would make this worth the trouble :D Looks silky-smooth - what are you running it on there?
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/FB-01, Korg MS-20 Mini, Ensoniq Mirage/SQ-80, Sequential Circuits Prophet-600, Hohner String Performer

"\'Legacy code\' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup