2021-08-18.log

apolkosnik[m]I told the bunch of people on Acill's discord, so some more orders are in00:04
apolkosnik[m]* I told a bunch of people on Acill's discord, so some more orders are in00:04
mntmnawesome, thank you!!00:06
emiespo[m]Oh already available to order? Wow amazing!00:10
emiespo[m]ACTION orders00:13
emiespo[m]Ouch! 30€ for shipping to the Uk? Curse you Brexit!00:14
emiespo[m]I think I’ll have it shipped to Italy 🇮🇹 lol and retrieve once I manage to go home.00:17
emiespo[m](But will do it tomorrow as I need to retrieve the best address)00:23
mntmnooop yeah it's because UK is marked as "world" and not EU now00:45
mntmnsorry for that00:45
+ ProfPlum (~IceChat9@67.212.64.194)00:56
ProfPlumLukas and team, fast question: When is the zz9000ax shipping? I live in Canada. My mom and dad are in Europe. I will be visiting them in 10 days. I can save some bucks$ in shipping costs. 00:59
emiespo[m]<mntmn> "sorry for that" <- Definitely not your fault and not mine either. I might be moving to Germany if things get worse here…01:05
mntmnok :|01:06
+ bfarmilo (~bfarmilo@202.56.40.240)01:17
+ bfarmilo_ (~bfarmilo@202.56.40.240)01:18
- bfarmilo (QUIT: Ping timeout: 240 seconds) (~bfarmilo@202.56.40.240)01:22
- xet7 (QUIT: Read error: Connection reset by peer) (~xet7@user/xet7)02:26
+ xet7 (~xet7@user/xet7)02:27
- WoC (QUIT: Remote host closed the connection) (woc@2603-8080-cd40-00c6-eaaf-8a29-4225-dc1f.res6.spectrum.com)03:01
+ WoC (woc@2603-8080-cd40-00c6-eaaf-8a29-4225-dc1f.res6.spectrum.com)03:02
- ProfPlum (QUIT: Quit: The early bird may get the worm, but the second mouse gets the cheese) (~IceChat9@67.212.64.194)05:09
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7)05:14
+ xet7 (~xet7@user/xet7)05:35
Claudemntmn: just a sanity check. the audio card is compatible with a first revision ZZ9k? I think on the first revision cards only the hdmi i2s header is missing. right ? 07:47
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7)07:50
+ xet7 (~xet7@user/xet7)07:57
+ RobDangerous (~Thunderbi@p200300ec8f3e1c0059d89a3a77bac934.dip0.t-ipconnect.de)08:07
- bfarmilo_ (QUIT: Ping timeout: 268 seconds) (~bfarmilo@202.56.40.240)08:13
forcie_just preordered a ZZ9000AX :)08:50
emiespo[m]@ProfPlum:libera.chat: if you go to the checkout page there’s an expected delivery before end of 2021… so it’s more like a preorder now :-)10:04
mntmnClaude: yes compatible10:32
+ bfarmilo (~bfarmilo@202.56.40.240)10:41
Claudemntmn , alright :) 10:59
mntmnClaude: it basically needs the expansion port for the I2S interface, and currently two pins from MIO port for I2C. and amiga audio comes from the AUD header11:00
mntmnwill be quite the kabelbaum11:00
_BnuThis AHI driver stuff is ridiculous. ('A`)12:15
mntmntell me everything _Bnu12:20
_BnuI don't actually see anywhere to get the stupid sound buffers you're supposed to use, unless you let AHI mix everything using the CPU, and even then I can't quite gett it to work.12:22
_BnuIt's like it initializes properly, starts up along with ScummVM, then it does a LoadSound, SetFreq, SetVol and SetSound and then it just... stops.12:23
mntmnwhat's LoadSound supposed to do?12:24
mntmnSetFreq, is that the output freq that you select in prefs? or an input freq from the application?12:24
_BnuLoadSound is something you're not actually supposed to use, because all drivers mark it as an unused function that just returns AHIS_UNKNOWN.12:25
_BnuBut if you don't specify AHISF_MIXING and AHISF_TIMING when you allocate your audio, you're supposed to be allowed to handle these yourself.12:25
_BnuIt basically just means load these samples into a buffer somewhere and identify them as sound X.12:26
_Bnustatic uint32_t __attribute__((used)) intAHIsub_LoadSound(uint16_t sound asm("d0"), uint32_t type asm("d1"), struct AHISampleInfo *info asm("a0"), struct AHIAudioCtrlDrv *AudioCtrl asm("a2"))12:26
mntmni see, so like loading a texture into a gpu12:26
_BnuThen SetFreq sets the sample frequency for a channel, SetVol sets the volume for a channel and SetSound is supposed to set the loaded sound as ready to play.12:26
_BnuBut the docs make no sense. It's like half of it is missing because no one could figure out how to use it except for the people who made closed source drivers that probably all use the CPU for mixing audio.12:27
_Bnutype - The type of the sound. Currently four types are supported:12:27
_BnuAnd then it lists three types.12:27
mntmnhaha12:28
mntmnbut it sounds like you have all the bits to go ahead and play the sound then?12:28
_BnuSure, if I want to play back one 1024 sample buffer of all zeroes.12:28
mntmnLoadSound gave you silence?12:28
mntmnmaybe that's just how it works and you need to signal to the application that you are done?12:29
mntmnand they kinda start with silence?12:29
_BnuSignal it how. ('A`)12:29
mntmnhow does Scumm use the AHI API?12:29
_BnuLike anything else...12:30
mntmnmaybe they do LoadSound, SetSound in a loop?12:30
_BnuThis is AHI itself getting stuck somewhere.12:30
mntmnah12:30
mntmnso it halts everything?12:30
mntmnsounds like you need to signal AHI that you are done perhaps hmm12:30
_BnuBut how... I'm doing everything it says for me to do.12:31
mntmnmy pc since a few days fails to wake from sleep. annoying12:32
mntmnthe year of linux on the desktop12:33
mntmnas soon as it has rebooted i will take a look if i see some detail12:33
mntmni googled "scummvm amiga git" and found my own fork as the top hit ;_;12:34
Clauderaise an issue there :) 12:35
mntmnhaha12:37
mntmnomg it would be so easy to just directly poke the sound from scummvm to the hardware12:37
_BnuI updated the ahi_driver_amiga.zip file in snakes9000, since I made a lot of changes.12:37
_BnuYes, yes it would.12:37
mntmnbig mood 12:37
mntmnabstract driver systems were an error, lets go back to the 80s12:38
_BnuBut that's not the point, then you'll have to mod every single piece of software using AHI to use the ZZ9000 sound instead.12:38
mntmndamn indirections12:38
_BnuWhich is of course not an issue when it comes to ScummVM, since it already has a pile of ZZ9000-specific code...12:38
mntmnmaybe the API should just be a single "MAKE SOUND" call12:38
mntmnwhich plays back what you give it...12:38
_BnuThe API should fucking make any sense, lol.12:38
mntmnhaha yeah sorry i'm just joking around12:38
mntmni'm reading a bit in amigaos3-mixer.cpp12:39
_BnuYou shouldn't be reading it unless you're up to date with mheyer's and my changes.12:39
mntmni just want to see how AHI is used from an application POV12:40
_Bnuhttps://github.com/beeanyew/scummvm-amigaos3/tree/zz9k-stuff12:40
mntmni have never used it... i only sell a product for it...12:40
_BnuYeah, but I think it changed a bunch.12:40
_BnuDepending on how old your branch is.12:40
mntmnp. old12:41
mntmnin my version there's an endless loop, it has an IORequest for AHI (CMD_WRITE) and it stuffs the sound buffer as Data into it and sets Type, Frequency, Position, Volume and then does a SendIO. and then it uses CheckIO to check if the sound has already played i guess12:43
mntmnalso waits for 1 << ahiPort->mp_SigBit12:43
_BnuYes, but none of that makes it through to the driver.12:44
_BnuThere's no IO requests, no anything, no nothing.12:44
_BnuJust the worst piece of crap ever.12:44
_BnuDoing what the docs say and calling PlayerFunc X times per second just does nothing. I'm pretty sure there's some vital step the documentation skips, but it's in assembler files for all the example drivers.12:46
mntmnok12:46
mntmnassembl0r12:46
mntmni can try to read that12:46
_BnuI was hoping that handling loadsound/setsound directly would allow me to avoid AHI's CPU audio conversion and mixing, since it seemed that way based on the docs.12:47
_BnuBut then it just stops doing anything. Which is not exclusive to avoiding AHI doing the mixing, but something's missing.12:48
mntmnwhich bits do you return from AHIsub_AllocAudio?12:49
mntmnalso i should just look at your code12:49
mntmnsorry i forgot where the git with your driver is at12:49
_BnuIt's not on git, it's in ahi_driver_amiga.zip12:50
trixsterIs it possible to see a picture with the ZZ9000AX connected up to the ZZ9000, and with the Paula audio header connected too?12:50
_BnuI don't want to put it on git, because people will pull it and complain that it doesn't work, lolb.12:50
mntmntrixster: not yet, sorry12:50
trixsterNp!12:50
mntmn_Bnu: ok i have a zip from a few days ago i believe12:50
_Bnuhttp://www.apehead.se/snakes9000/ahi_driver_amiga.zip12:50
_BnuWell I updated it a few seconds ago.12:50
_BnuMinutes.12:51
mntmncool cool12:51
_BnuBecause I changed a lot of stuff.12:51
trixsterSo Paula header - there’s a Paula header on the motherboard of a 3000/4000?12:51
mntmntrixster: no, it's on the ZZ900012:51
trixsterAh ok, I see12:51
_BnuBut I changed it to this: return AHISF_KNOWSTEREO;// | AHISF_MIXING | AHISF_TIMING;12:51
mntmnthe audio comes from the videoslot12:51
_BnuBecause KNOWHIFI made it default to 32-bit samples, and MIXING and TIMING means that AHI will handle both of those in software, which I don't want.12:52
mntmngotcha12:52
trixsterOk, I have ordered :) exciting12:54
mntmnthanks trixster 12:54
trixsterI need to work out how to get it in the AA3000+. This machine already has a Prisma Megamix and a Delfina Flipper :D something will have to come out. Too much audio :D12:54
mntmn:3312:54
trixsterhttps://usercontent.irccloud-cdn.com/file/E2cj4hI5/IMG_5051.JPG12:55
trixsterSilly machine12:55
mntmnnice12:56
mntmn_Bnu: ok the docs for AHIsub_Start are intense12:57
_BnuIntense and useless.12:58
mntmndoes this function get called?12:58
_BnuYes, it does.12:58
mntmnok something at least...12:58
_BnuAll of the functions get called.12:58
_BnuBut for instance, the Toccata driver sets up some soft interrupts.13:01
mntmnok13:01
_BnuBut it's not clear at all when they're supposed to be triggered, or what they do.13:01
mntmnso the loop in SlaveProcess runs yes?13:02
_BnuAnd I probably don't want them, since they seem to be dependent on the AHI software mixing/buffer handling functions.13:02
_BnuYes, it all runs.13:02
mntmnthe docs say to call ahiac_MixerFunc also, i see it is commented out13:02
mntmnunnecessary?13:02
_BnuIt doesn't exist13:02
mntmnhaha ok13:02
_BnuIf you don't specify AHISF_MIXING, it's null.13:02
_BnuIf you skip past all the intense documentation, you'll find this:13:02
mntmnok makes sense13:02
_Bnu- If AHIsub_AllocAudio() returned with neither the AHISB_MIXING nor13:03
_Bnu       the AHISB_TIMING bit set13:03
mntmni see13:03
mntmngot it13:04
mntmnso ahiac_PlayerFunc is supposed to keep the wheel rolling13:04
_BnuBut yeah, once it stops, I still see the debug messages from the SlaveProcess loop rolling by.13:04
_BnuBut I can tell that something did Forbid() somewhere, because the disk drive stops clicking.13:05
mntmnah!13:05
mntmnVerboten()13:05
mntmni guess i will have to test it myself!13:08
Claudethe multitask-still-running-metronome . aka df013:08
mntmnhaha13:08
mntmnthe floppy disk time slicing quantum13:08
mntmn_Bnu: did i understand correctly that it behaves differently if you allow it to do CPU mixing?13:09
_BnuNo, it does not.13:09
mntmnok13:09
_BnuIt still gets stuck there. I tried enabling it and using that other thing with the mixfunc and stuff, but it doesn't help at all.13:10
mntmnwhich ahi are people using btw? i see there is some old ahi 6 beta13:10
_Bnu4, 6 is too slow.13:10
mntmnok13:10
_BnuI mean.13:10
_BnuThey're probably using 6 on AROS x86 and all that stuff.13:11
_BnuMorphgloBS.13:11
_BnuAmigaONS 513:11
_BnuBut on 68k, it's pretty much unusable.13:11
mntmnhaha ok13:12
mntmnoh there's a FileSave driver incl source13:12
_Bnuhttps://gist.github.com/beeanyew/4b29205a45bc86fa638eb411553ce81d13:13
_BnuThis is all the debug output.13:13
_BnuYeah I know, and it also has a bunch of assembler functions.13:13
mntmnah, asmfuncs.a ?13:14
_BnuNot as many, so I guess nothing in there should be too important.13:14
mntmnweirdly they call FindTask in assembler13:16
_BnuYeah, I don't think it matters, it's for passing data to the slave task.13:17
_Bnu(Which I circumvented.)13:17
mntmnmhm 13:18
mntmntoccata and your task prio is 127 while they use -1 in filesave. dunno why13:19
_BnuBecause filesave isn't realtime, I think?13:21
mntmnthat makes sense13:22
_BnuBut yeah, it may not seem like it, but I have very detailed debug output on the Raspberry Pi console.13:22
_Bnuhttps://gist.github.com/beeanyew/4b29205a45bc86fa638eb411553ce81d13:22
_Bnu(Avoiding all the slowness of KPrintF.)13:23
mntmnchuckled13:23
mntmnint8_t fart_signal;13:23
mntmnint8_t snake_signal;13:23
_Bnulol13:23
_BnuThey seemed like better options than padding...13:23
mntmnthose are important signals13:24
mntmnok i'll try to hack your driver into something i can run13:25
mntmnwhy -fomit-frame-pointer again?13:26
mntmn(trying to remember what that was for)13:26
_BnuI don't recall, but I don't think it makes a difference...13:27
_Bnu-ldebug isn't used anymore either, so it can be deleted.13:28
_BnuI was hoping that calling PlayerFunc would just be some sort of AHI keepalive, but it seems not.13:29
_BnuI don't know if you have an A500 around to put a PiStorm in, else I could just send you my WB 3.1 hard drive image and the files I changed when I added Pi-AHI.13:30
_BnuBut yeah, if I open the AHI prefs and change unit 0 to some Paula thing, it works, so they can coexist and stuff.13:32
mntmndeleted13:34
mntmnok so i have it bulded13:34
mntmni should be able to use your premade PREFSFILE yes?13:34
_BnuYeah. Though you might want to change some of the commented out debug stuff in pi-ahi.c if you didn't already.13:36
_BnuLike uncomment all the debugmsg/byte/word/long and comment out the ones that aren't commented.13:37
_BnuElse it'll try to write to $8800000 somewhere and might crash the Amiga.13:37
mntmndidn't, so far i just stubbed out WRITESHORT WRITELONG and those AHI_Uxxx stuff13:37
mntmnbecause i don't have the pi enums header13:37
_BnuAh, they're never used directly.13:38
mntmnwell they are13:38
mntmni got compil0r errors about them13:38
mntmnfor example     debuglong(AHI_U321, (uint32_t)dev);13:38
_BnuNo, they're never used directly. Always through debug* macros.13:38
_BnuThat's why I had stubbed out versions of the debug* things there.13:39
mntmnyou mean WRITESHORT and brethren13:39
_BnuYes.13:39
shanshe_wow mntmn... can we preorder now???? excited... hehehe13:39
mntmnoh i see13:39
mntmnshanshe_: yeah!!13:39
_Bnuhttps://gist.github.com/beeanyew/a2c293fd7caf4e805f42db7e27512aa313:40
_BnuThey're basically just register offsets.13:40
mntmnyeah13:40
shanshe_@mntmn it is valid for rev1 boards? or wee have to do some mod?13:40
_BnuBut the driver should work as a stub, it doesn't do any PiStorm-specific communication yet. I mean it doesn't work, but it should... I hoped it would...13:41
_BnuI was hoping I could then adapt it to a ZZ9000 driver with different DMARTG-like commands, haha.13:42
_BnuOr DMAACC...13:42
mntmnyes13:43
mntmni will try it now... first i have to crap AHI all over my system13:43
mntmnshanshe_: should work just fine on R-113:43
_BnuOh, check the contents of the prefsfile just to be sure, btw.13:44
_BnuSo that it starts with "FORM".13:44
mntmnhmm \0\0�\0\0\0prefsfile.a\0\0\0�\0\0\0CODE\0\0�\0\0\0eFORM\0\0�AHIMAUDN\0\013:44
mntmndoes not start with FORM13:44
_BnuIt doesn't... I accidentally left in the hunk header.13:44
mntmnhunk funk13:44
mntmncan you uploadz the real one?13:44
_BnuBut you can just chop off the first 28 bytes.13:44
mntmnok13:44
mntmni will do that13:44
_BnuI couldn't figure out how to get VASM to do PhxAss-style "NOEXE", so I settled for just chopping...13:45
mntmnyou mean 0x28 bytes right...13:47
_BnuDo i...13:49
_BnuIndeed I do...13:50
mntmnthe resulting prefsfile should then be 528 bytes yes?14:00
_BnuUhh, no idea, never really looked at the size.14:04
_Bnu528 bytes, says Directory Onpus.14:05
mntmncool cool14:05
mntmn_Bnu: is the PREFSFILE an AudioMode or...?14:13
_BnuIt goes in DEVS:AudioModes, yeah.14:13
_BnuYou can rename it to anything you want, like SNAKES or BLOBS.14:14
mntmncool cool14:15
mntmnok it works14:15
mntmn_Bnu: http://dump.mntmn.com/screenshot-2021-08-18-14-15-37.png14:15
_BnuYeah, that works fine.14:16
mntmnthe numbers in the background is serial debug of random numbers from your debug traces.14:16
_BnuIt's launching anything that uses it that doesn't work.14:16
mntmnok i will press "Play a test sound"14:16
_BnuAHI prefs mostly just calls GetAttr.14:16
_BnuThat will probably lock up..14:16
mntmnhmm when i bumped op the Frequency to 48khz i got some more debug numbers14:17
mntmnhmm it does not lock up14:17
mntmnoh it does14:17
mntmnand i'm probably getting 03e303e303e303e303e303e303e303e303e303e303e303e303e303e303e303e303e303e303e303e303e303e3 from your loop14:17
mntmnperiodically14:18
mntmnyeah thats hex 99514:18
_BnuPerdodicatllyu.14:18
mntmnso it behaves the same here.14:18
mntmneven without a Pi...14:19
mntmnhey, multitasking is back14:19
mntmn"only" the AHI prefs itself is still locked up14:20
mntmnso "play a test sound" locks up the system only for a while14:22
mntmn_Bnu: AHI task was waiting for a signal14:23
_BnuThat's still one while too many...14:23
mntmn_Bnu: i signalled it via Scout and that made the prefs GUI come back14:23
_BnuFor what signal, lol.14:23
_BnuThere's no way to send a signal to it.14:23
mntmn$08000000 i think, wait14:23
mntmnwell, scout can do it, so can anyone... but i'm not sure that's the expected way14:24
_BnuI doubt it is. If it was, wouldn't the docs say so?14:24
mntmnyeah, just an interesting factoid14:24
mntmnok so now pi-ahi.audio crashed ("Software Failure" requester)14:25
mntmnit survived a "suspend" though.14:25
mntmnthe slave task is still running14:25
mntmni pressed play a test sound again. ahi is hung, system works14:25
mntmnso yeah the task called "AHI" is waiting for signal bit 1<<2714:26
_BnuGood.14:28
mntmninteresting that signalling it will make the pi-ahi process crap out14:28
mntmnmaybe AHI aborts and ahiac_PlayerFunc is then not valid anymore14:29
_BnuWell, it's just that there's no way for the SlaveProcess to quit.14:32
_BnuIt needs some variable to check to be able to escape because it has no signals.14:32
_BnuI see nothing in any of the drivers signaling AHI to stop waiting...14:35
_BnuI wouldn't even know how to find the AHI main task from the driver anyway, so.14:36
mntmnok so here's one thing14:46
mntmnthe filesave drivers' _intAHIsub_Enable sends the Enable signal to the main loop (slave stuff)14:46
_BnuMain loop?14:47
mntmnand that waits for this signal before calling those hooks14:47
mntmnyeah the for(;;) loop in SlaveProcess14:48
mntmni see you call Enable() and Disable() in those functions, but the filesave driver does not do that14:48
_BnuYeah I mean, I have no idea what the enable/disable calls are supposed to really be fore, but it wouldn't be hard to just have variables controlling that as well.14:48
_BnuI just read the docs.14:48
_Bnuwhich said this14:49
_BnuIMPLEMENTATION14:49
_Bnu       If you are lazy, then call exec.library/Enable(). If you are smart, only enable your own interrupt or task.14:49
mntmnah!14:49
mntmnlazy vs smart14:49
mntmnlol14:49
_BnuIt doesn't change anything even if I remove the enable/disable calls though.14:49
_BnuBut I can make the loop not do anything while that's going on if you think that'll help.14:50
mntmno'14:53
mntmni'll test around here14:53
mntmnbefore sending you down the wrong roads14:54
_BnuTried it, and it seemed to disable the call fine, but then it got stuck as usual.14:56
_BnuAlso, my AHI does not have that "Play a test sound" button...14:58
_BnuOr those audio modes.15:00
_BnuWhich version of AHI are you using, anyway?15:00
_Bnu6.0, I guess.15:04
_BnuI'm using 4.18, because I couldn't get 6.0 to play back any sound without stuttering like crazy on my A4000.15:04
mntmnhmm i only downloaded something from aminet without looking at the version...15:07
mntmnoh yeah that is 6.0 https://aminet.net/package/driver/audio/m68k-amigaos-ahiusr15:07
mntmnbtw the test sound does get played 15:08
mntmn"played"15:08
mntmni mean it doesn't sound very good15:08
mntmnbut it's arriving in my buffer15:08
mntmnand it is farted out through the ZZ9000AX...15:09
_BnuYeah sorry, I know nothing about 6.0 except for the fact that it's nearly unusable because it's too slow.15:09
mntmnhmm we get many stop messages15:10
_BnuMaybe it's not too slow if you can completely avoid the software mixing/timing, I dunno.15:10
_BnuI don't.15:10
_BnuI really wouldn't test an AHI 4.X driver with 6.015:10
mntmni got it to play, stop and then hang15:10
mntmnwell i changed a bunch of things in the driver15:10
_BnuStill.15:11
mntmnyeah but i have that handy test button... if i get it to work in 6.0 i can still go back to test it with 4.15:11
_BnuAlright. But I still think you should take a look at thge 6.0 dev archive in that case.15:12
_BnuSee if the function table changed or something.15:12
mntmnah, Stop is supposed to signal the slave process to stop. 15:13
mntmnafaik the drivers are backwards compatible15:13
mntmnbecause you have to specify the API version15:13
mntmni mean, the drivers are forwards compatible15:13
mntmnand AHI itself backwards.15:13
_BnuWell, I set it up to check disable_cnt and playing as a sign to not signal the playerfunc, and it still gets stuck.15:18
mntmnok i got it to not hang15:22
mntmnso i can "play a test sound" over and over again15:22
mntmnbut the buffer is incredibly tiny so i can't hear it15:22
mntmn_Bnu: here are my working codez if you want to port it back https://gist.github.com/mntmn/1e6fbdc266d599b55254c32394e47c2f15:23
mntmnbut i am using return AHISF_KNOWSTEREO | AHISF_MIXING | AHISF_TIMING; 15:23
mntmnand i stubbed out all of those SetSound and friends15:24
_BnuBut I don't want that. ;_;15:26
mntmnwell15:26
mntmnmaybe you can remove em15:27
mntmnstill testing15:27
_BnuNo, if you enable MIXING and TIMING, all conversion, mixing and timing will be done in 68k software by AHI.15:27
_BnuIt says so in the docs, that you should just return AHIS_UNKNOWN if you enable those.15:28
_BnuLike, then there's no point really. But if it works with the ZZ9000AX, that's nice I guess.15:28
_BnuAt least someone got some use out of the code I wrote, lolb.15:29
mntmnwell, i only just started15:29
mntmnhmm looks like some memory corruption http://dump.mntmn.com/screenshot-2021-08-18-15-30-22.png15:30
_BnuBut yeah, it's okay. I don't really care too much if it can't be accelerated any, just go with what works.15:31
mntmnyeah first i want to have anything working and then we can look at how do make it faster and stuff15:34
mntmnahi sends me only 1920 samples...15:36
mntmnor are they bytes...15:36
_BnuLength is in samples, but buffer size is in bytes..15:37
_BnuYou're not using the pre/post timer stuff, though.15:38
_BnuSo maybe that's confusing AHI and you're only getting samples when it calls enable.15:38
mntmnah oh15:40
mntmni think the key is in all this signalling and waiting crap15:49
_BnuI mean yeah, if you're using AHI's software timing and mixing, then yes.15:50
_BnuThen it's essential for it to work.15:50
mntmnno i mean it's the key to stuff hanging or not15:54
_BnuThat's impossible, though. The only function call available without MIXING and TIMING is PlayerFunc.15:55
_BnuAll the others are null pointers.15:55
mntmnno i mean you need to wait for being enabled before calling the playerfunc etc15:55
_BnuSure, but I did try that.15:56
_Bnu[PI-AHI-amiga] Called ENABLE.15:56
_Bnu[PI-AHI] WORD write to DEBUGMSG: 000003E3 (995)15:56
_Bnu995 being the call to PlayerFunc.15:56
mntmnok15:58
mntmnhad some pizzer16:42
mntmnbtw i broke it again in the meantime and got new hangs and endless 0 buffers16:42
_BnuPfizer AHI Vaccine17:03
_BnuWhat did you say the signal was that AHI was waiting for...17:34
mntmn$0800000017:40
_BnuBlah, signaling it to ahi.device in the loop doesn't do anything.17:42
mntmnhmm i'm getting only 1 playback buffer from ami-playmod and that's it.17:43
mntmnah maybe i am doing this wrong... but not sure17:44
mntmnhow is it supposed to behave... will AHI call enable/disable all the time?17:44
mntmnfor every loop?17:44
mntmnapparently not17:45
_BnuI have absolutely no idea how it's supposed to work, no.17:45
_BnuI thought I followed the instructions, but apparently I didn't. Or something.17:46
_BnuLike, how do the soft interrupts in the toccata drivers do anything at all, ever?17:47
_BnuHow do the signals ever get triggered, and by what? None of the standard functions appear to Cause them.17:47
_BnuThe Toccata driver also just does Disable/Enable in those function calls.17:47
mntmnwell the slave process has to wait for the play signal17:48
mntmnthat is called in the end of the Start function17:48
mntmni am not using Enable()/Disable() so the rest of what i would have to say doesn't apply17:48
mntmni'm using enable and disable signals, it's just tricky to implement them17:49
_BnuYes, it gets the play signal once.17:50
_BnuAnd then the rest of the magic appears to happen in Toccata.library.17:50
_BnuSo there's like sixty percent of it missing or something, I have no idea.17:51
mntmnmaybe the filesave driver is the better base?17:51
_BnuI'm going to attempt rebasing this on FileSave, and see if it makes any difference.17:51
mntmninterezzling17:52
mntmnnow i ended up in a situation where the test tone gets fed to me over and over again and the whole system hangs17:52
_BnuSounds good.17:53
mntmnsounds like a tone...17:54
mntmnit's like i didn't get the disable signal...17:54
_BnuNo one needs it.17:55
apolkosnik[m]For a moment I thought Disable() 17:56
mntmn_Bnu: i agree that this stuff is highly annoying17:58
mntmnit feels like we are trashing some memory or stack inside of AHI and sometimes it just gets into endless loops18:07
mntmn_Bnu: btw if i remember correctly you used dos.library Delay() in your endless loop, is that safe?18:14
mntmnoh.18:23
_BnuNo idea. Nothing is safe, probably.18:26
_BnuI also made it non-endless by adding a "quitting" variable to the ahi_data...18:27
mntmnmhm. so for me it seems like calling playerfunc/mixerfunc in a loop without Wait() ing for something freezes the system18:34
mntmnwhich is weird because the filesave thing Wait()s only if it got a disable signal... then it waits to be enabled again.18:34
mntmnthe toccata driver Wait()s every time for a new signal, i think it is driven by the mix signal18:35
mntmnbut unclear to me how the mix signal is steered. it comes from the assembler18:35
mntmnthe PlayFunc monster does that18:36
mntmnok PlayFunc is passed into the SoftInt 18:37
mntmnachso and that is passed into  T_RawPlaybackTags18:39
mntmn> Note that ahiac_MixerFunc preserves ALL registers18:45
mntmnbut can that also be said for AudioCtrl->ahiac_PlayerFunc...18:46
mntmnpretimer: All registers18:47
mntmn*          except d0 are preserved18:47
mntmnso sometimes they clobber registers...18:47
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7)18:51
+ xet7 (~xet7@user/xet7)18:52
_BnuGood.18:52
_BnuIf d0 gets clobbered, you could probably do like uint32_t snakes = CallHookSomethingSomething, and then it'd by default grab that into d0 and stow away whatever might be in d0 at the moment.18:53
mntmntrue18:53
_BnuHaven't started adapting FileSave yet, just got back from the grobbery store.18:57
_BnuBut yeah, if you look at the arguments they pass to the T_ (Toccata) functions19:01
_BnuThe soft interrupts and stuff make appearances there, so that's probably what triggers them.19:01
- TadeusTaD (QUIT: Remote host closed the connection) (tadeustad@fulu.psifactor.pl)19:07
mntmnyup19:11
+ TadeusTaD (tadeustad@psifactor.pl)19:11
mntmni'm trying to hook this up to my zz9000 audio interrupt now... even if that is much too slow (my buffers are ginormous)19:11
_BnuBats 2000.19:12
_BnuI think it only requires you to call the thing something like 30-ish times per second for it to work... supposedly...19:12
mntmnyeah but my buffer is like 1 second.19:12
mntmni should probably make it smoler19:12
_BnuYeah, even 1/32nd of a second is a bit much for low latency audio, hahah.19:13
mntmnalas, it is not working19:17
_BnuWhy not... fix it...19:28
mntmnbecause i made a silly mistake19:28
_BnuFix it...19:29
mntmnsignalled glob_enable_signal instead of 1L<<glob_enable_signal19:29
_Bnuglobule19:31
mntmnLOL19:34
_BnuACTION enables the globules19:34
mntmni'm getting very slow output from ami playmod thingie19:34
mntmnmostly noise19:35
mntmnbut yeah the interrupt is required to keep the thing going!19:35
mntmnyou need some kind of outside event source to tell it, ok next buffer19:35
_BnuYeah, it seems like you can do absolutely nothing in that loop other than call those functions and quit.19:35
mntmnno, you need to Wait()19:36
mntmnuntil it's time to call the functions19:36
_BnuWell yeah.19:36
_BnuBut I mean you can't do anything.19:36
mntmnyeah you can't block19:36
mntmnlike you need to yield most time to the OS19:36
mntmnok i am getting very interesting noises...19:36
mntmnnow i just need to figure out wtf is their format19:37
_BnuJust modems.19:37
mntmnhaha19:37
_BnuIf you set KNOWHIFI, it's probably S32.19:37
mntmni do not know hifi19:37
mntmnreturn AHISF_KNOWSTEREO | AHISF_MIXING | AHISF_TIMING;19:37
mntmnthis is what i have19:37
_BnuThen probably S16... stereo? Depending on which one you selected.19:37
mntmnwell s16 stereo should be exactly right19:37
mntmnmaybe it's byte swapped for no reason19:37
mntmnswyte bapped19:38
_BnuYeah, that's why I added the debug output for what format the buffer's in.19:38
_BnuIt's in the ahi_data->BuffType or something.19:38
mntmnnow i'm sad i removed my please-do-a-huge-byteswap register in zz900019:38
mntmnwhat is AHIST_M16S19:42
mntmnachso mono19:43
_BnuYeah, S16S is Stereo and M16S is mono.19:44
mntmnthis is the kind of audio data i am getting http://dump.mntmn.com/screenshot-2021-08-18-19-47-23.png19:47
_BnuLooks like music.19:48
mntmnyes but it mostly sounds like white noise19:48
mntmni guess i will just try a little/big endian swarp19:48
pasik_btw just thought of winuae.. and it seems it has UAESND AHI driver19:51
pasik_i wonder if that is opensource19:51
+ gdonner (~gdonner@c-98-253-93-116.hsd1.in.comcast.net)19:51
pasik_i mean, if there's still need to check/verify details about the ahi driver mystery19:52
_BnuTo begin with, the UAE AHI driver is not real.19:54
mntmnhyper real19:54
_BnuYeah, but it's not real 68k code.19:54
mntmnwow i just wrote completely wrong code.19:57
pasik_https://github.com/tonioni/WinUAE/tree/master/od-win3219:57
pasik_^there's some ahi stuff there19:57
mntmnin which is swap the same byte over and over again...19:57
- RobDangerous (QUIT: Ping timeout: 245 seconds) (~Thunderbi@p200300ec8f3e1c0059d89a3a77bac934.dip0.t-ipconnect.de)19:58
pasik_but maybe that's just the host/windows side of the driver19:59
mntmnstill only noise20:00
mntmnmaybe it's 8 bit?20:00
_BnuHm, it shouldn't be.20:06
mntmnyeah. my byte swap is again completely wrong20:07
mntmnmaybe i'm too tired20:07
pasik_third time lucky20:08
_BnuI really dislike how AHI works, lolb.20:09
mntmnyeah20:12
mntmnok now i get harsh farting noises20:12
mntmnmaybe it's because i request samples so rarely and i am missing most of them20:13
_BnuProbably, you're supposed to at least match the rate it requests of you, which it sets in ahiac_PlayerFreq.20:14
mntmnok hmm20:14
_BnuBut it's like.20:14
_BnuHow facking hard can it be to just tell you "here's an audio buffer, it's this big and it's in this format, play it", lol.20:15
_BnuIt can call your driver functions whenever it wants to, but it chooses not to.20:15
mntmnhaha20:15
mntmnnaja they want a tiny buffer, they shall get a tiny buffer...20:17
mntmnshrinking the buffer to 3840 bytes...20:30
- gdonner (QUIT: ) (~gdonner@c-98-253-93-116.hsd1.in.comcast.net)20:38
_BnuBLAM BLAM BLOM20:53
_BnuACTION blobs20:53
mntmni am getting some extremely noisy, broken, distorted playback that freezes the computer while playing20:59
mntmnbut it unfreezes after playback is done at least...20:59
forcie_smol smol buffer21:04
* forcie_ -> forcie21:05
mntmni will just fake a smol buffer and append to a big buffer so that i can look at the data21:08
mntmni have confirmed that the format is AHIST_S16S21:21
mntmnbut it plays as noisy noise21:21
mntmni have captured a buffer to disk now and will check on the pc what's up with it21:22
mntmnif you're interested, here's one buffer... http://dump.mntmn.com/ahidump121:23
mntmnok that data is actually fine when imported as raw data in audacity21:25
mntmnwith endianness "big endian"21:26
mntmndd conv=swab <infile >outfile21:27
mntmn> swab swap every pair of bytes of input data21:29
mntmnwell that's what i tried to do in the damn ahi driver... maybe i did it wrong even after 3 tried21:29
mntmntries21:29
_Bnu('A`)21:36
_BnuMaybe that's what's freezing up the computer, all the endian swapping, haha.21:36
mntmnwell, that is possible. i just brought it back in21:38
mntmnobvs it should better be done in the zz...21:38
mntmnhey it works!21:39
mntmnit's just a little too slow lol21:39
mntmnlike, the playback...21:40
mntmnhow are you supposed to time this...21:40
mntmnis the pre+post timer thing supposed to fix up the timing?21:40
_BnuI think so, yeah.21:41
_BnuI mean I wasn't planning on using that crap at all, lolb.21:41
_BnuBut then AHI foiled me, and I wasn't allowed to just eat the buffers.21:41
mntmnfingers off those buffers...21:42
_BnuIt's so stupid. It should really just be LoadSound and SetSound and not lock up waiting for something.21:43
_BnuIt's like what is it even waiting for. It even says all I need to do is call the PlayerFunc X times per second... but maybe it'd work if I had something external trigger it instead of trying to delay it in the driver.21:43
_BnuThe question is, how do I make something external trigger it on the PiStorm.21:44
_BnuI can trigger a fake interrupt, at the risk of locking up the Amiga chipset.21:44
mntmnmaybe you can use timer.device21:44
mntmnor use amiga chipset vblank interrupts21:45
_BnuHow, though... can I make the vblank interrupt trigger my soft interrupt or send a signal or something...21:46
mntmnsure21:46
mntmnyou can register an interrupt server on any of those interrupts21:46
mntmnand from inside your interrupt handler you can do Signal() 21:47
mntmnthat's what i do right now... just i use     AddIntServer(INTB_EXTER, db_interrupt);21:47
mntmnand you would use something other than INTB_EXTER21:47
_BnuI think I tried to read the interrupt server stuff in the ZZ9000 USB Storage source or something, but I couldn't figure out how it worked.21:47
mntmnit is very simple21:47
mntmnyou make a node like this:21:48
mntmn    db_interrupt->is_Node.ln_Type = NT_INTERRUPT;21:48
mntmn    db_interrupt->is_Node.ln_Pri = -60;21:48
mntmn    db_interrupt->is_Node.ln_Name = "ZZ9000AX";21:48
mntmn    db_interrupt->is_Data = (APTR)0;21:48
mntmn    db_interrupt->is_Code = dev_isr;21:48
mntmn(Interrupt structure)21:48
mntmndev_isr is just a function pointer 21:48
mntmnthat function will be called when the interrupt is triggered21:48
mntmnand you attach it to the desired interrupt line with AddIntServer(INTB_EXTER, db_interrupt);21:48
mntmnand that's it21:48
_BnuMaybe it even has Nibbles support...21:49
mntmnhttp://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node01DA.html21:49
mntmnfunky docs21:49
mntmnPORTS, COPER, VERTB, EXTER and NMI21:49
_BnuNMI sounds infinitely useful on the Amiga.21:50
_BnuI just have to press an external switch every time I want to trigger it...21:51
mntmnhaha21:51
mntmnjust connect it to your mouse wheel...21:51
mntmnok so i added the mystery pre / post timer thing and it made everything much worse21:51
mntmnso i'm not sure what exactly that's supposed to do21:52
_BnuThe free scrolling mouse wheel on my Logitech MZ500 or whatever it's called.21:52
_BnuSo I can trigger a few thousand interrupts + get banned from Diablo II battle.net21:52
mntmnoh what's that > AHIA_PlayerFreq (Fixed) - If non-zero, enables timing and specifies21:53
mntmn           how many times per second PlayerFunc will be called. This must21:53
mntmn           be specified if AHIA_PlayerFunc is! Do not use any extreme21:53
mntmn           frequencies21:53
mntmn> enables timing21:53
mntmnah that's something that a user can do21:54
_BnuYeah, but AHI sets that on its own.22:00
_BnuIIRC it defaults to 32 or something for 11KHz.22:01
mntmninterrumps22:08
_BnuOne interrupt costs $650.22:11
mntmnseems so22:12
mntmnaccidentally turned chaos engine into a dance track by looping the first half second22:13
mntmn(it wouldn't progress further as no more interrupts were fired)22:13
_BnuThe secret strategy is to look at your phone, and then everything happens.22:16
mntmnall these FIFOs and interrupts are making my head spin22:24
mntmnit's a series of pipes...22:24
mntmnok after a while ahi is like this is going too fast! 22:27
mntmnand then it tries to throttle using disable/enable22:28
+ RobDangerous (~Thunderbi@p200300ec8f3e1c006065bac4a1b3280a.dip0.t-ipconnect.de)22:28
mntmnand that kinda fucks everything up22:31
_BnuI'm so glad that AHI is keeping track of you...22:32
mntmnwhat we need is an mp3 decoder in main.c...22:35
_BnuPfft, just use ADPCM, you already have that...22:37
_BnuAs long as there's some MP3 decoder that can operate entirely on a piece of memory though, it should be easy to do it.22:37
_BnuJust allocate a buffer using the DMA ACC stuff and then call ACC_DEC_MP3 on it . . .22:38
mntmni think those kind of players exist22:40
mntmnanyway, i need to put byteswapping in the card, it seems like 030 can't do it in realtime, wtf22:41
mntmnsomething is going too slow so it processes only 20 buffers in the time it should process 2522:41
mntmnprobably because it has to go in and out of zorro again to do the swarping22:42
_BnuNot all CPUs have a one cycle endian swap opcode for some reason...22:42
mntmnok, my last try for today22:48
_BnuBut is it your final try for the game...23:05
mntmninsert coin23:07
mntmnfinding the right synchronization primitives will be the hard part23:15
_BnuBottle Force.adf23:39
mntmnok, enough of this for today23:42
mntmnAHI is a huge timesink!23:42
_BnuACTION is an action game23:45
_BnuYeah, tell me about it.23:46
_BnuI've been at it for like three full days.23:46
mntmnoof23:46
mntmnat least i have some sound coming out, albeit it desynchronizes quickly23:46
mntmnit might also be the player23:46
_BnuOr the disk you're reading it from, if it doesn't load the entire file...23:47
mntmnnaja it was reading a .mod23:47
mntmnso that was ok23:47
_BnuSmall mods...23:47
mntmnbut not clear if rendering the mod at 48khz 16bit stereo is fun for 030@25mhz23:47
mntmni would need to do some calculations...23:48
mntmnit needs to feed 192000 bytes per second.23:48
mntmnthat should be doable for a 25mhz machine?23:49
mntmndepending on how many layers of junk are in between...23:49
mntmni still have to understand better what the hell AHI thinks about timing23:50
_BnuNo, probably impossible.23:52
_BnuEven 11KHz 8-bit is super hard for AHI typically.23:52
_BnuLike, AHI is the single biggest bottleneck for ScummVM, haha.23:52
_BnuWhich is why I was hoping to completely avoid its stupid mixing and sample rate conversion shit.23:52
mntmnah i forgot that i'm using AHI 623:53
mntmnthe slow one23:53
_BnuYeah, that's even worse.23:53
mntmnok ok ok23:53
_BnuThe default setting for AHI is to "limit" itself to 90% CPU usage.23:54
mntmnhaha23:54
mntmn>  'AHI' is pronounced 'atchii', as in 'God bless!'.)23:55
mntmnwat23:55
_BnuMade by Swedish people, probably...23:55
mntmnaha!23:56
mntmnok time to call it a day23:57
mntmnprobably it would be prudent later to write some direct-to-hardware plugin for eagleplayer and stuff 23:57

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!