68k I/O Addresses:
0xA13001: write 3 before bank switch (unprotect?), write 1 after bank switch (re-protect?).
0xA13003: value in bank 5.
0xA13005: value in bank 6.
0xA13007: value in bank 7.

RAM routines:
FF0584: unknown, doesn't seem to be called anywhere.
FF1910: set $A13001 to specified value, some kind of protect/unprotect maybe?
FF1920: Swap specified page into specified bank.
FF4068: WriteMem routine.
FF4356: slightly more complicated, I think it looks for an empty block and writes data or something.
FF4486: ReadMem for 512 bytes at a time, I think.

To read X bytes from save memory:
	Write 0F to A13009.
	Write 07 to A13009.
	Write data byte 03.
	Write source location as data word.
	Read X data bytes.
	Write 05 to A13009.
	Write 0D to A13009.

To read one byte from save memory:
	The bits are read starting with the leftmost bit.
	For each bit:
		Write 04 to A13009.
		Write 06 to A13009.
		Read A1300B. The rightmost bit is the next bit.

To write 32 bytes to save memory:
	Write 0F to A13009.
	Write 07 to A13009.
	Write data byte 06.
	Write 05 to A13009.
	Write 0D to A13009.
	Write 05 to A13009.
	Write data byte 02.
	Write destination location as data word.
	Write 32 data bytes.
	Write 05 to A13009.
	Write 0D to A13009.
	Write 0F to A13009.
	Write data byte 05.
	Keep reading data bytes until 00 is received.
	Write 05 to A13009.
	Write 0D to A13009.

To write one byte to save memory:
	Start with the leftmost bit.
	For each bit:
		If 1, write 05 and 07 to A13009.
		If 0, write 04 and 06 to A13009.
To write one word to save memory:
	Same as above, except send 16 bits instead of 8.

For emulation:
	Keep track of a 64KB save data array.
	Keep track of an internal pointer to the save memory.
	Keep track of a mode byte.
	Keep track of bits returned.
	Keep track of bits received.
	Keep track of mode bits to receive.
	Keep track of location bits to receive.

When A1300B is being read:
	If mode is 03, return bit 0 of current byte. Increment number of bits returned. If bits returned is 8, reset to 0, increment pointer, and fetch new byte.
	Otherwise, return a 0 bit.

When A13009 is being written:
	Shift the byte into a command word:
	Case 0F07, 0D05, 0D0F:
		We have started a request. Set number of mode bits to receive to 8.
	Case 050D:
		We have ended a request. Set the mode to 00.
	Case 0406:
		We are either returning a data byte or receiving a 0 bit.
		If mode bits to receive is > 0, receive it and decrement. If count is now zero and mode is 02 or 03, set location bits to receive to 16.
		If location bits to receive is > 0, receive it and decrement.
		If mode is 03, we are returning data bytes. If bits returned is 0, fetch current byte, otherwise shift current byte.
		Otherwise receive 0 bit to save memory. If bits received is 0, set current byte to 0. Increment bits received.
			If bits received is 8, reset to 0, save byte, increment pointer.
	Case 0507:
		We are receiving a 1 bit.
		If mode bits to receive is > 0, receive it and decrement. If count is now zero and mode is 02 or 03, set location bits to receive to 16.
		If location bits to receive is > 0, receive it and decrement.
		Otherwise receive 1 bit to save memory. If bits received is 0, set current byte to 0.
			Shift bit to appropriate position (bits received times), OR with current byte, increment bits received.
			If bits received is 8, reset to 0, save byte, increment pointer.
