From 94f5b9d1413dab9f481e7da22ff7f4f34538e157 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 11 Dec 2020 21:49:50 -0500 Subject: [PATCH] doc: add notes about cross-compiling directly to EEPROM I've tested that it works in emulation. The only test left is the real deal my a Sega Master System. --- doc/selfhost.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/selfhost.txt b/doc/selfhost.txt index 4106fb4..c2f6869 100644 --- a/doc/selfhost.txt +++ b/doc/selfhost.txt @@ -64,6 +64,26 @@ operation in an inconsistent state. The easiest thing to do it to restart the operation from scratch. Those error are not frequent unless hardware is faulty. +# Cross-compiling directly to EEPROM + +If your target media is a RAM mappable media, you can save prec- +ious RAM by cross-compiling Collapse OS directly to it. It req- +uires special handling. + +You can begin the process in a regular manner, but right before +you're about to assemble the boot code, take a pause. + +Up until now, you've been loading your cross compiling tools in +RAM, now, you're about to write Collapse OS. So what you need +to do is change HERE to the address of your EEPROM. Example: + +0x2000 HERE ! + +If you need to activate special system overrides such as the +one described in doc/hw/at28.txt, now is the time. + +Then, you can continue the process normally. + # Verifying You can use "/tools/memdump" to dump the memory between your @@ -76,4 +96,3 @@ back to after your ending offset so that you don't overwrite your binary. Then, you can run "/tools/memdump". -