Karoshi MSX Community
05 de Julio de 2021, 01:09:07 pm *
Bienvenido(a), Visitante. Por favor, ingresa o regístrate.

Ingresar con nombre de usuario, contraseña y duración de la sesión
Noticias:
 
   Inicio   Ayuda Buscar Ingresar Registrarse  
Páginas: [1]
  Imprimir  
Autor Tema: New Screenmode  (Leído 12034 veces)
0 Usuarios y 1 Visitante están viendo este tema.
dvik
Karoshi Fan
**
Mensajes: 80


WWW Email
« : 03 de Julio de 2006, 12:21:17 am »

I did some testing today and found a new screen mode. Its screen 0 but with screen 2 style BG tiles addressing. Its probably not the most useful screen mode but I made a little demo using it:

http://www.bluemsx.com/demos/scr05demo.zip

In this demo I use it to create interlaced images but it can of course be used without interlace as well. This screen mode was actually what I had in mind for interlaced width 80 but I did some calculations and although its more powerful than screen 0 its only possible to do width 64. If you look at the text on the bottom of the screen you'll see how it would look.

Note that no emulators support this screen mode yet so you can only run it on a real MSX. I've added support for it in blueMSX so it will be available in the next release.
« Última modificación: 03 de Julio de 2006, 12:35:25 am por dvik » En línea
dvik
Karoshi Fan
**
Mensajes: 80


WWW Email
« Respuesta #1 : 03 de Julio de 2006, 01:17:56 am »

The code for the demo is quite simple. It pretty much sets up the undocumented screen mode, adds an interrupt handler which toggles the BG tiles every frame, either 0000h or 2000h. The colors are standard screen 0, i.e. whatever is in VDP(7). The BG map is also as screen 0, i.e. 40x20 bytes.

The code includes a vram binary that has tile data for odd pages at 0000h-1800h and even pages at 2000h-3800h. Then the BG map is at 1800h. So you could easily just create a vram dump yourselves if you want to play with the code.

Código:
;------------------------------------------------------
;
; Description: Views an image using undocumented screen mode
;
; The new VRAM map is:
; 0000-17FF : Pattern table 1
; 2000-37FF : Pattern table 2
; 1800-1BC0 : Name table
;
; Use asMSX to compile (although is easily adapted to other assemblers)
;
;------------------------------------------------------

        .bios
        .page 1
        .rom
.start MAIN
       
RG2SAV equ     $F3E1
RG4SAV equ     $F3E3

MAIN:

        ld      hl,VDP_REGS
       
        di
        ld      a,$80
        ld      c,$99
@@CPYLOOP:
        outi
        nop
        nop
        out     ($99),a
        inc     a
        cp      $88
        jp      nz,@@CPYLOOP
       
        ei
       
        ld      a,3
        ld      [VALUE],a
       
        ld      hl,VRAM_DATA
        ld      de,0
        ld      bc,$3800
        call    LDIRVM

; installs interupt hook
        call    INSTALLISR

@@HANG:
        jp      @@HANG


;
; Interrupt routine
;
ISR:
        di
        in      a,($99)
       
        ld      a,[VALUE]
        out     [$99],a
        xor     4
        ld      [VALUE],a
        ld      a,$84
        out     [$99],a
        ei
        ret

;
; Installs interrupt hook
;
INSTALLISR: di
        ld hl,$FD9F
        ld de,HOOK
        ld bc,5
        ldir
        ld a,$C3
        ld hl,ISR
        ld [$FD9F],a
        ld [$FD9F+1],hl
        ei
        ret

;
; Uninstalls interrupt hook (not used in this example! :P)
;
REMOVEISR: di
        ld hl,HOOK
        ld de,$FD9F
        ld bc,5
        ldir
        ei
        ret



VDP_REGS:
db 02h,f0h,06h,ffh,03h,36h,07h,b1h

VRAM_DATA:
.INCBIN "vram.dat"

;
; RAM variables
;
.page 3

VALUE: DS 1
HOOK: DS 5
« Última modificación: 03 de Julio de 2006, 01:19:41 am por dvik » En línea
Jon_Cortazar
Administrator
Karoshi Forum's God
********
Mensajes: 2777



WWW Email
« Respuesta #2 : 03 de Julio de 2006, 07:46:26 am »

Nice, dvik!. I'll test it later, thnx for submitting it!  Cheesy
En línea

Jon Cortázar Abraido (aka El Viejo Archivero)
RELEVO Videogames
[Dioniso: La cafeína está haciendo su trabajo; yo espero hacer el mío.]
[pitpan: Me sigue pareciendo más productivo jugar al SNAIL MAZE que seguir esta discusión.]
dvik
Karoshi Fan
**
Mensajes: 80


WWW Email
« Respuesta #3 : 03 de Julio de 2006, 08:02:18 am »

I've only tested it on my CX5M so I'm curious to hear how its running on other MSXes.
En línea
dvik
Karoshi Fan
**
Mensajes: 80


WWW Email
« Respuesta #4 : 03 de Julio de 2006, 09:08:41 am »

And here is a width80 text using the new screen mode that is quite readable: http://www.bluemsx.com/demos/scr05demo2.zip

And here is an emulator screenshot: http://www.bluemsx.com/demos/scr05demo2.png
« Última modificación: 03 de Julio de 2006, 09:15:33 am por dvik » En línea
Jon_Cortazar
Administrator
Karoshi Forum's God
********
Mensajes: 2777



WWW Email
« Respuesta #5 : 03 de Julio de 2006, 09:35:44 am »

Lookin' good!. When I arrive home, I'll test both demos!.
En línea

Jon Cortázar Abraido (aka El Viejo Archivero)
RELEVO Videogames
[Dioniso: La cafeína está haciendo su trabajo; yo espero hacer el mío.]
[pitpan: Me sigue pareciendo más productivo jugar al SNAIL MAZE que seguir esta discusión.]
jltursan
Karoshi Forum's Guru
*******
Mensajes: 1516


¿Que es lo que has aprendido hoy?


WWW Email
« Respuesta #6 : 03 de Julio de 2006, 10:56:22 am »

Impressive!, you've finally done it!. I'll test too ASAP.

Btw, have you find the way to use the font you post here some days ago?. If so, I think that the same font design could be used with a 64 chars font and achieve a very good looking 64 columns mode.
En línea

Doom dee doom dee doom
pitpan
Karoshi Forum's Guru
*******
Mensajes: 1812


« Respuesta #7 : 03 de Julio de 2006, 07:13:58 pm »

Cool screen mode! I have to test it on the real MSX at 50 Hz. Anyone ready to code an eBook reader?
En línea
jltursan
Karoshi Forum's Guru
*******
Mensajes: 1516


¿Que es lo que has aprendido hoy?


WWW Email
« Respuesta #8 : 03 de Julio de 2006, 09:27:36 pm »

It works flawlessly on my HB-75 and the font reads very well!. I haven't tested the new mode on higher machines; but I suppose that it will work fine....and thinking about that; maybe is possible to obtain a still readable text mode with 160 columns interlacing a 80 columns mode... Shocked
En línea

Doom dee doom dee doom
coldbreeze
Karoshi Newbie
*
Mensajes: 3


« Respuesta #9 : 21 de Mayo de 2007, 09:13:52 am »

It failed on my HB-F1XDmk2... hung up on white screen.  Sad
En línea
jltursan
Karoshi Forum's Guru
*******
Mensajes: 1516


¿Que es lo que has aprendido hoy?


WWW Email
« Respuesta #10 : 21 de Mayo de 2007, 12:39:11 pm »

Mmmm....maybe a problem with the V9938. I finally never tested it on MSX2 machines and I'm curious about if it works or not. I'll give a look...
En línea

Doom dee doom dee doom
coldbreeze
Karoshi Newbie
*
Mensajes: 3


« Respuesta #11 : 21 de Mayo de 2007, 01:33:11 pm »

Please give it a try on any MSX2 machine with V9938. I am going to test the sample app on my SVI-728 shortly. I will let you know of the outcome.
En línea
coldbreeze
Karoshi Newbie
*
Mensajes: 3


« Respuesta #12 : 21 de Mayo de 2007, 02:03:13 pm »

It worked fine on SVI-728!  Smiley
En línea
Páginas: [1]
  Imprimir  
 
Ir a:  

Impulsado por MySQL Impulsado por PHP Powered by SMF 1.1.21 | SMF © 2013, Simple Machines XHTML 1.0 válido! CSS válido!