Estoy leyendo el modelo de programación del DivIDE, y este párrafo no sé exactamente cómo interpretarlo:
In automatic mapping, when MAPRAM is set, in location 0000h-1fffh appears
write-protected Bank No.3, instead of EEPROM/EPROM. The meaning-priority is
(from lowest to highest) EPROM jumper -> MAPRAM -> CONMEM. So because that
jumper is no more significant when MAPRAM or even CONMEM is set, it's used
to distinguish between fused or unfused EEPROM state for CONMEM mode.
So, when CONMEM is set, there is:
0000-1fffh - EEPROM/EPROM/NOTHING(if empty socket), and this area is
flash-writable if EPROM jumper is open.
2000-3fffh - 8k bank, selected by BANK 0..1 bits, always writable.
When MAPRAM is set, but CONMEM is zero, and entrypoint was reached:
0000-1fffh - Bank No.3, read-only
2000-3fffh - 8k bank, selected by BANK 0..1. If it's different from Bank No.3,
it's writable.
When MAPRAM is zero, CONMEM is zero, EPROM jumper is closed and entrypoint was
reached:
0000-1fffh - EEPROM/EPROM/NOTHING(if empty socket, so open jumper in this case),
read-only.
2000-3fffh - 8k bank, selected by BANK 0..1, always writable.
Otherwise, there's normal speccy memory layout. No modified ROM, no shit.
En concreto, esta parte:
So, when CONMEM is set, there is:
0000-1fffh - EEPROM/EPROM/NOTHING(if empty socket), and this area is
flash-writable if EPROM jumper is open.
2000-3fffh - 8k bank, selected by BANK 0..1 bits, always writable.
When MAPRAM is set, but CONMEM is zero, and entrypoint was reached:
0000-1fffh - Bank No.3, read-only
2000-3fffh - 8k bank, selected by BANK 0..1. If it's different from Bank No.3,
it's writable.
Entiendo que si CONMEN está a 1, en los primeros 8KB debe aparecer la EPROM, nunca la página 3 de RAM
Y que sólo si CONMEN es 0, y MAPRAM es 1, es cuando aparece la RAM 3 en los primeros 8KB, pero sólo en mapeado automático.
Dicho de otra forma: que si se fuerza al DivMMC a que se pagine (CONMEN=1), entonces da igual lo que valga MAPRAM. Siempre se ve la EEPROM en los primeros 8KB. Para que se vea la RAM 3 en ese espacio debe estar CONMEN a 0 (no se fuerza la paginación), y entonces sí que se tiene en cuenta el valor de MAPRAM, que debe valer 1.
¿Es así? Porque si es así, esta parte del test:
Código: Seleccionar todo
ld a,%01000000 ; MAPRAM
out ($E3),a ; page 3 at $0000 (read-only), page 0 at $2000
; set attribute to B&W
ld hl,$D800
ld a,7
ld (hl),a
ld de,$D801
ld bc,767
ldir
; copy to screen at $C000
ld hl,$0000
ld de,$C000
ld bc,6144
ldir
wait:
jr wait
No funcionará como se espera. En concreto, aquí sólo se está poniendo a 1 MAPRAM, pero para que se "vea" a la RAM 3 en el espacio de memoria de los primeros 8KB, debe haber una paginación automática.
Dicho de otra forma: esta línea de código:
Código: Seleccionar todo
ld a,%01000000 ; MAPRAM
out ($E3),a ; page 3 at $0000 (read-only), page 0 at $2000
Debería tener un comentario tal que así:
Código: Seleccionar todo
ld a,%01000000 ; MAPRAM
out ($E3),a ; page 3 at $0000 (read-only), page 0 at $2000 the next time automatic paging is triggered
Voy a ver si puedo probar el test con un DivIDE "pata negra" versión 57c y así salimos de dudas.