#jsmess 2017-04-15,Sat

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
db48xgot a working compile: http://erebor.db48x.net:8000/example_macplus.html
sound sounds pretty good
occasional buffer underrun messages, some popping
[00:01]
.... (idle for 15mn)
SketchCowWow, that IS nice
throw that sucker in
[00:16]
....... (idle for 30mn)
db48xSketchCow: thrown [00:46]
pheunsure if we can improve this buffer underrun trouble, on my PC I get a lot of them with this example [00:53]
db48xagreed
but I think we can fix the really bad pops at the beginning of sounds
I use headphones, and they are super bad
but overall it's an improvement
[00:54]
phemacplus use two 370 sample buffer, either the SDL port or the browser want only power of two buffer size, that prolly increase the number of underrun [00:55]
SketchCowDo you think it's good for 1.0 or do you want to do more tuning? [00:55]
phedunno what can I do now, as I work on Hampa code and it's very good on it [00:56]
db48xphe: I'm not sure the buffer size is so important
if I understand it correctly, SDL is calling our callback whenever it gets near to running out of data to play
in fact, a quick experiment with a smaller buffer size seems to have helped
[00:56]
pheI don't know how the emulator fill the buffer, we can run in sdl ask 512 sample, a buffer contain 370 samples but does the emulator flush the buffer sample by sample [01:00]
db48xwe're less likely to be asked for 1024 samples when we only have 370*1.437 available [01:00]
pheyeaj, I tried, and reversely increasing the buffer size add a lot of overrun
on the other side, decreasing the buff size increase the number of scratch at buffer boundary
[01:00]
db48xI think the scratches are purely underruns
try erebor again; it's great
compare that with https://archive.org/details/mac_DarkCastle_1_2
erebor has the sdl buffer set to 256 samples
[01:02]
phehmm, with chrome erebor give me around 50 buffer underruns per second
ff nightly look like flawless, I get an underrun at the end of each music cycle, I think it's sort of normal
disappointed by chrome webaudio support
[01:08]
db48xhmm, I get more problems in chrome as well
well, we can always tell people not to use chrome
[01:16]
pheyeah, when I forced emscripten sdl port to accept 22255 as input freq, ff and chrome accepted it, but only ff resampled it [01:17]
db48xnice
phe: I was also looking at using SDL2, which has SDL_AudioCVT
[01:17]
pheI remember, why it didn't work?
looking at SDL2 the code, if you pass NULL as second parameter to openAudio, it should try to build a resampler filter
[01:18]
db48xbuild trouble, errors at run time
heh
[01:19]
phewith SDL2 there is no need to build a filter, same for sdl1 [01:20]
db48xthat's exactly what the code used to do [01:20]
phebut I'm unsure if sdl will be able to build a filter for 22255
I traced sdl1 code with Hampa code, it's not sdl1 which accepted that freq, but the underlined audio driver
[01:22]
db48xphe: what do you meant?
the 22255 sample rate is from the original mac hardware
so it's naturally that it's exactly what PCE produces
[01:23]
pheyes, it's what Hampa emulator request to sdl, SDL first try if the box audio device driver accept that directly before doing trying a resampling [01:25]
db48xI see
yes, and so you think that the reason the sound wasn't right all along is that the SDL port fails to build a filter that can resample from 22255 to whatever the browser wants?
[01:25]
pheI'm saying that because I'm unsure if sdl1/2 if the device driver can't acecpt that freq will be able to do the conversion
yeah
[01:27]
db48xwell, that would explain why it wasn't just working
we should file a bug on SDL (or I guess the port) and see if we can get it fixed
[01:27]
pheI doubt it's fixable, if they do resampling by integer step
22255 = 4451*25, 4451 is prime, they'll need a temp buffer 4451 bigger than the initial buffer
[01:29]
db48xhttps://github.com/emscripten-ports/SDL2/blob/778fe55bd884cf301a8bda51445f72b24816b648/src/audio/sdlgenaudiocvt.pl#L368 [01:37]
pheI was looking at https://github.com/emscripten-ports/SDL2/blob/master/src/audio/SDL_audiocvt.c#L937
and https://en.wikipedia.org/wiki/Upsampling#Upsampling_by_a_rational_fraction where L and M can only be integer
hmm, so emscripten look like to be able to do that
[01:39]
db48xah, but look at line 934
it does indeed bail on this conversion
[01:43]
phebut https://github.com/emscripten-ports/SDL2/blob/master/src/audio/SDL_audiocvt.c#L1048
all of this code look like voodoo
I'll be conceived it works when I'll see it working :)
convinced*
[01:46]
db48x:)
I guess there must be a generated filter where multiple == 0
it would just copy directly, rather than doing any actual resampling
[01:48]
pheso what you tried is to use the pl script to build a filter, or emscripten automate that?
unsure to understand how that work
[01:49]
db48xI'm assuming that the perl script is run when you build the port
ah, no. I am wrong
look at SDL_audiotypecvt.c
[01:50]
https://github.com/emscripten-ports/SDL2/blob/778fe55bd884cf301a8bda51445f72b24816b648/src/audio/SDL_audiotypecvt.c#L15702
specifically, it'll find this one: https://github.com/emscripten-ports/SDL2/blob/778fe55bd884cf301a8bda51445f72b24816b648/src/audio/SDL_audiotypecvt.c#L15726
[01:58]
so the upshot is that the SDL port doesn't have a resampler that can actually resample by an arbitrary amount, so we either have to fix the port or just do it ourselves
we've done the latter, aside from possibly a bug, so I guess we're good
nice: https://github.com/emscripten-ports/SDL2/issues/38
[02:07]
SketchCow: oh, I need to upload new config files for pce as well
I put them in the loaderlab
[02:22]
SketchCowOK, I don't think it can happen until Monday
I can try
Depends on dev mood
[02:27]
db48xheh
fair enough
bbiab
[02:28]
SketchCowWhat are the differences in the newloader?
And is it just loader.js?
Or which files?
[02:36]
pheeven if we rebuild audiocvt.c, the generated resampler doesn't look like good: https://github.com/emscripten-ports/SDL2/blob/778fe55bd884cf301a8bda51445f72b24816b648/src/audio/SDL_audiotypecvt.c#L3736
they replicate the same sample up to the fractional part then inject the new with half of the last
[02:44]
***phe has quit IRC (Quit: Leaving) [02:56]
SketchCowSome questions
- What is the difference in the new loader
- The sound sounds good except for that initial "crunch" as it engages - is there a way to mute that opening frame?
[02:58]
.... (idle for 15mn)
Many people worked very hard to bring this emulation system to bear: Hampa Hug created PCE (the original Macintosh emulator program). Experiments and work by James Friend (PCE.js) and Marcio T. (Retroweb) ported PCE to javascript via Emscripten. They all provided continued assistance as the Emularity team approached refining the emulator to work within the Archive's framework. Much work was done by
Daniel Brooks, Phil-el, James Baicoianu, and Vitorio Miliano, with Daniel Brooks putting in multiple weeks of refinement.
Let me know where I'm off
[03:13]
...... (idle for 25mn)
db48xSketchCow: I haven't changed loader.js at all
SketchCow: just pce*.cfg
I can't uploade to emularity_config_v1, so I just stuck them in loaderlab for you to deal with
[03:39]
SketchCowAh hah
ah HAH
Well then
AH HAH
hhahhhhh
[03:39]
db48x:) [03:40]
SketchCowI shoved them in
What did it do
[03:43]
.... (idle for 19mn)
db48xset speed=1
which makes the emulator run at a constant rate, rather than trying to scale up and down
I had also forgotten to add foo.qed as possible disk images to look for
so it corrected that
[04:02]
SketchCowGreat
So, I do wonder about that slight grinding noise at the beginning of the sounds
I notice it's almost as part of the noise, like it's gearing up
Once it's "going", it's fine
[04:05]
db48xwith headphones I think it's more obvious
it's the kind of pop you get when the speaker is driven to maximum and held there
[04:10]
DFJustinDC offset [04:12]
db48xyes, and my first thought was that we were doing the wrong signed/unsigned stuff
like treating 0 as silence in an unsigned buffer, instead of 0x8000
but we are resampling into a signed buffer, so that part seems right
[04:15]
SketchCowhttps://www.youtube.com/watch?v=UndXYYosDk4 [04:18]
..... (idle for 23mn)
Maybe we announce this Monday if we find things humming right [04:41]
........................... (idle for 2h10mn)
***db48x has quit IRC (Read error: Operation timed out)
db48x has joined #jsmess
[06:51]
......................................... (idle for 3h24mn)
phe has joined #jsmess [10:17]
.......................................... (idle for 3h26mn)
SketchCowI got Stephen Cole to begn uploads of new Mac things, which is great. [13:43]
................. (idle for 1h20mn)
https://archive.org/details/MacintoshSharewareGames [15:03]
....................... (idle for 1h50mn)
Still working on blog entry [16:53]
db48x: Question [16:58]
.... (idle for 16mn)
Actually, phe too
Here's the questions:
- Do we think that buzz/offset at the beginning of each sound set can be eliminated? Should we wait for it?
- Do you think I can announce this today or this weekend or whatever without embarassment?
[17:14]
.................. (idle for 1h28mn)
baihttps://github.com/copy/v86 looks interesting
win98 runs smooth af
[18:43]
....... (idle for 31mn)
godaneso i found out about this site: https://winworldpc.com/ [19:14]
bainice
just archives or do they have some embedded emulator stuff going somewhere too?
[19:15]
godanejust archives
its where that guy got the windows 98 from
[19:16]
baiah cool [19:16]
godanei still think we need to find unopen computers to grab a hard drive image of them [19:18]
baiyeah I have a box of old hard drives going back to the 90s
I took backups of all the ones I could still interface with but there's some scsi and pata stuff which I'd have to dig into boxes to find controllers for
[19:19]
godaneanways CAT [19:19]
baiI love the idea that I could just image my old system and boot it right up [19:20]
godanesame here [19:20]
SketchCowwe should throw it in [19:32]
........................... (idle for 2h11mn)
Vito`I imaged an OS9 system and brought it right up in QEMU a few weeks back
v86 is one of the things I need to make time to bring up a full Win95 instance with to test Unrealty with
[21:43]
db48xsample0: 0, sample1: -32768, frac: 0.000000, sample: 0 pce-macplus.js:1:366844
sample0: 0, sample1: -32768, frac: 0.695469, sample: -22789 pce-macplus.js:1:366844
sample0: -32768, sample1: -32768, frac: 0.390937, sample: -32768 pce-macplus.js:1:366844
sample0: -32768, sample1: -32768, frac: 0.086406, sample: -32768 pce-macplus.js:1:366844
sample0: -32768, sample1: -32768, frac: 0.781875, sample: -32768 pce-macplus.js:1:366844
[21:54]
phewhy the input contain only -32768?
btw db48x in the buffer underrun if (), there is a return at end, it must be a break so the part of the output buffer we get pass through the lowpass filter
[22:04]
db48xphe: that's true [22:10]
pheI'm running again in trouble with chrome, -O0 build work a lot of better than any -Ox, 3-4 buffer underrun vs 100-200 with -O2/-O3 [22:16]
db48xthat's promising
how does -O0 run in Firefox?
you might also try -Os
[22:20]
pheit works well in FF whatsoever the opt level
but we can't do non optimized build because he js is 1.3 MB vs. 4 MB
[22:21]
db48xInitializing SDL audio threw an exception: "Invalid SDL audio format 16!"! Continuing without audio. [22:26]
phe-Os doesn't help chrome [22:27]
............ (idle for 57mn)
db48xphe: the input must actually be unsigned [23:24]
phehmm, req.format = AUDIO_S16LSB;
I thought it's signed but most manipulation on it is done as unsigned, as it doesn't matter when you only copy
snd_iir2_filter use uint16_t * input but in the same time it get drv->sign which is 1 so it can handle data correctly
[23:28]
but you're right, I should handle that like the remaining of the code, as uint16_t, it'll change nothin to the result [23:38]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)