8-way scrolling system for prototyping games on STE

GFA, ASM, STOS, ...

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

User avatar
npomarede
Atari God
Atari God
Posts: 1326
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: 8-way scrolling system for prototyping games on STE

Postby npomarede » Sat Aug 06, 2016 6:51 pm

dml wrote:Hi

I have noticed some weird things with Hatari and audio from this demo. For example if the digidums are quiet or silent initially, you can go into the hatari settings panel and change some options in there, and close the menu and suddenly the samples are heard. I just tested this now (switched the YM from 'ST table' to 'Math model' and back again). Usually its just a change in perceived volume.

On a couple of occasions the YM part was silent too until the sound menu is opened - although I don't remember if this last problem only happens in ST or Falcon mode.

That's strange, I correctly hear the notes and I hear a difference when changing the volume table, but I can't hear sample drums anyway (at least nothing that sound like what we're used to in Jochen Hippel musics for example). Do you have an example record of 20 sec of musics were drums can be heard, so I can compare with what I get in my case ?
By the way, do you use MFP timer to play samples, or do you use STE DMA sound ?

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Aug 06, 2016 7:02 pm

npomarede wrote:That's strange, I correctly hear the notes and I hear a difference when changing the volume table, but I can't hear sample drums anyway (at least nothing that sound like what we're used to in Jochen Hippel musics for example). Do you have an example record of 20 sec of musics were drums can be heard, so I can compare with what I get in my case ?
By the way, do you use MFP timer to play samples, or do you use STE DMA sound ?


It is strange, but it might not be the same problem you're experiencing just now. Perhaps the samples simply did not load - it will continue to play the YM part if there are no sample files.

For example if the HD emulation is operating in case-sensitive mode? (e.g. lower case filenames on the host disk, upper case name strings in the program?). Other than the files being missing, or the .prg being in the wrong place, I don't see any alternative reasons why it wouldn't load them though.

I can record a section and link if it helps yes. I can do it using Hatari.

[EDIT] I checked the filename strings and they are lowercase anyway, as the files are in the zip.

User avatar
npomarede
Atari God
Atari God
Posts: 1326
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: 8-way scrolling system for prototyping games on STE

Postby npomarede » Sat Aug 06, 2016 7:17 pm

As you say, I think samples are not loaded. I see a lot of these messages if I run "hatari --trace os_all" :

GEMDOS 0x3D Fopen("sounds\pctria.wav", read-only) at PC=0xFA002A
GEMDOS didn't find filename /home/npomarede/Emul/ST/D/ym/sounds/pctria.wav
-> ERROR -33 (errno = 2)

same for sounds\pocuic.wav, sounds\pmcuic.wav, ... sounds\phibon.wav, sounds\pcbell.wav
But then sounds\phitom.wav for example is correctly loaded.

Are some samples missing from the zip files ?

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Aug 06, 2016 7:27 pm

It does try to load a complete contiguous MIDI-style sample bank between a start and end index - for which some entries are deliberately missing. That is normal. If it loads perhaps 40-50% of the samples then its is most likely working as planned.

I will double check the zip contents matches my own fileset - but if you don't hear any drums anywhere its suspicious because most tracks use one of the two kick or snare samples - 4 samples common to nearly all of them. If those are loaded then it's a replay issue not a file issue I think.

(these ones)
pasnar.wav
pbass1.wav
pbass2.wav
pesnar.wav


Here are a couple of recordings from Hatari:

[this one is available]
https://dl.dropboxusercontent.com/u/129 ... i19dev.avi

[this one is still uploading - give it 15 minutes]
https://dl.dropboxusercontent.com/u/129 ... i19dev.avi

[EDIT]

The samples in the zip match the ones in my dev directory, none are missing.
Last edited by dml on Sat Aug 06, 2016 7:43 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: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Aug 06, 2016 7:29 pm

For those who see the captures and not the real thing - the videos are very jerky because I left frameskipping enabled in Hatari when the recording was made. The actual program runs at 50hz :)

User avatar
npomarede
Atari God
Atari God
Posts: 1326
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: 8-way scrolling system for prototyping games on STE

Postby npomarede » Sat Aug 06, 2016 8:02 pm

dml wrote:It does try to load a complete contiguous MIDI-style sample bank between a start and end index - for which some entries are deliberately missing. That is normal. If it loads perhaps 40-50% of the samples then its is most likely working as planned.

I will double check the zip contents matches my own fileset - but if you don't hear any drums anywhere its suspicious because most tracks use one of the two kick or snare samples - 4 samples common to nearly all of them. If those are loaded then it's a replay issue not a file issue I think.

(these ones)
pasnar.wav
pbass1.wav
pbass2.wav
pesnar.wav


Here are a couple of recordings from Hatari:

[this one is available]
https://dl.dropboxusercontent.com/u/129 ... i19dev.avi

[this one is still uploading - give it 15 minutes]
https://dl.dropboxusercontent.com/u/129 ... i19dev.avi

[EDIT]

The samples in the zip match the ones in my dev directory, none are missing.


The 4 samples listed above are correctly read from the trace I see in Hatari, but on "planet latis" for example I don't hear the sample you have in your video recording :(
Do you have a version with more logs (maybe a printf each time a sample is loaded correctly) ? text would not be visible on screen, but it will be printed on the console from which Hatari is started.

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Aug 06, 2016 8:14 pm

npomarede wrote:The 4 samples listed above are correctly read from the trace I see in Hatari, but on "planet latis" for example I don't hear the sample you have in your video recording :(


Pretty strange. I am using a dev version of Hatari 1.9 (it reports '- devel June 10th 2016') so something may have changed since then.

npomarede wrote:Do you have a version with more logs (maybe a printf each time a sample is loaded correctly) ? text would not be visible on screen, but it will be printed on the console from which Hatari is started.


Yes I can do that too.

I should add that real HW plays the samples a bit quieter than Hatari does in my recording, but still quite audible on most tracks except for the loudest notes.

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Aug 06, 2016 8:27 pm

Here is a debug build with sensible console/log output well past the display setup stage. Just be aware it's not a release version and can slow down or perhaps explode while scrolling & printing via TOS together. :)

https://dl.dropboxusercontent.com/u/129 ... _debug.prg

User avatar
npomarede
Atari God
Atari God
Posts: 1326
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: 8-way scrolling system for prototyping games on STE

Postby npomarede » Sat Aug 06, 2016 9:14 pm

dml wrote:Here is a debug build with sensible console/log output well past the display setup stage. Just be aware it's not a release version and can slow down or perhaps explode while scrolling & printing via TOS together. :)

https://dl.dropboxusercontent.com/u/129 ... _debug.prg

This is what I get :

warning: could not open wav: sounds\potria.wav
warning: could not open wav: sounds\pctria.wav
warning: could not open wav: sounds\pocuic.wav
warning: could not open wav: sounds\pmcuic.wav
warning: could not open wav: sounds\plwood.wav
warning: could not open wav: sounds\phwood.wav
warning: could not open wav: sounds\pclave.wav
warning: could not open wav: sounds\plguir.wav
warning: could not open wav: sounds\psguir.wav
warning: could not open wav: sounds\plwhis.wav
warning: could not open wav: sounds\pswhis.wav
warning: could not open wav: sounds\pmarac.wav
warning: could not open wav: sounds\pcabas.wav
warning: could not open wav: sounds\ploago.wav
warning: could not open wav: sounds\phiago.wav
warning: could not open wav: sounds\plotim.wav
warning: could not open wav: sounds\phitim.wav
warning: could not open wav: sounds\plocon.wav
warning: could not open wav: sounds\pohico.wav
warning: could not open wav: sounds\pmhico.wav
warning: could not open wav: sounds\plobon.wav
warning: could not open wav: sounds\phibon.wav
opened: [59] sounds\prcym2.wav @ 14381
warning: could not open wav: sounds\pvib.wav
opened: [57] sounds\pccym2.wav @ 14540
warning: could not open wav: sounds\pcbell.wav
opened: [55] sounds\pspcym.wav @ 12222
opened: [54] sounds\ptambo.wav @ 1117
opened: [53] sounds\prbell.wav @ 7978
opened: [52] sounds\pchcym.wav @ 14937
opened: [51] sounds\prcym1.wav @ 10645
opened: [50] sounds\phitom.wav @ 4669
opened: [49] sounds\pccym1.wav @ 14604
opened: [48] sounds\phmtom.wav @ 5618
opened: [47] sounds\plmtom.wav @ 5976
opened: [46] sounds\pohhat.wav @ 14874
opened: [45] sounds\plotom.wav @ 6688
opened: [44] sounds\pphhat.wav @ 717
opened: [43] sounds\phftom.wav @ 6967
opened: [42] sounds\pchhat.wav @ 716
opened: [41] sounds\plftom.wav @ 7991
opened: [40] sounds\pesnar.wav @ 1462
opened: [39] sounds\pclap.wav @ 1180
opened: [38] sounds\pasnar.wav @ 2084
warning: could not open wav: sounds\psstik.wav
opened: [36] sounds\pbass1.wav @ 1260
opened: [35] sounds\pbass2.wav @ 523

This matches the content of the zip file, but still I don't hear sample in "planet latis" :(
Which mfp timer do you use to play sample ? I can try to add more debug when running to see what happens during the mfp int.

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Aug 06, 2016 9:21 pm

That's correct output, so it's not a loading/files issue.

The music runs on VBL + TimerD. The samples are replayed with STE DMA so it should show in Hatari's log.

User avatar
npomarede
Atari God
Atari God
Posts: 1326
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: 8-way scrolling system for prototyping games on STE

Postby npomarede » Sat Aug 06, 2016 10:13 pm

OK, I found the cause, not some files loading issues.
First, I built a version of Hatari where YM output was forced to 0 ; in that case, I hear the STE sample.
So, I tried to increase maximum YM volume (by overwritting regs 8/9/10) until I could not hear sample anymore, and my result is that when volume reg is >=10 then the YM output volume is too high and I can't hear the STE sample anymore.

Do you use microwire to lower the sample volume ?
If not, I think the sample volume is too low compared to the YM volume. Hatari might not be 100% accurate when comparing relative volume of YM and DMA sound, but I think it's not that far (although I don't remember we ever precisely compared a recording of YM+dma sound on real STE with Hatari).
When opening pohhat.wav for example with Audacity, you can see that the sample has a rather narrow range, which gives a low output volume. Is that expected ?
Maybe you could boost the volume of the wav files ?

Nicolas

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Aug 06, 2016 10:46 pm

Hi Nicolas,

There's truth in what you say re: the wavs and the range vs YM output. More balancing would help, but I don't think its the whole story. Also the samples are balanced against each other, as much as against the YM part. e.g. the hihat should not be as loud as the kick or snare. So it naturally has a lower power. If kick/snare is not audible though at the beginning of all affected songs, something seems wrong.

I didn't touch the microwire no - its operating with default state.

On a real STE the drums are quite clear at the start of most songs. If the samples are not audible in Hatari then the difference between current Hatari and HW is an issue. It also means Hatari has changed somehow (since the version I used to record those examples).

On my STE here it does not sound too different (much more lowpass filtered but still clear) from the older Hatari recording. They are also audible in Steem - which seems to me pretty close to the volume from the HW. It seemed to me that Hatari was producing better YM emulation overall and louder drums, but Steem was matching the drum volume/filtering more closely to HW.

I will make some adjustments when I can, but I think the mixing stage in Hatari needs a look. I'll get an updated build soon to experiment with.

User avatar
npomarede
Atari God
Atari God
Posts: 1326
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: 8-way scrolling system for prototyping games on STE

Postby npomarede » Sun Aug 07, 2016 9:40 am

Hi
after some time looking through the code, mystery solved : it depends on the output sound frequency you choose in Hatari.

If freq is < 50066 Hz, then a low pass filter is applied to STE DMA sound and this seems to lower volume too much.
When using a replay freq of 50066 Hz, the filter is not applied and I can hear the samples as in the video recording you posted earlier.
I was using 44.1 kHz before, I think you use 50 kHz in Hatari prefs ?
I will report this on Hatari ML, maybe gain should be increased a little for the low pass filter.

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sun Aug 07, 2016 9:53 am

Hi - that's an interesting result - I didn't think of that. Yes I usually switch it to 50khz.

I'm playing with the LMC1992 to see if it has any impact on HW mixing but so far the results are mostly weird.

Just more ways to complicate matters.

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sun Aug 07, 2016 8:52 pm

Hi - quick update.

dma wrote:Maybe some things to try :
- less (high freqs) presence in SID bass (lower a bit the high bit of the SID wave? making restart on each note to start on the lower freqs?)
- having (some) arps at a little slower freq? or maybe the first two arps loop of a note?


I have done some experiments with restarting the envelope on new notes, and also restarting the square wave (eventually worked that one out!) and there is improvement on some tracks. Other tracks produce cancelling interference on specific notes so I'm still looking into that problem.

The old arp technique was synchronous - fixed speed for all channels. This actually caused some YM 'noise' since the frequencies would switch together on more than one YM channel. I have changed this to an async method where the multiplex speed is based on the number of contributing channels at any time. This seems to be *much* better for some cases (and more or less the same for others).

I keep finding new things to fiddle with, but should move on with sfx and cleaning up code to make a release.

Oldskool
Atari User
Atari User
Posts: 36
Joined: Sun May 09, 2010 7:42 pm

Re: 8-way scrolling system for prototyping games on STE

Postby Oldskool » Mon Aug 08, 2016 2:18 pm

Cool demo and music!
Remember playing this on an MSX.

Now only find the button to start the game :)

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Tue Aug 09, 2016 10:14 am

:cheers:


So I have recently updated the AGTCut tool on bitbucket after some final tweaking last night:

https://bitbucket.org/d_m_l/agtools/downloads

Changenotes and source are there. Mainly stuff I needed to make the last demo work, the faster sprite method, plus a few fixes. It's been working pretty well so far. I found one bug in the STE slabs support but it turned out to be in the drawing routine not the tool. The sample C code for the file format readers have been updated to cope with the supported formats, although not tremendously useful yet without the 68k drawing code to go with it...

The existing YM tool is also nearly ready with a proper command interface now - but the player is not, requiring various hacks per 'track'. I'll probably not upload that until both are in a good state. It's getting close though.

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Wed Aug 10, 2016 5:53 pm

Quick update:

Wrote a tool to intelligently extract & reassemble scrolly arcade game backgrounds from Youtube play-throughs (while removing the sprites and menus), for the sake of prototyping - because other methods just proved to be too much hassle. Results are not perfect but good enough for purpose here and probably a good starting point for replacement gfx.

This is an updated build of the STE game sample, with a proper Gradius II background and some YM music. No SFX yet.

https://dl.dropboxusercontent.com/u/129 ... maudio.zip

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Wed Aug 10, 2016 6:25 pm

Doh. forgot to add the sounds/ directory to the zip, with the samples in it. :-|

Fixed.

User avatar
troed
Atari God
Atari God
Posts: 1450
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: 8-way scrolling system for prototyping games on STE

Postby troed » Wed Aug 10, 2016 6:58 pm

dml wrote:Wrote a tool to intelligently extract & reassemble scrolly arcade game backgrounds from Youtube play-throughs


o_O

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

Re: 8-way scrolling system for prototyping games on STE

Postby shoggoth » Wed Aug 10, 2016 10:06 pm

dml wrote:Wrote a tool to intelligently turn crap into bacon & beer


Damn.
Ain't no space like PeP-space.

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1362
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Wed Aug 10, 2016 10:46 pm

dml wrote:Quick update:

Wrote a tool to intelligently extract & reassemble scrolly arcade game backgrounds from Youtube play-throughs (while removing the sprites and menus), for the sake of prototyping


Say what? :!: That should be amazing!

User avatar
Ragstaff
Atari Super Hero
Atari Super Hero
Posts: 610
Joined: Mon Oct 20, 2003 3:39 am
Location: Melbourne Australia
Contact:

Re: 8-way scrolling system for prototyping games on STE

Postby Ragstaff » Thu Aug 11, 2016 11:56 am

Alchemy!

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Thu Aug 11, 2016 12:25 pm

:angel:

I did actually try to do this by hand, via MAME and then by saving screenies from videos. But I got bored with that quite fast. So there's a tool now - not on bitbucket but soon - which takes a stream of .PNG files in time-order and joins them, removing most of the crap. At first this also involved lots of screengrabs but then ggn pointed me at some ffpmeg 'magic runes' which saves every N'th frame from a video stream - major timesaver there.

The BG tool can't deal with parallax or 4/8-way scrolling, just plain horizontal or vertical scrolling at varying rates, with some expected wobble or jumps in the footage, and stuff moving around on top. It can in theory deal with 4/8-way but any such videos would miss out most of the map so its probably not worth maintaining properly for that.

If you can image process the frames first and separate parallax by colour or whatever, then it could be made to work that way but its already a hassle. I had some ideas for making it magically work with parallax by auto-separating them, using foreground keys (like hue) as the synclock criteria, and eliminating the parallax part that doesn't track the primary lock over time but this is more complicated and there are enough other things to do - another time maybe.

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

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Thu Aug 11, 2016 3:10 pm

The next major brick -> wall is probably going to be collisions vs background tiles. I have this mostly worked out so with any luck its not going to take too long. Famous last words.


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 5 guests