Changes

Jump to: navigation, search

Multiface II

15 bytes removed, 18:57, 29 April 2013
markup cleanup
Any CPC program can find out what’s in memory at the moment. It’s the PEEK command in BASIC, and the very foundation of machine code. You, too, can save the contents of memory to disc just with the following line:
OPENOUT "filename" : FOR n=0 TO 65535 : PRINT#9,CHR$(PEEK(n)); : NEXT : CLOSEOUT
Needless to say, the Multiface did just that (except written in machine code). If I could get £40 for that one line of program, I’d be smiling.
As said above, the multiface watches the bus for writes to I/O ports, and memorizes the written values (required since most of the Gate Array and CRTC ports are write-only). Reading the memorized values is probably done via these I/O ports:
* #FEE8 Multiface II - Enable Multiface II ROM/RAM (W) * #FEEA Multiface II - Disable Multiface II ROM/RAM (W)
Writing any value to these I/O ports enables/disables the 8K ROM and 8K RAM in the Multiface. When enabled, the ROM/RAM are mapped to following addresses,
* 0000h-1FFFh Multiface ROM (including [[NMI]] vector at 0066h) * 2000h-3FFFh Multiface RAM
with the internal ROM/RAM at 0000h-3FFFh in the CPC being disabled.
Once the machine was reset, you could save all the program to basic doing:<br>
OUT&nbsp;&amp;7fc4,&amp;c4: save "game-1",b,&amp;4000,&amp;3fff  OUT &amp;7fc5,&amp;c5: save "game-2",b,&amp;4000,&amp;3fff<br> OUT &amp;7fc6,&amp;c6: save "game-3",b,&amp;4000,&amp;3fff<br> OUT &amp;7fc7,&amp;c7: save "game-4",b,&amp;4000,&amp;3fff<br><br>
This trick was used to save heavily protected games to disk.<br>
1,006
edits