2021-08-01.log

- WoC (QUIT: Remote host closed the connection) (woc@2603-8080-cd40-00c6-eaaf-8a29-4225-dc1f.res6.spectrum.com)00:20
+ WoC (woc@2603-8080-cd40-00c6-eaaf-8a29-4225-dc1f.res6.spectrum.com)00:20
- bfarmilo (QUIT: Ping timeout: 258 seconds) (~bfarmilo@202.56.40.240)01:34
+ bfarmilo (~bfarmilo@202.56.40.240)03:09
+ RobDangerous (~Thunderbi@p200300ec8f3e1c0061e706ee2e925542.dip0.t-ipconnect.de)11:42
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7)12:04
+ xet7 (~xet7@user/xet7)12:05
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7)12:07
+ xet7 (~xet7@user/xet7)12:07
mntmni am in the office. there is an amiga 3000 here.16:56
_BnuQuick, attack it...17:10
mntmni am fixing the palette thing in the verilog17:10
mntmnpushed to wip19a, but not tested: https://source.mnt.re/amiga/zz9000-firmware/-/commit/92a1c2de0ee9a8b730b0277f80554fa31599c7d5#064c662f9c8488492fa87d754ad70fb972c74ee2_225_22517:13
mntmn_Bnu: what do you think about doing it like this? this way the SEL op is only for the display17:13
mntmnand there's a OP_PALETTE_HI for setting the secondary colors17:14
mntmnand sorry for all those empty line changes, i used emacs and it removes all trailing spaces17:16
mntmni'm trying to use emacs now to edit the verilog so that i don't have to suffer from the vivado editor17:16
mntmn_Bnu: btw could you push the driver changes also? :317:18
mntmn_Bnu: oh and i already had unaligned transfers enabled all the time in VDMA i just saw17:22
_BnuDidn't I push the driver changes? D:17:23
_BnuThey should be on the gcc-test branch...17:23
_BnuAnd yeah, having a separate video formatter op to set the secondary palette should be fine.17:24
mntmn> DAC_NIBBLEWIDE17:24
mntmn_Bnu: ah, oh. will i still be able to build with vbcc?17:24
_BnuMaybe...!17:25
_BnuI've used boardinfo.h with VBCC before at least.17:25
_BnuIt's slightly hacked.17:25
mntmnok. my git is behaving strangely and doesn't want to see your branch. lemme see17:27
_BnuI don't feel that using VBCC is any sort of way forward for Amiga development, since there are so many things wrong with the compiler, haha. But if you don't have bebbo-gcc set up, I don't think I used anything super weird in there.17:27
mntmnok fixed my git17:28
mntmni do not have bebbo-gcc set up... i would like to, for sure, but maybe not right now17:28
_BnuIt's usually super fast to set it up on Linux, though.17:29
mntmnstill builds with v b c c17:29
_BnuBecause Linux fork() calls don't take seven minutes to complete, unlike on Windows...17:29
mntmnoh ok?17:29
_BnuYou just have to make sure to not build it in an alias directory, that's about it.17:30
_BnuLike, if your current path is /~ or whatever home is17:30
_BnuThen you have to do cd /home/snakes/amiga-gcc first.17:30
_BnuElse binutil will fail to find some files.17:30
_Bnu*binutils17:30
mntmn> Howto Clone and Download All You Need17:30
_BnuBut yeah, takes hours to build on Windows, something like 20 minutes on Linux.17:31
mntmnok17:31
_BnuMaybe less time if you have a more modern or faster CPU than me...17:31
mntmni have an i9-990017:32
mntmnwhatever that means17:32
_BnuBut even on Linux in VMWare, it was super fast.17:32
mntmnshit my ssd is incredibly full17:32
mntmnonly 1.1g free17:32
mntmnfreeing up disk space is the worst part of computering17:33
_Bnurm /* -rf17:33
mntmndeleted 16gb random files in Downloads... this is how i survive17:35
_Bnuhttps://cdn.discordapp.com/attachments/619183920591798294/871416018277371914/unknown.png17:36
_BnuThat's usually how I survive. ;D17:36
mntmnyeah ok17:36
mntmnthis computer has only 0.5TB SSD17:36
mntmnnot good~!17:36
_BnuThe 8TB slow Samsung SSDs should be dropping in price somewhat soon, at least.17:38
mntmnahh ohh mntgfx-gcc.c17:39
mntmn_Bnu: that would be a 16x space increase!17:39
_BnuYeah, I had to cut out the home made boardinfo stuff, so I made them all separate files. Because I didn't want to ruin the old source code and make it unbuildable or anything.17:40
_Bnubuild_gcc.sh for bebbo-gcc compilation.17:40
_BnuBut it's just one .c file still.17:41
mntmnok so to continue down this path i will have to do the big compile17:41
mntmni will dedicate 12 of my cores to it17:43
mntmnin the meantime i will think more about autoboot17:43
_Bnu0.2 cores per opcode.17:44
_BnuBut yeah, sorry about that. I just assumed you had bebbo-gcc, since one of the drivers require it to build. I can't remember if it's network or storage, though...17:49
mntmnmaybe i had it and did not know it was called bebbo17:49
_BnuBut for the storage driver, I can definitely clean it up a lot with bebbo-gcc and my crappy library/driver framework thingy.17:49
_BnuWell, it's called amiga-gcc, I guess.17:50
_Bnum68k-amigaos-gcc17:50
_Bnuhttps://github.com/bebbo/amiga-gcc17:50
mntmnok i did have some weird-ass m68k-amigaos-gcc17:52
mntmnbut it was making not great code and that's why i migrated everyhing to vbcc back then...17:52
mntmnbut it was maybe a different one17:53
mntmnok i pushed a driver change to use the new OP17:53
Claudenot to mistake with DJ Bobo 17:53
mntmnhehe17:53
mntmndj bebbo gcc is done here17:53
mntmnso it took 10 minutes using 12 of 16 cores17:54
mntmn(they are of course intel's fake cores)17:54
mntmnso in reality there are only 8...17:54
ClaudeXeon phi has 4 way hyperthreading :) twice as fake 17:55
mntmnlol17:56
mntmnboardinfo.h:5:40: fatal error: libraries/Picasso96.h: No such file or directory17:57
mntmn #include        <libraries/Picasso96.h>17:57
mntmnmhm mhm17:57
mntmnis that a header from the p96 sdk?17:58
mntmnok got it18:01
mntmnit's from Develop.lha18:01
mntmnout came a ZZ9000.card18:02
_BnuAh, you can use the bebbo-gcc make to get it.18:02
_Bnumake sdk=p96 or picasso96, I can never remember which.18:02
_BnuIt's not up to date with the Develop.lha from the iComp wiki, of course.18:02
_BnuBut no one ever really uses the Picasso96 SDK for anything...18:02
Claude"There's a party18:03
ClaudeHere we start it18:03
ClaudeThere's a party18:03
ClaudeThis is a party song…" make -j12 18:03
_BnuI'm thinking of hiring Jim Drew to make a new driver using JimC++, since he has worked for NASA...18:04
Claudemake.bat18:06
mntmnlol18:06
mntmnharr harr harr https://github.com/mntmn/amiga2000-gfxcard/blob/master/va2000-spartan6/va2000.v#L171818:09
_BnuYeah, I think I used wordwide for PiSCSI as well.18:09
_BnuSince bytewide apparently never worked, and nibblewide seemed annoying.18:10
mntmnpretty insane, i will try to move this to the C code18:10
_BnuYou can just do a basic boot ROM in assembler, and have it relocate just the basic crap.18:11
_BnuAnd then do everything else externally.18:11
_Bnuhttps://github.com/beeanyew/pistorm/blob/wip-crap/platforms/amiga/piscsi/device_driver_amiga/bootrom.s18:11
_BnuAnd you could probably remove all the nops...18:12
- RobDangerous (QUIT: Quit: RobDangerous) (~Thunderbi@p200300ec8f3e1c0061e706ee2e925542.dip0.t-ipconnect.de)18:16
+ RobDangerous (~Thunderbi@p200300ec8f3e1c0061e706ee2e925542.dip0.t-ipconnect.de)18:16
mntmn_Bnu: yeah i mean i am moving the whole Diag structure to the C code, because i don't wanna waste fpga space with it18:19
_BnuOh, yeah.18:21
_BnuJust stuff it in DDR somewhere, haha.18:21
_BnuCan also keep the driver in C and relocate it before making it available for the boot ROM to copy it.18:30
_BnuMight need fmemopen or something though, and getting rid of some malloc here and there. Haven't looked into it.18:30
mntmnok, will do some autoboot vector tests now 19:06
mntmnok cool i have a lil' boot rom mapped in at card base + 0x600019:21
mntmn_Bnu: is there some amiga side software that can show if this boot rom was recognized?19:21
mntmni mean, i could put an assembl0r loop in there that would poke stuff to the background color 19:22
mntmnDFF18019:23
- Crabster (QUIT: Remote host closed the connection) (~puppy@user/crabster)19:25
_BnuUhhh, ShowConfig should display it?19:32
_BnuLike board+ROM or something.19:32
_Bnuhttps://cdn.discordapp.com/attachments/619183920591798294/871445588355448882/unknown.png19:33
mntmnyep, it does19:34
mntmnthx19:35
mntmnok goes into reboot loop now ;319:36
_BnuAh yeah, make sure everything is like align worded, like in my boot ROM.19:39
_BnuOtherwise vasm will... well, it'll screw you over.19:39
_BnuFor seemingly no reason.19:39
_BnuAnd it'll jump into the middle of an instruction, often causing it to die.19:40
_BnuAlso, remember to chop off everything before the $9019:40
forcieisnt the word alignment thing just standard 68k behaviour?19:46
mntmni'm currently reusing parts of my ancient code, and making new code with gcc19:47
mntmn(like, feeding .S to gcc and then getting the bytes with objdump)19:47
mntmni have a const u16 BOOT_ROM[] = { ... }19:49
mntmncontaining words which i byte-swap at init 19:49
mntmni have the Diag struct in there followed by asm code19:50
mntmnthis works fine:   0x4e71, 0x4e75, // nop, rts19:50
mntmnafter this i have a color cycling routine19:51
mntmnneat, if i jump to that with mon, it works19:51
mntmnlike, g 4000603c19:52
mntmn  0x23c0, 0x00df, 0xf180, // move.l d0,dff18019:52
mntmn  0x5380,               // subq.l #1,d019:52
mntmn  0x6000, 0xfff6,        // bra.w 0 019:52
mntmnthat's the code19:52
mntmnmaybe i should put more nops19:53
_BnuAh yeah, not sure. Haven't tried the gcc-assembler, only vasm.19:59
_BnuAnd that slaps on some chunk header no matter what you do, so I had to eject that.19:59
- RobDangerous (QUIT: Ping timeout: 272 seconds) (~Thunderbi@p200300ec8f3e1c0061e706ee2e925542.dip0.t-ipconnect.de)20:01
mntmnok it works!20:07
mntmnpulsing all teh colors20:08
_BnuQuick, delete it...20:08
mntmni mean, "works"20:08
mntmni have m68k code executing from zz9000 ddr at diag time20:08
_BnuAlso, I can send you the boot ROM code FrenchShark let me borrow for when I made PiSCSI on Discord. Just have to find it first...20:09
_BnuJust in case you'd rather do stuff in 68k rather than make calls to the ZZ9000, but I found some useful information in there that I used for my boot ROM.20:09
_BnuIt's not super easy to read, because it's half in French...20:09
mntmnhaha20:10
mntmnok well first i have to think a bit... like, what do we want to do now20:10
_BnuI hab sended it on Discord.20:12
_BnuYeah I mean, it's up to you. If you want to do it all in 68k, it can certainly be done, but I won't be able to understand it and I can't help you with it, haha.20:12
mntmni don't mean what tools/language to use, more like, what are the steps and mechanisms20:13
_BnuYeah, no idea. I would probably just end up doing it like I did with PiSCSI, except copy back memory from the ZZ9000 to Amiga RAM instead of patching Amiga RAM directly from the ZZ9000 side.20:14
_BnuI just used vasm for the boot ROM and bebbo-gcc for the device driver, and that was about it. It's all pretty minimal as far as complexity goes, which is the only way I know how to do things anyway...20:15
mntmni just want to figure out what steps i have to do. so first, i have to load the .device, right? then, relocate it. then do some dos node stuff20:18
mntmnloading the device means it will just be part of the rom, right20:18
mntmnkickstart will automatically find it because it has a romtag? is that how it worked?20:19
mntmnbut before it can be umm initialized it has to be relocated, right20:19
_BnuYeah, loading the .device file is "easy".20:22
_BnuI just allocate a set amount of memory and then send a command to the PiSCSI device to relocate the hunks to the offset I allocated.20:23
_BnuThen it copies it there (you would have to copy it from the Amiga side on the ZZ9000 though) and just calls InitResident to point at the ROMtag.20:23
_Bnuadd.l #$028,a1 <- $28 being the offset of the ROMtag in pi-scsi.device20:24
_BnuI think MIT should be compatible with GPL at least... you can probably just re-license the hunk-reloc.c stuff otherwise, since MIT means you can mostly do whatever you want with it.20:25
_BnuAlso, no matter what anyone says, I'm pretty sure you have to OpenLibrary expansion.library for the initialization stuff to actually work.20:25
_BnuBecause I couldn't get it to work without that.20:25
_BnuMaybe everyone else had some other boot ROM ahead of them that had already opened it, not sure.20:25
mntmnmy old code also did open expansion.library https://github.com/mntmn/amiga2000-gfxcard/blob/master/drivers/bootrom/boot3.s#L26120:26
mntmnnaja naja20:26
_BnuYeah, just in case someone tells you that you don't have to open it.20:26
mntmnmy brain is very slow and non-functional. i'm not yet thinking about the details of relocation20:26
mntmni am now breaking my head about the driver itself first20:26
_BnuI received many strange pieces of advice trying to make this boot ROM, lol.20:26
mntmnand that it uses ugly magic and doesn't directly have a romtag20:27
_BnuAh yeah, I can just adapt it to the framework I use for PiSCSI and stuff if you want.20:27
mntmnyou had a cleaner way of setting up a device right?20:27
mntmnyeah let me see20:27
_BnuThen building it is just an m68k-amigaos-gcc line.20:27
_BnuIt's structured mostly like the ZZ9000Storage driver already, except minus all the stuff I didn't understand, haha.20:28
_BnuSo it doesn't have the IRQ thing(s), but they should just be able to plug in in the same places as before.20:28
mntmnok, i will try to adapt it20:29
_BnuBut yeah I couldn't understand the device drivers other people had at all...20:29
_BnuWith separate assembler files for the ROMtags and all kinds of weird GCC flags that were unclear as to what they did.20:30
_BnuSo I came up with my own thing based in part on some dummy driver that did nothing...20:30
_BnuLike the -rdriver-amiga or whatever it was GCC flag has to be the most messed up thing I've ever seen.20:32
_BnuI have no idea what it was supposed to do, but it did not result in a usable library/driver.20:32
mntmnok i have patched out the -ramiga-dev stuff20:57
mntmnand replaced it with your clean-room stuff20:57
mntmnmakes the device 2k smoler :O20:57
mntmn>   3388 Aug  1 20:57 zzusb.device20:57
mntmnok so i have this mini driver... nowwww i will probably want to put the diag routine in there as well21:01
mntmnor maybe not21:01
mntmnhard to say21:01
mntmnone thing i don't understand is:21:05
mntmnhttps://github.com/captain-amygdala/pistorm/blob/main/platforms/amiga/piscsi/device_driver_amiga/bootrom.s#L12221:05
mntmnwhy does the diag area have another romtag21:05
mntmnbecause the device itself already contains a romtag21:05
_BnuUhhh, where's the other ROMtag?21:09
_BnuI mean the ROMtag in the boot ROM has nothing to do with the ROMtag in the driver.21:10
_BnuI'm pretty sure.21:10
_BnuThe ROMtag in the driver is only used by InitResident.21:11
_BnuWhile the one in the ROM is used for... nothing? Something like that.21:11
_BnuThe ROM itself is never accessed after config, aside from the BootEntry that does nothing.21:11
_BnuIt's possible that you can put the diag routine in the driver, but I wouldn't know how to do it.21:12
_BnuWinUAE didn't seem to do it, neither did the Apollo boot ROM.21:12
_BnuI have no idea how you would even reloc the driver if it had the DiagEntry code in it...21:13
_BnuIf there's something that doesn't make sense in the boot ROM, it's probably because it's not used, and it's just in there because it's from the example boot ROM in the Amiga developer manual.21:14
mntmndoes the romtag need to be in the rom then at all, if it is not used?21:17
mntmnand yeah, it makes sense to not have the diag routine in there for the reason you mentioned :D21:17
_BnuI think it needs to be there, as in there needs to be a ROM tag for Kickstart to parse it properly.21:18
mntmnok, for example i also do not understand why in the piscsi bootrom code there is a patch table patching pointers in the unused romtag21:18
_BnuBecause it copies the contents to RAM or something.21:18
_BnuSo it needs to relocate it to run the code, and the allocated RAM is then discarded.21:19
_BnuI'm pretty sure the ROMtag in the boot ROM can say just about anything, like bleppenhoser.device version 0.500 or something.21:19
_BnuThe relocation code in the boot ROM is just the code from the example thing, I have no idea what it actually does because I can't read it...21:19
mntmni will test what happens if i remove the romtag from the boot rom21:19
mntmnok, gotcha!21:20
mntmnyeah the romtag is not needed at all, at least not needed to execute diag21:21
_BnuAh, alright. Yeah, I kind of knew it wasn't actually used for anything.21:21
_BnuBut I just left it in because I didn't want to break it once I had it working.21:21
mntmnyeah21:22
_BnuLike you can probably see, I also padded the strings to word alignment... because otherwise vasm misaligned it and broke everything.21:22
mntmnthe following works as a boot rom:21:23
mntmnRomStart21:23
mntmnargh21:23
mntmncopypaste fail sorry lol21:23
mntmnconst u16 BOOT_ROM[] = {21:23
mntmn  0x9000, 0x1000, // WORDWIDE+CONFIGTIME  DAsize (0x1000)21:23
mntmn  0x000e, 0x000e, // DiagPt: 0x36         BootPt: 0x3621:23
mntmn  0x0028, 0x0000, // DevName pointer      Resvd 121:23
mntmn  0x0000,21:23
mntmn  0x23c0, 0x00df, 0xf180, // move.l d0,dff180   DiagEntry@0xe21:23
mntmn  0x5380,             // subq.l #1,d021:23
mntmn  0x6000, 0xfff6,        // bra.w 0 021:24
mntmn}21:24
mntmn(ignore wrong comments about 0x36)21:24
mntmnhmm the DevName pointing to nowhere might be illegal, but still...21:24
_BnuI don't think the DevName is actually used unless you invoke some black assembler magic, but I knew I could never make an actual driver or functioning boot ROM like the old Apollo thing in assembler anyway, haha.21:25
mntmnok :321:25
_BnuAlso, theoretically the driver loaded by InitResident survives a soft reboot, but I've been unable to test it on the PiStorm since a reboot there is always a hard reboot.21:26
mntmninterdazzling21:26
_BnuBut the DosNode/Enqueue stuff always gets wiped on a reboot so bootable devices can be refreshed, so you always have to do that part.21:26
mntmnyeah21:27
mntmnmy next step would be to glue the zzusb.device binary in there and relocate it21:28
_BnuMake sure to leave a bit of space before the binary pack-in of the driver in the firmware, haha.21:28
_BnuI didn't, and then I had to adjust a lot of stuff when my boot ROM ended up larger than 1KB for a while...21:28
mntmnwhere does hunk-reloc come from originally?21:28
_BnuI dunno... my keyboard?21:29
mntmnah you wrote it from scratch? :021:29
_BnuYeah, because I couldn't figure out the "simple" assembler reloc things or how to make them do what I wanted.21:29
_BnuSo I just made my own.21:29
mntmnok, been there21:29
_BnuRead some documentation about the Amiga hunk binary format somewhere and just parsed it in C, haha.21:30
mntmnthe one that i made in asm back then required to build the .device in such a way that there was only 1 hunk i think21:30
mntmnso i could leave out a lot of stuffs21:30
_BnuThe hunk-reloc thing can even relocate the entire ScummVM binary, haha.21:30
_BnuSo you can technically use it as an accelerated executable loader...21:30
mntmnahh i see21:31
mntmnoh nice i still have hunktool installed21:32
mntmnit can list all teh hunks21:33
_BnuOh, and the lseg thing is for loading file systems from disk images/raw disks.21:38
_BnuBecause stuff like PFS3, SFS and DOS3/7/whichever are typically embedded on the disk itself. Sort of like on Mac, except it doesn't want to kill you.21:40
mntmnnanu https://github.com/rmtew/peasauce21:44
_Bnusauce21:45
mntmncan't get the sauce to work, naja whatever21:52
_BnuIt's Python, so that's probably working as intended...21:52
forciepython only works if you write it yourself, otherwise it always breaks because of some shitty package or deprecated thing21:59
forcie:D22:00
mntmnthat is my experience as well22:48
forciewhich is too bad because it is easy and intuitive to write stuff in it23:07
forciebut the ecosystem and the attitude of the maintainers kinda sucks23:08
forcie"hey guys lets break integer division, i'm sure noone will care"23:09
xet7It's same for other programming languages, not just Python23:17
mntmnstaring at my really weird old reloc code using cop23:17
+ RobDangerous (~Thunderbi@p200300ec8f3e1c00b9351d3d111d691f.dip0.t-ipconnect.de)23:27
mntmnok, enough hunk business for today23:44
- WoC (QUIT: Remote host closed the connection) (woc@2603-8080-cd40-00c6-eaaf-8a29-4225-dc1f.res6.spectrum.com)23:45
+ WoC (woc@2603-8080-cd40-00c6-eaaf-8a29-4225-dc1f.res6.spectrum.com)23:46
mntmnah, here is a tiny relocator that looks much better than mine https://github.com/cahirwpz/demoscene/blob/master/bootloader.asm#L44223:55

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