I know it’s not self-hosting, but I thought it deserved a shoutout.
And when you’re done laughing:
https://tasvideos.org/5384S
I know it’s not self-hosting, but I thought it deserved a shoutout.
And when you’re done laughing:
https://tasvideos.org/5384S
On old consoles, inputs are usually directly memory-mapped, so you can use them as fast as the cpu can read them. If inputs are crammed into bytes (which is also usual), you can probably create one custom byte per cpu operation via controller inputs, and copy it into ram for example.
If there are say 4 controllers, sitting next to each other, you can probably use an instruction that copies a 32 bit value, and copy 4 bytes to ram. If that copy takes 3 cycles (and the cpu has no fancy modern prediction), that would be 11 MB/s or 90mbit/s, modern lower-midrange internet speeds.
notyetEdit:
https://bgb.bircd.org/pandocs.htm#joypadinput
This info here seems to state we can only read 4 of the 8 buttons of gameboy controllers at a time, not 8. Also we might have to poll them and wait. Assuming the waiting is only for physical button debouncing reasons and not needed when you pump electric signals into a controller or mechanically operate it very rigidly, and assuming we can select one half and just keep reading, and taking the 4 controllers it mwntions in the text, that leaves 45mbit. The data might have to be densified after writing, or there might be instructions that can do it in-flight without soowing the operation.
actualEdit:
Plain GB only has 1 controller, and the cpu only has 4.194304 (later fancier GBs had a mode to double that). Having only 1 controller doesn’t really make it worse anyway, because the cpu is 8 bit with some limited 16 bit functionality. The insteuction to read from io memory and copy to ram, F2, takes 8 cycles. So I think that means we can do at most 2mbit/s, potentially less depending on how the assembly can be coded up. Definitely upper “the internet doesn’t work” speed territory.
Thank you! The day I can give somebody an answer on this level will be the day that I am content with life.