nuclear@4: Amiga floppy boot test nuclear@4: ---------------------- nuclear@4: Bootblock code in src/boot/boot.s uses the Amiga exec in ROM to load the nuclear@4: flat binary image from from the first N sectors to address 0x10000, and jumps nuclear@4: there. The size of the binary is patched immediately before the first nuclear@4: instruction of the boot code by tools/mk_adf.py. nuclear@4: nuclear@4: Linkscript puts code from the .startup segment (src/startup.s) at the load nuclear@4: address, and it starts by setting the trap0 exception vector to point to the nuclear@4: next instruction and executes a trap 0, to enter supervisor mode and take nuclear@4: complete control of the system. Then it clears .bss, sets the stack and calls nuclear@4: the C main function. nuclear@4: nuclear@4: A few words about the graphics hack nuclear@4: ----------------------------------- nuclear@4: The IFS fractal is calculated in 16.16 fixed point, using a mersenne twister nuclear@4: random number generator (src/rng.c) for picking an IFS transformation to do each nuclear@4: time. Two bitplanes are enabled both pointing to the same IFS pixel buffer, with nuclear@4: a few scanlines offset and a different per-pixel scroll (data fetch delay) in nuclear@4: BPLCON1. The palette is set up in a way to give priority to bitplane 0, i.e. use nuclear@4: green for pixels with bit 0 set, and use a shadow color for pixels which have nuclear@4: only bit 1 set. This gives the illusion of a shadow layer. nuclear@4: nuclear@4: Serial debug output nuclear@4: ------------------- nuclear@4: Serial comm needs RTS/CTS (hardware) flow control. nuclear@4: stty 38400 crtscts cs8 -parenb -ixon -ixoff raw -iutf8 -F /dev/ttyUSB0