Skip to content

Commit

Permalink
Ver. 1.1.9 (W.I.P 2020-05-10)
Browse files Browse the repository at this point in the history
- Reestructuración de la página 2 del menú.
- Añadida la opción para mostrar la configuración de la memoria RAM.
  • Loading branch information
knightfox75 committed May 10, 2020
1 parent df1c10f commit e9f050d
Show file tree
Hide file tree
Showing 33 changed files with 1,495 additions and 145 deletions.
2 changes: 1 addition & 1 deletion source/data/bin/misc.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
; Datos miscelaneos
; (cc) 2018-2020 Cesar Rincon "NightFox"
Expand Down
2 changes: 1 addition & 1 deletion source/data/txt/key_names.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
; Nombres de las teclas
; (cc) 2018-2020 Cesar Rincon "NightFox"
Expand Down
57 changes: 51 additions & 6 deletions source/data/txt/text.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
; Textos del programa
; (cc) 2018-2020 Cesar Rincon "NightFox"
Expand Down Expand Up @@ -30,7 +30,7 @@ TEXT_DASHED_LINE:
; Texto de cabecera de los menus
TEXT_MENU_HEADER:

db " MSX DIAGNOSTICS v1.1.8", $0D, $0A, $00
db " MSX DIAGNOSTICS v1.1.9", $0D, $0A, $00



Expand Down Expand Up @@ -87,10 +87,10 @@ TEXT_MAIN_MENU_P2_TITLE:

TEXT_MAIN_MENU_P2_ITEMS:
db $0D, $0A
db " 1. MONITOR COLOR", $0D, $0A
db " 2. MIXED MODE", $0D, $0A
db " 3. ", $C3, $0D, $0A
db " 4. ", $C3, $0D, $0A
db " 1. RAM LAYOUT", $0D, $0A
db " 2. RAM TEST [WIP]", $0D, $0A
db " 3. MONITOR COLOR", $0D, $0A
db " 4. MIXED MODE", $0D, $0A
db " 5. ", $C3, $0D, $0A
db " 6. ", $C3, $0D, $0A
db " 7. ", $C3, $0D, $0A
Expand Down Expand Up @@ -538,6 +538,51 @@ TEXT_MIXED_MODE_MESSAGE:



; Textos del test de memoria RAM
TEXT_RAM_INFO_HEADER:
db " RAM LAYOUT", $0D, $0A, $00

TEXT_RAM_TEST_HEADER:
db " SLOT PAGE 0 PAGE 1 PAGE 2 PAGE 3", $0D, $0A, $00

TEXT_RAM_TEST_SLOT_ID:
db " 0-0 ", $00 ; 7 bytes
; " 0-0 1111KB 1111KB 1111KB 1111KB"

TEXT_RAM_TEST_MAPPED:
db "MAPPED", $00

TEXT_RAM_TEST_PAGES:
db "PAGES", $00

TEXT_RAM_TEST_IN:
db " IN ", $00

TEXT_RAM_TEST_HELP:
db " SELECT A SLOT TO TEST AND PRESS", $0D, $0A
db " ACCEPT OR PRESS CANCEL TO EXIT."
db $00

TEXT_RAM_TEST_TESTING_SLOT:
db "TESTING SLOT ", $00

TEXT_RAM_TEST_PAGE:
db "PAGE ", $00

TEXT_RAM_TEST_ERRORS:
db " ERRORS FOUND", $00



; ----------------------------------------------------------
; Textos genericos
; ----------------------------------------------------------

; Nueva linea
TEXT_NEW_LINE:
db $0D, $0A, $00



; ----------------------------------------------------------
; Tabla de caracteres personalizados
Expand Down
2 changes: 1 addition & 1 deletion source/formats/f_binary.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
; Directivas de compilacion para BINARIO de 32kb
;
Expand Down
2 changes: 1 addition & 1 deletion source/formats/f_cas.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
; Directivas de compilacion para BINARIO de 32kb
; Genera un archivo .CAS y .WAV
Expand Down
2 changes: 1 addition & 1 deletion source/formats/f_com.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
; Directivas de compilacion para .COM de MSX-DOS
;
Expand Down
4 changes: 2 additions & 2 deletions source/formats/f_rom.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
; Directivas de compilacion para ROM de 32kb
;
Expand Down Expand Up @@ -40,7 +40,7 @@ OUTPUT_FORMAT = 2 ; Define el formato de salida

.PAGE 1 ; Selecciona la pagina 1 [$4000] (Codigo del programa)
.ROM ; Se creara el binario en formato ROM de hasta 32kb
.SIZE 32
.SIZE 32 ; Tamaño de salida forzado a 32kb
.db 77, 83, 88, 95, 68, 73, 65, 71, 0, 0, 0, 0 ; 12 digitos para completar la cabecera de la ROM

; Indicale al compilador donde empieza el programa
Expand Down
4 changes: 3 additions & 1 deletion source/msxdiag.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;***********************************************************
;
; MSX DIAGNOSTICS
; Version 1.1.8
; Version 1.1.9
; ASM Z80 MSX
;
; (cc) 2018-2020 Cesar Rincon "NightFox"
Expand Down Expand Up @@ -114,6 +114,8 @@ PROGRAM_START_ADDRESS:
.INCLUDE "prog/psg_test.asm"
; Informacion del sistema
.INCLUDE "prog/system_info.asm"
; Test de la memoria RAM
.INCLUDE "prog/ram_test.asm"
; Test de color del monitor
.INCLUDE "prog/monitor_color_test.asm"
; Test del modo mixto
Expand Down
160 changes: 160 additions & 0 deletions source/ngn/ngn_text.asm
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,166 @@ NGN_TEXT_PRINT_BCD:



; ----------------------------------------------------------
; NGN_TEXT_PRINT_INTEGER
; Imprime un numero entero decimal sin signo
; BC = Numero a imprimir en formado hexadecimal
; entre $0000 y $FFFF
; Modifica A, BC, DE, HL
; Esta funcion usa la conversion por fuerza bruta
; Usar con moderacion
; ----------------------------------------------------------

NGN_TEXT_PRINT_INTEGER:

; Preserva el numero a imprimir
ld a, b
ld [(NGN_TEMP_VAR + 6)], a
ld a, c
ld [(NGN_TEMP_VAR + 7)], a

; Variables temporales para el calculo a 0
ld hl, NGN_TEMP_VAR
ld b, 6
@@RESET_LOOP:
ld [hl], $00
inc hl
djnz @@RESET_LOOP


; Bucle para la conversion

@@CONVERSION_LOOP:

ld a, [(NGN_TEMP_VAR + 6)] ; Recupera el numero a imprimir
ld b, a
ld a, [(NGN_TEMP_VAR + 7)]
ld c, a

ld a, b ; Si el numero a convertir es 0
or c ; o ya se ha terminado de convertir,
jp z, @@CONVERSION_FINISHED ; sal del bucle

ld de, NGN_TEMP_VAR ; Variable con el resultado
ld hl, (NGN_TEMP_VAR + 3) ; Valor a sumar

ld a, b ; Calcula si son Fxxx
and $F0
jr z, @@TRY_XFXX ; Si no lo son, siguiente prueba
; Fxxx
ld [hl], $96 ; D ; Numero a sumar
inc hl
ld [hl], $40 ; C ; para el digito
inc hl
ld [hl], $00 ; B ; Fxxx
ld a, b ; Carga el HI-BYTE del numero
srl a ; Bitshift >> 4
srl a
srl a
srl a
and $0F ; Bitmask del LOW-BYTE
push af ; Preserva este numero (repeticiones)
ld a, b ; Vuelve a cargarlo
and $0F ; Y elimina esta parte para marcarla como hecha
ld [(NGN_TEMP_VAR + 6)], a ; Actualiza el valor del numero a convertir
pop af ; Recupera el numero de repeticiones
ld b, a ; Indicaselas al bucle
jr @@START_ADD ; Salta al bucle

@@TRY_XFXX:
ld a, b ; Calcula si son xFxx
and $0F
jr z, @@TRY_XXFX ; Si no lo son, siguiente prueba
; xFxx
ld [hl], $56 ; D ; Numero a sumar
inc hl
ld [hl], $02 ; C ; para el digito
inc hl
ld [hl], $00 ; B ; xFxx
ld a, b ; Carga el HI-BYTE del numero
and $0F ; Bitmask del LOW-BYTE
push af ; Preserva este numero (repeticiones)
ld a, b ; Vuelve a cargarlo
and $F0 ; Y elimina esta parte para marcarla como hecha
ld [(NGN_TEMP_VAR + 6)], a ; Actualiza el valor del numero a convertir
pop af ; Recupera el numero de repeticiones
ld b, a ; Indicaselas al bucle
jr @@START_ADD ; Salta al bucle

@@TRY_XXFX:
ld a, c ; Calcula si son xxFx
and $F0
jr z, @@TRY_XXXF ; Si no lo son, siguiente prueba
; xxFx
ld [hl], $16 ; D ; Numero a sumar
inc hl
ld [hl], $00 ; C ; para el digito
inc hl
ld [hl], $00 ; B ; xxFx
ld a, c ; Carga el HI-BYTE del numero
srl a ; Bitshift >> 4
srl a
srl a
srl a
and $0F ; Bitmask del LOW-BYTE
push af ; Preserva este numero (repeticiones)
ld a, c ; Vuelve a cargarlo
and $0F ; Y elimina esta parte para marcarla como hecha
ld [(NGN_TEMP_VAR + 7)], a ; Actualiza el valor del numero a convertir
pop af ; Recupera el numero de repeticiones
ld b, a ; Indicaselas al bucle
jr @@START_ADD ; Salta al bucle

@@TRY_XXXF:
ld a, c ; Calcula si son xxxF
and $0F
jr z, @@START_ADD ; Si no lo son, siguiente prueba
ld [hl], $01 ; D ; Numero a sumar
inc hl
ld [hl], $00 ; C ; para el digito
inc hl
ld [hl], $00 ; B ; xxxF
ld a, c ; Carga el HI-BYTE del numero
and $0F ; Bitmask del LOW-BYTE
push af ; Preserva este numero (repeticiones)
ld a, c ; Vuelve a cargarlo
and $F0 ; Y elimina esta parte para marcarla como hecha
ld [(NGN_TEMP_VAR + 7)], a ; Actualiza el valor del numero a convertir
pop af ; Recupera el numero de repeticiones
ld b, a ; Indicaselas al bucle

@@START_ADD:
ld hl, (NGN_TEMP_VAR + 3) ; Valor a sumar

@@ADD_LOOP:
push hl ; Preserva los registros
push de
push bc
call NGN_BCD_ADD ; Operacion de suma
pop bc ; Recupera los registros
pop de
pop hl
djnz @@ADD_LOOP ; Si no has terminado, repite
jp @@CONVERSION_LOOP ; Repite si no has salido
; Lee los datos de la variable y preparalos para imprimirlos en BCD
@@CONVERSION_FINISHED:
ld a, [NGN_TEMP_VAR]
ld d, a
ld a, [(NGN_TEMP_VAR + 1)]
ld c, a
ld a, [(NGN_TEMP_VAR + 2)]
and $0F
ld b, a

; Imprime el numero
call NGN_TEXT_PRINT_BCD

; Sal de la funcion
ret



; ----------------------------------------------------------
; NGN_TEXT_POSITION
Expand Down
3 changes: 2 additions & 1 deletion source/ngn/ngn_vars.asm
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@ NGN_SPRITE_31: ds 4

; -----------------------------------------------------------------------
; Variables genericas
; Total: 2 bytes
; Total: 9 bytes
; -----------------------------------------------------------------------

NGN_RANDOM_SEED: ds 1 ; Semilla del random
NGN_TEMP_VAR: ds 8 ; 8 bytes de variable para temporales



Expand Down
Loading

0 comments on commit e9f050d

Please sign in to comment.