diff --git a/docs/changelog.txt b/docs/changelog.txt index ce9f7d2..c722f5d 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,17 @@ MSX Diagnostics Changelog -------------------------------------------------------------------------------- +2020-04-24 Ver. 1.1.6 +-------------------------------------------------------------------------------- +- Detección completa e indicación de la ubicación correcta en la pantalla + de información del sistema de toda la memoria RAM, (por el momento, sin el + uso de mappers), instalada en el ordenador. La detección tiene una precisión + de segmentos de 4kb. +- Se corrige el bug que causaba que si se cargaba el programa desde una unidad + de disco, esta siguiera encendida incluso después de iniciar el programa. + Este parche se ha aplicado a la librería base MSX N'gine. + + 2020-04-19 Ver. 1.1.5 -------------------------------------------------------------------------------- - Se ahorran 64 bytes de RAM usando el NGN_RAM_BUFFER en vez del array diff --git a/source/data/bin/misc.asm b/source/data/bin/misc.asm index 7110441..87fbe04 100644 --- a/source/data/bin/misc.asm +++ b/source/data/bin/misc.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Datos miscelaneos ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/data/txt/key_names.asm b/source/data/txt/key_names.asm index 018034c..2e4383d 100644 --- a/source/data/txt/key_names.asm +++ b/source/data/txt/key_names.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Nombres de las teclas ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/data/txt/text.asm b/source/data/txt/text.asm index 67ebc25..c94bac9 100644 --- a/source/data/txt/text.asm +++ b/source/data/txt/text.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Textos del programa ; (cc) 2018-2020 Cesar Rincon "NightFox" @@ -30,7 +30,7 @@ TEXT_DASHED_LINE: ; Texto de cabecera de los menus TEXT_MENU_HEADER: - db " MSX DIAGNOSTICS v1.1.4", $0D, $0A, $00 + db " MSX DIAGNOSTICS v1.1.6", $0D, $0A, $00 diff --git a/source/formats/f_binary.asm b/source/formats/f_binary.asm index 8923ea0..76e7289 100644 --- a/source/formats/f_binary.asm +++ b/source/formats/f_binary.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Directivas de compilacion para BINARIO de 32kb ; @@ -31,7 +31,7 @@ OUTPUT_FORMAT = 1 ; Define el formato de salida ; Almacena las variables los ultimos 4KB .ORG $E380 .INCLUDE "ngn/ngn_vars.asm" ; 2285 bytes -.INCLUDE "prog/vars.asm" ; 110 bytes +.INCLUDE "prog/vars.asm" ; 26 bytes ; ---------------------------------------------------------- diff --git a/source/formats/f_cas.asm b/source/formats/f_cas.asm index f593cf6..5c1f251 100644 --- a/source/formats/f_cas.asm +++ b/source/formats/f_cas.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Directivas de compilacion para BINARIO de 32kb ; Genera un archivo .CAS y .WAV @@ -31,7 +31,7 @@ OUTPUT_FORMAT = 4 ; Define el formato de salida ; Almacena las variables los ultimos 4KB .ORG $E380 .INCLUDE "ngn/ngn_vars.asm" ; 2285 bytes -.INCLUDE "prog/vars.asm" ; 110 bytes +.INCLUDE "prog/vars.asm" ; 26 bytes ; ---------------------------------------------------------- diff --git a/source/formats/f_com.asm b/source/formats/f_com.asm index 6f6b6b6..de3bfa8 100644 --- a/source/formats/f_com.asm +++ b/source/formats/f_com.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Directivas de compilacion para .COM de MSX-DOS ; @@ -31,7 +31,7 @@ OUTPUT_FORMAT = 3 ; Define el formato de salida ; Almacena las variables los ultimos 4KB .ORG $E380 .INCLUDE "ngn/ngn_vars.asm" ; 2285 bytes -.INCLUDE "prog/vars.asm" ; 110 bytes +.INCLUDE "prog/vars.asm" ; 26 bytes ; ---------------------------------------------------------- diff --git a/source/formats/f_rom.asm b/source/formats/f_rom.asm index 57e2bde..8880ce6 100644 --- a/source/formats/f_rom.asm +++ b/source/formats/f_rom.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Directivas de compilacion para ROM de 32kb ; @@ -31,7 +31,7 @@ OUTPUT_FORMAT = 2 ; Define el formato de salida ; Almacena las variables los ultimos 4KB .ORG $E380 .INCLUDE "ngn/ngn_vars.asm" ; 2285 bytes -.INCLUDE "prog/vars.asm" ; 110 bytes +.INCLUDE "prog/vars.asm" ; 26 bytes ; ---------------------------------------------------------- diff --git a/source/msxdiag.asm b/source/msxdiag.asm index 09934b7..da41e7c 100644 --- a/source/msxdiag.asm +++ b/source/msxdiag.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; ; (cc) 2018-2020 Cesar Rincon "NightFox" @@ -37,7 +37,7 @@ OUTPUT_FORMAT_COM = 3 ; Formato de salida COM para MSX-DOS OUTPUT_FORMAT_CAS = 4 ; Formato de salida binario de BASIC (Salida en formato .CAS y .WAV) ;.INCLUDE "formats/f_binary.asm" ; Binario de BASIC -INCLUDE "formats/f_rom.asm" ; Cartucho ROM +.INCLUDE "formats/f_rom.asm" ; Cartucho ROM ;.INCLUDE "formats/f_com.asm" ; Binario en formato .COM para MSX-DOS ;.INCLUDE "formats/f_cas.asm" ; Imagen .CAS y archivo de audio .WAV diff --git a/source/ngn/ngn.asm b/source/ngn/ngn.asm index 28ab74e..c2d6c77 100644 --- a/source/ngn/ngn.asm +++ b/source/ngn/ngn.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_background.asm b/source/ngn/ngn_background.asm index 93aa4a6..bdb3bb1 100644 --- a/source/ngn/ngn_background.asm +++ b/source/ngn/ngn_background.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_consts.asm b/source/ngn/ngn_consts.asm index 3f0ace6..b1d1149 100644 --- a/source/ngn/ngn_consts.asm +++ b/source/ngn/ngn_consts.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_keyboard.asm b/source/ngn/ngn_keyboard.asm index ad0e527..b0fd5e7 100644 --- a/source/ngn/ngn_keyboard.asm +++ b/source/ngn/ngn_keyboard.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_math.asm b/source/ngn/ngn_math.asm index c8128e6..ebe2032 100644 --- a/source/ngn/ngn_math.asm +++ b/source/ngn/ngn_math.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_psg.asm b/source/ngn/ngn_psg.asm index 57adcbf..26a9415 100644 --- a/source/ngn/ngn_psg.asm +++ b/source/ngn/ngn_psg.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_rle.asm b/source/ngn/ngn_rle.asm index b280a23..c375faf 100644 --- a/source/ngn/ngn_rle.asm +++ b/source/ngn/ngn_rle.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_screen.asm b/source/ngn/ngn_screen.asm index 82c560c..b4474dc 100644 --- a/source/ngn/ngn_screen.asm +++ b/source/ngn/ngn_screen.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_sprite.asm b/source/ngn/ngn_sprite.asm index 1dc9c3f..fd05ff8 100644 --- a/source/ngn/ngn_sprite.asm +++ b/source/ngn/ngn_sprite.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_start.asm b/source/ngn/ngn_start.asm index a2f319f..3143cb9 100644 --- a/source/ngn/ngn_start.asm +++ b/source/ngn/ngn_start.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com @@ -20,6 +20,9 @@ NGN_START: + ; Espera a que se limpien las interrupciones iniciales + call NGN_WAIT_FOR_START_UP_INTERRUPTS + ; Habilita el parche de las interrupciones call NGN_SYSTEM_FD9A_PATCH_ON diff --git a/source/ngn/ngn_system.asm b/source/ngn/ngn_system.asm index ce61496..01a877c 100644 --- a/source/ngn/ngn_system.asm +++ b/source/ngn/ngn_system.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com @@ -12,6 +12,30 @@ +; ---------------------------------------------------------- +; NGN_WAIT_FOR_START_UP_INTERRUPTS: +; Espera a que se resuelvan todas las interrupciones +; antes de iniciar la libreria +; ---------------------------------------------------------- + +NGN_WAIT_FOR_START_UP_INTERRUPTS: + + ld b, 120 ; Espera las siguientes 120 interrupciones (2 segundos?) + @@LOOP: ; Esto evita que la unidad de disco siga girando + ei ; Despues de iniciar el programa + nop + nop + halt + nop + nop + djnz @@LOOP + + ; Sal de la rutina + ret + + + + ; ---------------------------------------------------------- ; NGN_SYSTEM_FD9A_PATCH_ON ; NGN_SYSTEM_FD9A_PATCH_OFF diff --git a/source/ngn/ngn_text.asm b/source/ngn/ngn_text.asm index 8c4fbf0..a12f90d 100644 --- a/source/ngn/ngn_text.asm +++ b/source/ngn/ngn_text.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com diff --git a/source/ngn/ngn_vars.asm b/source/ngn/ngn_vars.asm index 2c624cc..c05f188 100644 --- a/source/ngn/ngn_vars.asm +++ b/source/ngn/ngn_vars.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; N'gine para MSX Asm Z80 -; Version 0.3.1 +; Version 0.3.2 ; ; (cc) 2018-2020 Cesar Rincon "NightFox" ; https://nightfoxandco.com @@ -204,13 +204,21 @@ NGN_SCREEN_MODE: ds 1 ; Modo de pantalla actual ; ----------------------------------------------------------------------- ; Descompresion RLE -; Total: 2054 +; Total: 6 ; ----------------------------------------------------------------------- ; Gestion de la descompresion RLE NGN_RLE_NORMAL_SIZE: ds 2 NGN_RLE_COMPRESSED_SIZE: ds 2 NGN_RLE_POINTER: ds 2 + + + +; ----------------------------------------------------------------------- +; Memory Pool +; Total: 2048 +; ----------------------------------------------------------------------- + ; Buffer de RAM NGN_RAM_BUFFER: ds 2048 diff --git a/source/prog/consts.asm b/source/prog/consts.asm index 0419c6c..f44b7d2 100644 --- a/source/prog/consts.asm +++ b/source/prog/consts.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Definicion de constantes ; (cc) 2018-2020 Cesar Rincon "NightFox" @@ -35,13 +35,6 @@ MEMORY_SLOT_ID .EQU $82 ; ID de slot en formato (ExxxSSPP) ; bit 4-6 = Unused ; bit 7 = 1 if Slot is Expanded -MEMORY_SLOT_BACKUP .EQU $83 ; Backup de la configuracion del slot 1 byte ($A8) -MEMORY_SUBSLOT_BACKUP .EQU $84 ; Backup de la configuracion del sub-slot 1 byte ($FFFF) - -MEMORY_SLOT_LAYOUT .EQU $85 ; Layout de cada (sub)slot (byte) 4 bytes x4 - ; $00 Vacio - ; $01 ROM - ; $02 RAM diff --git a/source/prog/joystick_test.asm b/source/prog/joystick_test.asm index 582a695..3400350 100644 --- a/source/prog/joystick_test.asm +++ b/source/prog/joystick_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test de los Joysticks ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/keyboard_test.asm b/source/prog/keyboard_test.asm index 5187de6..07200dd 100644 --- a/source/prog/keyboard_test.asm +++ b/source/prog/keyboard_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test del teclado ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/main.asm b/source/prog/main.asm index 0b9ea05..7a1d78f 100644 --- a/source/prog/main.asm +++ b/source/prog/main.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Archivo principal ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/main_menu_common.asm b/source/prog/main_menu_common.asm index 9a209af..f1c3cb0 100644 --- a/source/prog/main_menu_common.asm +++ b/source/prog/main_menu_common.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Menu Principal (Funciones comunes) ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/main_menu_p1.asm b/source/prog/main_menu_p1.asm index 62db696..0275b60 100644 --- a/source/prog/main_menu_p1.asm +++ b/source/prog/main_menu_p1.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Menu Principal (Pagina 1) ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/main_menu_p2.asm b/source/prog/main_menu_p2.asm index 660b944..2a0f393 100644 --- a/source/prog/main_menu_p2.asm +++ b/source/prog/main_menu_p2.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Menu Principal (Pagina 2) ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/memory_routines.asm b/source/prog/memory_routines.asm index 95a86f9..43b372b 100644 --- a/source/prog/memory_routines.asm +++ b/source/prog/memory_routines.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Rutinas del VDP ; (cc) 2018-2020 Cesar Rincon "NightFox" @@ -178,7 +178,7 @@ FUNCION_MEMORY_GET_RAM_PAGES012_NO_MAPPER: ld hl, $0000 ; Direccion inicial de la pagina ld [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)], hl - ld b, 3 ; Paginas del 0 al 3 + ld b, $0C ; Paginas del 0 al 3 en pasos de 4kb (12 X 4) @@CHECK_PAGES_LOOP: @@ -215,8 +215,8 @@ FUNCION_MEMORY_GET_RAM_PAGES012_NO_MAPPER: ld hl, [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)] ; Direccion de la pagina call $0014 ; Escribe un byte (E) en el slot con la ID en A en la direccion HL (WRSLT) - ; Paso 5, Suma 16kb de esta pagina - call FUNCTION_MEMORY_COUNTER_ADD_16KB + ; Paso 5, Suma 4kb de esta pagina + call FUNCTION_MEMORY_COUNTER_ADD_4KB @@NOT_RAM: @@ -225,7 +225,7 @@ FUNCION_MEMORY_GET_RAM_PAGES012_NO_MAPPER: pop bc ; Restaura el contador del bucle ld hl, [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)] - ld de, $4000 ; Siguiente pagina + ld de, $1000 ; Siguiente pagina add hl, de ld [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)], hl @@ -243,21 +243,125 @@ FUNCION_MEMORY_GET_RAM_PAGES012_NO_MAPPER: FUNCION_MEMORY_GET_RAM_PAGE3_NO_MAPPER: - ; Fin de la funcion + ; Informa de la direccion inicial de memoria del test + ld hl, $C000 ; Direccion inicial de la pagina + ld [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)], hl + + ld b, 4 ; 4 segmentos de 4kb + @@CHECK_CHUNKS_LOOP: + + ; Preserva los registros del contador + push bc + push hl + + ; Copia de seguridad en BC de la configuracion de slots + di ; Desconecta las interrupciones + in a, [$A8] ; Configuracion de slots + ld b, a ; Y guardalo en B + ld a, [$FFFF] ; Configuracion de subslots + cpl ; Complementalo + ld c, a ; Y guardalo en C + exx ; Manda el set de registros a la sombra, trabaja con los alternativos + + ; Seleccion de la direccion de memoria a analizar + ld hl, [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)] + + ; Seleccion de slots + ld a, [(NGN_RAM_BUFFER + MEMORY_SLOT_ID)] + rrca + rrca + and $C0 + ld b, a ; Configuracion deseada de slot en B + + ; Esta expandido? + ld a, [(NGN_RAM_BUFFER + MEMORY_SLOT_ID)] + bit 7, a + jr z, @@NOT_EXPANDED + + ; Esta expandido + sla a ; Coloca los bits de sub-slot en los bits 6 y 7 (<< 4) + sla a + sla a + sla a + and $C0 ; Bitmask de esos bits + ld c, a ; Guardalo en C + in a, [$A8] ; Lee la configuracion de slots actual + and $3F ; Guarda la configuracion de las paginas 0 a 2 + or b ; Añade la configuracion de la pagina 3 de slots + out [$A8], a ; Selecciona esa configuracion de slots + ld a, [$FFFF] ; Lee la configuracion de sub-slots + cpl ; Complementala + and $3F ; Guarda la configuracion de las pagina 0 a 2 + or c ; Añade la configuracion de la pagina 3 de sub-slots + ld [$FFFF], a ; Aplica la configuracion de sub-slots + jr @@TEST_IF_RAM + + ; No esta expandido + @@NOT_EXPANDED: + in a, [$A8] ; Lee la configuracion de slots actual + and $3F ; Guarda la configuracion de las paginas 0 a 2 + or b ; Añade la configuracion de la pagina 3 de slots + out [$A8], a ; Selecciona esa configuracion de slots + + ; Verifica si el primer byte de la pagina es RAM + @@TEST_IF_RAM: + ld a, [hl] ; Lee un byte + ld b, a ; Guardalo el valor leido en B + cpl ; Saca el complementario (invierte todos los bits) + ld c, a ; Guarda el complementario en C + ld [hl], a ; Vuelve a escribirlo + ld a, [hl] ; Y leelo nuevamente + cp c ; Comparalo con el valor que acabas de escribir + jr nz, @@NOT_RAM ; Si no coincide, no es RAM + ld a, b ; Y restaura el valor original del byte + ld [hl], a + ld a, $FF ; Indica que es RAM + jr @@RESTORE_SLOTS_CONFIG + + @@NOT_RAM: + ld a, $00 ; Indica que no es RAM + + @@RESTORE_SLOTS_CONFIG: + exx ; Recupera el set de registros de la sombra, trabaja con los normales + ld e, a ; Guarda si es RAM ($FF) en E + ld a, b ; Restaura la configuracion de slots + out [$A8], a + ld a, c ; Y la configuracion de subslots + ld [$FFFF], a + + ei ; Habilita las interrupciones + ld a, $FF ; Era RAM? + cp e + jr nz, @@LOOP_ENDS + call FUNCTION_MEMORY_COUNTER_ADD_4KB ; Si era RAM, marcalo + + ; Fin de la funcion + @@LOOP_ENDS: + + pop hl ; Recupera los registros del contador + pop bc + + ld de, $1000 ; Siguiente segmento de memoria + add hl, de + ld [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)], hl + + djnz @@CHECK_CHUNKS_LOOP ; Fin del bucle + + ; Sal de la funcion ret ; ---------------------------------------------------------- -; Funcion para sumas 16kb al contador de RAM +; Funcion para sumas 4kb al contador de RAM ; ---------------------------------------------------------- -FUNCTION_MEMORY_COUNTER_ADD_16KB: +FUNCTION_MEMORY_COUNTER_ADD_4KB: ; Sumando ld hl, NGN_RAM_BUFFER - ld [hl], $16 + ld [hl], $04 inc hl ld [hl], $00 inc hl @@ -279,22 +383,25 @@ FUNCTION_MEMORY_COUNTER_ADD_16KB: FUNCTION_MEMORY_MARK_RAM_BANK: + ; Lee la direccion actual + ld hl, [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)] ; Marca el BIT de la pagina actual en C - ld d, 0 - ld hl, [(NGN_RAM_BUFFER + MEMORY_PAGE_ADDR)] ; Direccion de pagina actual - ld a, h ; Guarda el HI-byte - and $F0 ; Bitmask - ld d, a ; D = Valor a comparar ($00, $40, $80, $C0) - ld bc, $0401 ; B = Repeticiones, C = BIT (Resultado) - xor a - @@SET_BITS: - cp d ; Si el resultado coincide, sal del bucle - jr z, @@BITS_SET - add a, $40 ; Siguiente pagina - sla c ; Siguiente bit + ; Calcula el numero de pagina + ld a, h + ld b, 6 + @@GET_PAGE_NUMBER: + srl a ; >> 1 + djnz @@GET_PAGE_NUMBER + ld b, a ; Guarda el resultado en B (numero de pagina) + ld c, 1 ; Marca de la pagina 0 (bit 0) por defecto en C + or a + jr z, @@BITS_SET ; Si es la pagina 0, salta esta parte + + @@SET_BITS: ; Desplaza tantos bits como numero de paginas + sla c ; Siguiente bit << 1 djnz @@SET_BITS - @@BITS_SET: ; C = RESULTADO + @@BITS_SET: ; C = RESULTADO ; Busca la variable que guarda el slot actual ld hl, RAM_SLOT_0 ; Calcula el offset segun el slot @@ -333,13 +440,6 @@ FUNCTION_MEMORY_MARK_RAM_BANK: - - - - - - - ;*********************************************************** ; Fin del archivo ;*********************************************************** diff --git a/source/prog/monitor_color_test.asm b/source/prog/monitor_color_test.asm index 7ad8372..5f71719 100644 --- a/source/prog/monitor_color_test.asm +++ b/source/prog/monitor_color_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test de color del monitor ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/psg_test.asm b/source/prog/psg_test.asm index 2072f24..989b2e8 100644 --- a/source/prog/psg_test.asm +++ b/source/prog/psg_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test PSG ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/screen0_test.asm b/source/prog/screen0_test.asm index 8880dd5..7daa021 100644 --- a/source/prog/screen0_test.asm +++ b/source/prog/screen0_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test SCREEN 0 ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/screen1_test.asm b/source/prog/screen1_test.asm index bbb074b..cd3efbf 100644 --- a/source/prog/screen1_test.asm +++ b/source/prog/screen1_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test SCREEN 1 ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/screen2_test.asm b/source/prog/screen2_test.asm index 4fc1a56..eff6f34 100644 --- a/source/prog/screen2_test.asm +++ b/source/prog/screen2_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test SCREEN 2 ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/screen3_test.asm b/source/prog/screen3_test.asm index 364edc5..0ee450e 100644 --- a/source/prog/screen3_test.asm +++ b/source/prog/screen3_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test SCREEN 3 ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/sfx.asm b/source/prog/sfx.asm index d5d976e..0d7f05e 100644 --- a/source/prog/sfx.asm +++ b/source/prog/sfx.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Funciones de efectos de sonido ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/sprites_test.asm b/source/prog/sprites_test.asm index 867535c..0464d45 100644 --- a/source/prog/sprites_test.asm +++ b/source/prog/sprites_test.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Test de los Sprites (MODO SCREEN 2) ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/system.asm b/source/prog/system.asm index 9165075..05aed40 100644 --- a/source/prog/system.asm +++ b/source/prog/system.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Funciones comunes del sistema ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/system_info.asm b/source/prog/system_info.asm index 4606b9a..d61e64b 100644 --- a/source/prog/system_info.asm +++ b/source/prog/system_info.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Informacion del sistema ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/vars.asm b/source/prog/vars.asm index 8bdd109..d705c1e 100644 --- a/source/prog/vars.asm +++ b/source/prog/vars.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Declaracion de variables ; (cc) 2018-2020 Cesar Rincon "NightFox" @@ -14,7 +14,7 @@ ; -------------------------------------------------------------- ; Declara las variables del sistema [VARIABLE] [BYTES] -; TOTAL 14 bytes +; TOTAL 26 bytes ; -------------------------------------------------------------- diff --git a/source/prog/vdp_routines.asm b/source/prog/vdp_routines.asm index 5d57e0e..ced4789 100644 --- a/source/prog/vdp_routines.asm +++ b/source/prog/vdp_routines.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Rutinas del VDP ; (cc) 2018-2020 Cesar Rincon "NightFox" diff --git a/source/prog/welcome.asm b/source/prog/welcome.asm index bf9292f..b24052a 100644 --- a/source/prog/welcome.asm +++ b/source/prog/welcome.asm @@ -1,7 +1,7 @@ ;*********************************************************** ; ; MSX DIAGNOSTICS -; Version 1.1.5 +; Version 1.1.6 ; ASM Z80 MSX ; Archivo principal ; (cc) 2018-2020 Cesar Rincon "NightFox"