|
Post by cdoty on Aug 31, 2006 9:54:19 GMT -5
Is it possible to disable the cartridge rom? I am using the magic desk cartridge. It support banking, but doesn't appears to have the option to disable the cartridge.
I have pucrunched an old demo, and put it on a cartridge. On bootup I restore the file to it's normal location (2061 without the basic header). The file is then decompressed and ran. The problem I'm having is that the file ends up using memory in the cartridge region. Can I disable the cartridge to allow access to the ram (my transfer routine is transferred to and runs from $033C, so that's not an issue).
|
|
|
Post by tlr on Aug 31, 2006 11:09:39 GMT -5
LDA #$36 STA $01
Kills Basic and any attached $8000-$A000 cartridge. I think it kills a $A000-$C000 cartridge too, but I'm not sure.
LDA #$35 will kill Kernal aswell, but be sure to handle your own interrupts if you do it.
|
|
|
Post by cdoty on Aug 31, 2006 18:45:16 GMT -5
Does this only work on cartridges that have banks at $8000 and $A000? The Prog. Ref. guide says this affects $A000-$BFFF, $D000-$DFFF, and $E000-$FFFF.
|
|
|
Post by tlr on Sept 1, 2006 6:00:27 GMT -5
Does this only work on cartridges that have banks at $8000 and $A000? The Prog. Ref. guide says this affects $A000-$BFFF, $D000-$DFFF, and $E000-$FFFF. $E000-$FFFF cartridges are in the special Ultimax mode. This does not have access to the full memory of the c64, and is nowadays primarily used in freezers during the freeze process. $37, $36 and $35 will not affect $D000-$DFFF, and I don't think the prog ref guide says that either. $34 will switch in all 64Kb of RAM. (=cartridge + $A000-$C000, $D000-$E000, $E000-$0000) $33 will switch in the character ROM at $D000-$DFFF without switching out BASIC or KERNAL. In this mode writes will go to the underlying RAM which is very useful if you need to write all 64Kb of memory for ROM based code.
|
|
|
Post by cdoty on Sept 1, 2006 6:55:23 GMT -5
The writes are going to RAM, but data read is coming from the cartridge, regardless of the value set in $1.
|
|
|
Post by tlr on Sept 1, 2006 8:04:58 GMT -5
The writes are going to RAM, but data read is coming from the cartridge, regardless of the value set in $1. I don't believe you. Anyway, I googled, and it turns out it has a disable feature. Your cartridge is mapped from $8000-$A000. If it is a Magic Desk, it has 4 banks of 8Kb, selected by writing $00-$03 -> $DE00. $80 -> $DE00 will disable the cartridge. Also: $36 -> $01 will disable the cartridge and basic. $35 -> $01 will disable the cartridge, basic and kernal. Quote from a document about the .CRT cartridge format for emulators: 19. Magic Desk, Domark, HES Australia
Size - 32Kb, 64Kb or 128Kb sizes (4 to 16 banks of 8Kb each) GAME - inactive (0) EXROM - active (1) Load address (banks 00-15) - $8000-9FFF
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ASCII ----------------------------------------------- ---------------- 0000: 43 36 34 20 43 41 52 54 52 49 44 47 45 20 20 20 C64úCARTRIDGEúúú 0010: 00 00 00 40 01 00 00 13 00 01 00 00 00 00 00 00 úúú@úúúúúúúúúúúú 0020: 4D 61 67 69 63 20 44 65 73 6B 00 00 00 00 00 00 MagicúDeskúúúúúú 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 úúúúúúúúúúúúúúúú 0040: 43 48 49 50 00 00 20 10 00 00 00 00 80 00 20 00 CHIPúúúúúúúú€úúú 0050: 09 80 C6 CA C3 C2 CD 38 30 8E 16 D0 20 A3 FD 20 ú€ÆÊÃÂÍ80ŽúÐú£ýú .. 2050: 43 48 49 50 00 00 20 10 00 00 00 01 80 00 20 00 CHIPúúúúúúúú€úúú 2060: 00 3F 0A 01 00 86 4E 24 28 31 30 29 3A 4A 4F 59 ú?úúú†N$(10):JOY .. 4060: 43 48 49 50 00 00 20 10 00 00 00 02 80 00 20 00 CHIPúúúúúúúú€úúú 4070: 00 8B C9 28 4E 24 2C 31 29 B3 B1 22 FF 22 A7 32 ú‹É(N$,1)³±"ú"§2 .. 6070: 43 48 49 50 00 00 20 10 00 00 00 03 80 00 20 00 CHIPúúúúúúúú€úúú 6080: AE 01 83 33 2C 37 2C 22 32 29 20 44 45 4C 20 4B ®úƒ3,7,"2)úDELúK
This cartridge type is very similar to the OCEAN cart type: ROM memory is organized in 8Kb ($2000) banks located at $8000-$9FFF. Bank switching is done by writing the bank number to $DE00. Deviant from the Ocean type, bit 8 is cleared for selecting one of the ROM banks. If bit 8 is set ($DE00 = $80), the GAME/EXROM lines are disabled, turning on RAM at $8000-$9FFF instead of ROM.
In the cartridge header, EXROM ($18) is set to 0, GAME ($19) is set to 1 to indicate the RESET/power-up configuration of 8 kB ROM.
Here is a list of the known cartridges:
Ghosbusters (HES Australia) (32 kB) Magic Desk (Commodore) (32 kB) Badlands (Domark) (64 kB) Vindicators (Domark) (64 kB) Wonderboy (HES Australia) (64 kB) Cyberball (Domark) (128 kB)
|
|
|
Post by cdoty on Sept 1, 2006 9:33:57 GMT -5
Setting $DE00 to $80 works. Thanks!
I wonder if there should be a delay on setting $DE00 and accessing memory, or is the C-64 slow enough that it's not a problem?
I looked at the cartridge dumper for the Magic Desk, and it doesn't use any delay.
|
|
|
Post by tlr on Sept 1, 2006 11:41:36 GMT -5
I don't think you will need a delay.
|
|