- RobDangerous (QUIT: Ping timeout: 272 seconds) (~Thunderbi@p200300ec8f3e1c00b9351d3d111d691f.dip0.t-ipconnect.de) | 00:35 | |
_Bnu | Just remember that you also need an LSEG loader if you're going to do it on the 68k side. | 00:40 |
---|---|---|
_Bnu | Otherwise you can never really boot from anything but DOS0/1 partitions | 00:40 |
_Bnu | (And the file sytems also need to be relocated after allocating memoyr for them and loading them.) | 00:41 |
mntmn | blergh | 01:10 |
_Bnu | But that's why I sent over the ancient Apollo (not that one) boot ROM sources. | 01:13 |
_Bnu | They have all this stuff, including code how to properly set up a DosNode and Enqueue it and schtonks. | 01:14 |
_Bnu | I just can't read much of the code, so I only picked out the parts I could understand. | 01:15 |
mntmn | ok cool i will need to log into discords tomorrow | 01:16 |
mntmn | i made a bunch of progress of remembering and refamiliarizing today | 01:17 |
mntmn | it's baffling that all kind of disk expansion vendors must have written all this redundant code | 01:17 |
mntmn | and super baffling that you can't just call into kickstart for these things | 01:18 |
_Bnu | Why would anyone want to use anything but scsi.device, anyway... it is superior... | 01:20 |
_Bnu | Technically, you're choosing to rewrite all this redundant code again, hahah. So that's probably what everyone did, since they got paid for it anyway. | 01:21 |
_Bnu | I had no motivation to do such things, so I did it... my waaaay. | 01:21 |
mntmn | fascinating | 02:08 |
mntmn | also i just watched the ds9 episode where quark and his brother and nephew are the aliens from roswell | 02:08 |
_Bnu | And then they are attacked by barbarians. | 02:22 |
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7) | 05:36 | |
+ xet7 (~xet7@user/xet7) | 05:37 | |
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7) | 05:55 | |
+ xet7 (~xet7@user/xet7) | 05:56 | |
+ RobDangerous (~Thunderbi@p200300ec8f3e1c00e588fff41585aac2.dip0.t-ipconnect.de) | 08:32 | |
+ isoriano (~isoriano@5.147.209.166) | 11:41 | |
+ isoriano_ (~isoriano@5.147.209.166) | 11:41 | |
isoriano_ | Terve :-) | 11:48 |
mntmn | > Happy end at file position = 2852 | 14:49 |
mntmn | i added some serial print debug functions to zz9000 firmware | 15:15 |
mntmn | so i can poke characters to card base + 0xf0 and get them over the zz9000 uart | 15:17 |
mntmn | or a word to 0xf2 and get that printed as hex | 15:17 |
pasik | those sound useful :) | 15:21 |
mntmn | especially during diag/boot time... | 15:26 |
_Bnu | What I did was add a bunch of "debug registers" to the PiSCSI portion. | 15:56 |
_Bnu | And have it print debug messages based on a message code and the data I had written to it, like longwords, words and crap... | 15:56 |
_Bnu | Because kprintf had a tendency to corrupt random memory if I wasn't careful. | 15:57 |
mntmn | ah oh http://68k.hax.com/SWAP | 16:22 |
mntmn | _Bnu: yeah, so that's similar, just a bit more minimal on my end | 16:23 |
mntmn | (so far) | 16:23 |
mntmn | it's even kind of working... | 16:37 |
_Bnu | I am the king of working. | 17:30 |
mntmn | the wor-king | 17:59 |
Claude | is the a ammx swap too? swaps 2 times in one clock cycle ? | 18:14 |
mntmn | wat wat? | 18:33 |
mntmn | in any case, the hunk parser seems to do the right thing... | 18:33 |
mntmn | according to my tracing of it | 18:33 |
+ RobDangerous1 (~Thunderbi@p200300ec8f3e1c00e588fff41585aac2.dip0.t-ipconnect.de) | 19:12 | |
- RobDangerous (QUIT: Ping timeout: 272 seconds) (~Thunderbi@p200300ec8f3e1c00e588fff41585aac2.dip0.t-ipconnect.de) | 19:13 | |
* RobDangerous1 -> RobDangerous | 19:13 | |
- isoriano_ (QUIT: Quit: Leaving) (~isoriano@5.147.209.166) | 19:16 | |
- isoriano (QUIT: Quit: Leaving) (~isoriano@5.147.209.166) | 19:16 | |
_Bnu | Hank purser. | 19:21 |
mntmn | hehe | 19:34 |
mntmn | i have a new question. | 19:34 |
mntmn | kickstart copies the bootrom to some kind of place in ram and gives me the address, right | 19:34 |
mntmn | does this ram stay allocated or not? | 19:34 |
mntmn | it feels like in-place relocation (mutating the copy in ram) is maybe not what they intended??? | 19:35 |
mntmn | i'm gonna look at the french files | 19:38 |
mntmn | > Routine de comparaison des noms de partition | 19:39 |
_Bnu | I mean, how should I know, lol. | 19:39 |
_Bnu | It's the example boot ROM. | 19:39 |
_Bnu | If it's not doing it right, you'll have to ask Commodore why they did that. | 19:40 |
mntmn | > On saute la zone des Hunks | 19:40 |
_Bnu | http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node0594.html | 19:42 |
mntmn | haha they have a tiny LoadSeg | 19:42 |
mntmn | (in the french code) | 19:42 |
mntmn | but that would work only with 1 segment | 19:44 |
mntmn | and my device has 3 | 19:44 |
mntmn | code, data, bss | 19:45 |
mntmn | and relocations are going to all of them | 19:45 |
mntmn | i need to find the offsets of these segments in the binary, so i can add them to the relocation targets | 19:45 |
mntmn | at the beginning of the binary, there is a list of the 3 segment sizes | 19:46 |
mntmn | but these sizes are a bit too smol | 19:46 |
mntmn | (i know i have to x4 them, but still too smol) | 19:46 |
mntmn | my guess is that this is the size i should allocate, so other tables at the end etc are not copied, so everything shrinks after allocating+copying | 19:47 |
_Bnu | Didn't you find a relocator thing already? | 19:47 |
mntmn | but i don't wanna do that, i want to relocate everything in place | 19:47 |
_Bnu | It seemed to allocate memory on its own. | 19:47 |
mntmn | yes | 19:47 |
mntmn | i am patching that one | 19:47 |
mntmn | it does the parsing fine | 19:47 |
mntmn | but i disabled the allocations in it | 19:47 |
mntmn | because why should i allocate again and copy again | 19:48 |
mntmn | if kickstart already copied the binary for me | 19:48 |
mntmn | the problem is that they get their segment addresses from the allocator | 19:48 |
mntmn | but instead i need to find the segment addresses in the .device blob | 19:48 |
mntmn | in my old broken code i did 2 passes because of this | 19:49 |
mntmn | first pass to find the addresses and second pass to patch | 19:49 |
mntmn | but i can't believe i have to do that... | 19:49 |
mntmn | there must be some trick | 19:49 |
_Bnu | Yeah sorry, no idea. As far as I can tell, the copy of my PiSCSI boot ROM does not remain in RAM after booting. | 19:49 |
mntmn | ok? | 19:49 |
mntmn | that's bad then. | 19:49 |
_Bnu | That's why I load the driver as resident. | 19:50 |
_Bnu | Otherwise it can't persist across reboots. | 19:50 |
mntmn | well yeah i would InitResident it then | 19:50 |
mntmn | but i thought i could patch the binary (do the relocations), and then hand that directly to InitResident | 19:50 |
mntmn | but what you say sounds like the area passed to InitResident would disappear? | 19:50 |
mntmn | or will InitResident protect it, or copy it? | 19:50 |
mntmn | (who is responsible for that memory?) | 19:51 |
_Bnu | Maybe you can, I don't know. I just allocated memory for it and copied it there because I didn't want to spend 200 years figuring out what might be going wrong. | 19:51 |
mntmn | yeah i'm in the middle of those 200 years obviously | 19:51 |
_Bnu | I'm not a real Amiga person, so I feel that spending 16 or 18KB of memory on a storage device driver doesn't really matter, haha. | 19:52 |
_Bnu | It works fine on an A500 with 512KB of RAM, so it's probably okay. I don't much care for the 256KB Chip machines. | 19:53 |
mntmn | true | 19:54 |
mntmn | i will try to use exec AllocMem in there | 19:54 |
mntmn | i do not believe in custom allocation routines in my bootrom :33 | 19:54 |
_Bnu | Oh, wasn't that relocator using AllocMem? | 19:56 |
_Bnu | It looked like it was just allocating memory for the hunks when I looked at it briefly. | 19:56 |
mntmn | they have their own AllocMem | 19:58 |
mntmn | here https://github.com/cahirwpz/demoscene/blob/master/bootloader.asm#L350 | 19:58 |
mntmn | but it takes the same arguments as the exec one | 19:59 |
_Bnu | Weird. | 19:59 |
mntmn | they also have their own CopyMem, but that one works differently | 20:01 |
mntmn | so i took it... it's also only 2 or 3 lines | 20:01 |
mntmn | relocations look sane... | 20:09 |
- RobDangerous (QUIT: Ping timeout: 272 seconds) (~Thunderbi@p200300ec8f3e1c00e588fff41585aac2.dip0.t-ipconnect.de) | 20:12 | |
mntmn | hmm, initresident did not crash for the first time... | 20:34 |
_Bnu | ACTION downloads | 20:34 |
mntmn | ok zzusb.device is in the devices list!! | 20:35 |
mntmn | (mon -> vd) | 20:35 |
mntmn | _Bnu: https://twitter.com/mntmn/status/1422264983178600448 | 20:36 |
mntmn | not sure why it is "43.0" | 20:36 |
mntmn | the revision i mean... | 20:36 |
mntmn | the code i stole from you says: | 20:37 |
mntmn | #define DEVICE_VERSION 43 | 20:37 |
mntmn | #define DEVICE_REVISION 20 | 20:37 |
mntmn | so the 43 is ok... | 20:37 |
_Bnu | Uhh, not sure. I think I checked using Scout and it did say what it was supposed to... | 20:41 |
mntmn | mountdos list zzusb.device works :0 :0 :0 :0 | 20:41 |
_Bnu | Maybe it only takes one digit, and it only reads the 0? | 20:41 |
mntmn | haha this could be | 20:41 |
mntmn | maximum haxxor feelings | 20:43 |
mntmn | https://twitter.com/mntmn/status/1422266925489573893/photo/1 | 20:44 |
mntmn | now we just need mountdos in the rom... | 20:44 |
mntmn | InitResidentEvil | 20:44 |
mntmn | theoretically all that partition / or at least boot node stuff could live in the device itself, no? | 20:45 |
mntmn | NootBode | 20:46 |
mntmn | bizarrely, the device is functional | 20:47 |
mntmn | i hadn't tested it after applying the changes to make it compile without -ramiga-dev | 20:47 |
_Bnu | No, I do not think it can live in the device itself. | 20:50 |
_Bnu | Because it needs to be done at Diag time. | 20:50 |
_Bnu | Also, -ramiga-dev doesn't actually do anything useful for creating a device driver... | 20:51 |
_Bnu | Also, you most likely don't have to care about the AddDosNode/Enqueue stuff. | 20:52 |
_Bnu | It's only requires for Kickstart 1.3 because it doesn't have AddBootNode. | 20:53 |
_Bnu | With 2.0+, it's infinitely easier because you can just MakeDosNode and AddBootNode if it's bootable or AddDosNode if it's not. | 20:53 |
mntmn | well, i mean i have the fully loaded and relocated device at diag time, i think i could jump into a routine of it... | 20:57 |
mntmn | _Bnu: lets say my USB stick was formatted with RDB partition table, could i make amigaos discover the partitions or do i need a partition parser in any case? | 20:58 |
mntmn | looking at http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node03AE.html again... | 21:00 |
mntmn | MakeDosNode has to be done for each partition, right... | 21:01 |
_Bnu | You can not make AmigaOS discover the partitions as far as I know, no. | 21:05 |
_Bnu | You need to parse the RDB yourself and add them. | 21:05 |
_Bnu | But yeah, if you can figure out how to jump into the C code of the device somehow, then you can do all the RDB parsing and Dos/BootNode setup there. | 21:06 |
mntmn | ok | 21:11 |
mntmn | yeah yeah | 21:11 |
mntmn | i want to have a very simple working thing first though, so i might do something like parse MBR and add the first FFS formatted partition only. | 21:11 |
mntmn | from there, you can load moar file systems and advanced magic... | 21:11 |
mntmn | also i wonder if FFS works on MBR but why not... | 21:12 |
_Bnu | Uhhh | 21:12 |
_Bnu | I know that RDB can coexist with MBR, somehow. | 21:12 |
_Bnu | But I've never seen anyone do it. | 21:12 |
_Bnu | Because RDB doesn't have to be the first block on the drive, it searches up until block... 256? I forget. | 21:13 |
_Bnu | But if the blocks are being read back properly, you should be able to use HDToolBox or GiggleDisk with it. | 21:13 |
mntmn | i don't think i ~need~ RDB if i have to parse the partition table anyway... just amiga's toolbox thingie won't work | 21:13 |
_Bnu | Just edit the tooltype for HDToolBox to use zzusb.device instead. | 21:14 |
mntmn | tyletoop | 21:14 |
_Bnu | ('A`) | 21:14 |
mntmn | i mean, i'm thinking more about partitioning the stuff on a linux machine... | 21:14 |
mntmn | to be able to get files on and off there quick | 21:14 |
_Bnu | Sounds weird, but sure. You don't need any of that then. | 21:15 |
_Bnu | You can just ignore it all and construct your own BootNodes. | 21:15 |
mntmn | exactly | 21:15 |
mntmn | weird in terms of non-amiga-like, but not weird in terms of comfort perhaps... | 21:15 |
_Bnu | I dunno, sounds completely unusable to me, hahah. But I'm on Windows. | 21:16 |
mntmn | :( | 21:20 |
mntmn | _Bnu: what would be comfy for you? | 21:26 |
mntmn | ah, people on windows mostly use UAE to access amiga formatted disks, right? | 21:28 |
_Bnu | It's the only way to do it on Windows, really. | 21:29 |
_Bnu | Using UAE as an intermediary to mount the entire disk as a "hardfile", since UAE supports RDB as well as its single partition hardfiles. | 21:29 |
mntmn | i see. | 21:30 |
mntmn | also i see that fat95 is lgpl and even comes with source and also is written in assembler. | 21:30 |
_Bnu | I think not supporting RDB either for the full disk or using a disk image on the USB device would limit the usability of it quite a bit. | 21:30 |
_Bnu | I mean, unless I'm the only Windows user, then you can just ignore me honestly. | 21:31 |
mntmn | 26kB though | 21:31 |
mntmn | yeah, a disk image could be interesting as well | 21:31 |
mntmn | naja naja | 21:32 |
mntmn | enough for today perhaps | 21:38 |
mntmn | mm flavor > The partition data includes the start, length, filesystem, boot priority, buffer memory type and "flavor", though the latter was never used | 21:40 |
mntmn | _Bnu: i'm reading your codez to understand RDB | 21:52 |
+ RobDangerous (~Thunderbi@p200300ec8f3e1c00e588fff41585aac2.dip0.t-ipconnect.de) | 22:01 | |
_Bnu | There are structures available for RDB in the NDK include files, so it's not very hard to deal with. Very simple setup, otherwise I wouldn't have been able to do much with it. | 22:06 |
_Bnu | Basically just block types and pointers to the next block (if any). | 22:06 |
_Bnu | The LSEG things are just single blocks with some identifier stuff and then sequential data as well. | 22:07 |
_Bnu | Most of the data needed to make the DosNode is available in each partition block as well. | 22:16 |
_Bnu | All that's missing is a -1 or whatever it is for the GlobalVec and a pointer to the loaded/reloced file system (if any). | 22:16 |
_Bnu | If the pointer is null, it'll try to use the default file system on Kick 2.0+, typically DOS/1. | 22:16 |
_Bnu | On Kick 1.3, I have no idea, I can't get it to work. | 22:16 |
mntmn | that is cool, thanks | 22:29 |
mntmn | i put some test code in the device to find an RDB, but now my relocator fails with the new binary :3 | 22:29 |
mntmn | patches the wrong locations... | 22:29 |
mntmn | so it added 2x an offset to the romtag itself lol | 22:29 |
mntmn | oh yeah how weird, there are relocation table offsets of zero... and those get added to the romtag :0 | 22:40 |
_Bnu | Good, good... | 22:40 |
mntmn | but according to hunktool, these entries are not zero. | 22:43 |
mntmn | so a few entries are borked | 22:43 |
mntmn | the table is like 2, 0, 80, 0, c0, 57c, 814, ea, 21e, 29c, f2, ... | 22:44 |
mntmn | but it should be 2, 6, e, 12, 16, 57c, 814, ea, 21e, 29c, f2, ... | 22:45 |
mntmn | so a portion of the table is overwritten with 0, 80, 0, c | 22:45 |
_Bnu | Everyone needs a bit of $0C008000 in their lives. | 22:47 |
mntmn | hehe | 22:47 |
mntmn | well, it's more like 00000000 00000080 00000000 000000c0 | 22:47 |
mntmn | :3 | 22:48 |
mntmn | so either it is not copied out of the "rom" cleanly, or clobbered afterwards... | 22:48 |
mntmn | oh yeah i'm dumb | 22:49 |
mntmn | haha | 22:49 |
mntmn | the boot rom has swollen into zz9000s network structures | 22:49 |
mntmn | because i put it at 0x3fcff000 | 22:50 |
mntmn | there's only 4k space but we require 8k | 22:50 |
_Bnu | Ah yeah, I made that mistake with my boot ROM originally, it's better to give it 16KB just in case. | 22:50 |
mntmn | :333 | 22:51 |
mntmn | oh man without some hex tracing code in place i would be extremely lost now | 22:51 |
_Bnu | Without being unable to step through the boot ROM code in real time, I would never have gotten it to work. :D | 22:52 |
_Bnu | *Without being able | 22:52 |
_Bnu | (Because on the PiStorm I could just halt CPU emulation and step through it.) | 22:53 |
_Bnu | That's how I found out about vasm misaligning all its generated code at certain points. | 22:53 |
mntmn | oop | 22:53 |
mntmn | init_device! | 23:06 |
mntmn | zz9k found! | 23:06 |
mntmn | Hello from parse_rdb! | 23:06 |
mntmn | RDB not found! | 23:06 |
mntmn | ok ok | 23:06 |
mntmn | lets hdtoolbox it... | 23:06 |
mntmn | interestingly the disk is shown as kinda 16GB | 23:09 |
mntmn | Hello from parse_rdb! | 23:10 |
mntmn | RDB found at block: 0000 | 23:10 |
mntmn | Cylinders: ce80 | 23:10 |
mntmn | Heads: ce80 | 23:10 |
mntmn | Sectors: ce80 | 23:10 |
mntmn | BlockBytes: 0200 | 23:10 |
mntmn | PartitionList: 0001 | 23:10 |
mntmn | ok this worked immediately | 23:10 |
mntmn | except those cyl/had/sector numbers are too smol or something weird | 23:10 |
mntmn | ok, this is pretty cool, enough for today! | 23:11 |
_Bnu | Ah yeah, isn't your CHS stuff like hard coded or something? | 23:18 |
_Bnu | I changed it around quite a bit for PiSCSI, also added proper support for SCSI_READ10 and TD_GETGEOMETRY and some other stuff. | 23:18 |
_Bnu | You kind of need TD64 support for large disks, or support for block sizes other than 512 bytes... SCSI_READ10 also works, but it's slower than TD64. | 23:19 |
_Bnu | And of course the TD64 commands are off in some 3.5/3.9 include file on the Amiga Developer CD. | 23:21 |
- RobDangerous (QUIT: Ping timeout: 240 seconds) (~Thunderbi@p200300ec8f3e1c00e588fff41585aac2.dip0.t-ipconnect.de) | 23:29 | |
+ RobDangerous (~Thunderbi@p200300ec8f3e1c00e588fff41585aac2.dip0.t-ipconnect.de) | 23:30 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!