All done! See the GitHub page for burnable CDIs and the latest source.
https://github.com/Moopthehedgehog/dcload-ip
CDIs are in the "Releases" section of the GitHub repository. They are lightly padded (about 64MB of padding).
Update 12/10/2019:
On github now: https://github.com/Moopthehedgehog/dcload-ip
CDIs are in the "Releases" section of the GitHub repository.
Old post (attachment explanations are in here, though as of 12/10/2019 all attachments to this post are old. The perf counter timing thing is still not figured out completely, but I have a way to work around it until the true meaning behind it is understood):
Spoiler!
Alrighty, so here is what I have so far since it was requested that I post the current status. No, it is not quite ready yet for actual release, so consider it very alpha. I think it's more like beta now with the 12/2/2019 source.
Some notes:
- Everything from 1.0.5 should be there and still work as expected. (Ideally)
- The seconds countdown for the DHCP lease is not exactly 1 second. It's veeeerrrrrryyyy close, but I don't know what the actual frequency of the performance counters in elapsed time mode is. My "stopwatch" calculation shows somewhere around 2.4GHz, but as I mentioned here I have a hard time believing that's correct. No, it's off by like 11.96988, see later in this thread. Still trying to figure this out; it's the last thing.
- Resetting dcload with -r from DC-TOOL's command line interface causes the DHCP countdown display to stop working. I don't know why this is. It also happens after executing a command. I would like the DHCP countdown to persist. Fixed.
- There's just over 1.4kB free memory space left, shared with the stack. Try to keep it over 700 bytes, ideally over 1024 bytes, if adding anything new. I'm trying to make this 2kB by converting the command buffer into using the packet transmit buffer, but it's not working for some reason. Well, that was actually pretty silly. I fixed it. BSS has 2.4KB freed up now. Unfortunately it looks like there's a more significant constraint on the file size that I didn't realize was there. There's like 3.6kB left free now as of 12/2/2019. Space is no longer an issue.
- There appears to be an upper limit to the absolute filesize of dcload.bin. I don't know what it is; somewhere in the mid-20kBs? Needs more looking into. Linkerscript problems, as far as I can tell. I believe this is fixed now.
- The makefile and build options for dcload had to be modified, so there are some new options I've added there to help with future debugging and to make things just work better in general. All the .asm files are GCC's produced assembly for the .c files, and output.map is, well, a map of the dcload elf file (dcload.elf is just the extensionless dcload file that appears after running make).
- draw_progress() now outputs decimal digits instead of hexadecimal ones (lol), but nothing uses it in 1.0.5. It's there, nonetheless, and would take up about 144 bytes if it were used, so keep that in mind.
- Using the command string "PMCR" allows for complete control over the SH4's two 48-bit performance counters. I still don't know how to send this data, so I haven't been able to test it, but I've gone over the code several times and see no reason for it not to work. You'll get textual feedback if it's working right. Got it, see https://dcemulation.org/phpBB/viewtopic ... 0#p1057140 and https://dcemulation.org/phpBB/viewtopic ... 4#p1057114
- I just discovered right before posting this that I broke the DHCP countdown timer. The seconds are wrong. It was working earlier today... Oh no, they're not wrong. Not wrong at all. This is hilarious: my router decided to put my Dreamcast on probation because it was asking for the same IP too much, so it says my DC's lease expires "never" now, but everything else has an expiry time.
- Static IPs in Makefile.cfg should be written with leading zeros. I had to do this so that the second-most-common IP address range I've seen in the US (192.168.0.x) can work, in addition to many other IP address ranges that have zeros in them.
- Specifying 0.0.0.0 in Makefile.cfg activates DHCP mode!! (Well, it's really 0.x.x.x, since the whole 0.0.0.0/8 range is reserved for that purpose anyways). The ARP trick will still work, but you should really be using 169.254.x.x IP addresses for linking two machines together and doing that. 0.0.0.0/8 is mine now.
- If DHCP fails, the IP address will be shown as 0.0.0.0, and in this situation the "arp with IP of 0.0.0.0" trick will be necessary like "old times."
EDIT: Updated source attachment.
Another edit: So I'm wondering some more about these performance counters, and I found this: http://www2.lauterbach.com/pdf/debugger_user.pdf
So at least there's something that exists that uses them. However it very explicitly states to use the CPU clock frequency, which we know to be 200MHz, not the absurd 2.4GHz number I've had to use. I'm wondering if this isn't one of those things where like the bottom 16 bits are reserved and the "elapsed time" is only in the top 32 bits, and you divide that value by the clock frequency to get time in... milliseconds? seconds? Really not sure. Maybe an Lxdream dev knows? Might need to go track down that debugger software... -- found it, it's in the demo downloads for the SH supported processor cores: https://www.lauterbach.com/frames.html?home.html, but sadly that one screenshot in the pdf showing PMCTR1 and PMCTR2 is more helpful than the software itself...
Also, I believe I've fixed DHCP renewal. Updated the source attachment. Will be sure in about 20-25 minutes. -- Yep, it's fixed. I'll even put up a CDI image so you can see what it looks like so far!
Edit 12/2/2019: updated source, updated post. It's messy here, sorry.
12/3/2019: Newer source, see https://dcemulation.org/phpBB/viewtopic ... 0#p1057160
12/5/2019: updated source, QoL improvements. Also binaries are in the source package (and target-src/1st_read/1st_read.bin is scrambled).