MSX2 - VDP Timing

Por Snatcher-br

Supporter (12)

Imagen del Snatcher-br

19-06-2004, 07:16

Hi to all
I tried translate the VDPready ASM routine that exist in the MAP to pascal inline .. but when I call the procedure the program crash can anyone give a little help Wink

http://map.tni.nl/sources/docopy.php

procedure VDPready;
Begin
{VDP_Ready:
ld a,2
di
out (#99),a ;select s#2
ld a,15+128
out (#99),a
in a,(#99)
rra
ld a,0 ;back to s#0, enable ints
out (#99),a
ld a,15+128
ei
out (#99),a ;loop if vdp not ready (CE)
jp c,VDPready
ret}

inline ($3A/$02/
$F3/
$D3/$99/
$3E/$8F/
$D3/$99/
$1f/
$3E/$00/
$D3/$99/
$3E/$8F/
$FB/
$D3/$99/
$da/VDPready2
);
End;

thanks

Login sesión o register para postear comentarios

Por BiFi

Enlighted (4348)

Imagen del BiFi

19-06-2004, 08:01

inline ($3A/$02/
$F3/
$D3/$99/
$3E/$8F/
$D3/$99/
$1f/
$3E/$00/
$D3/$99/
$3E/$8F/
$FB/
$D3/$99/
$da/VDPready2
);
End;

inline (
$3E/$02/ { ld a,2 ; this one was incorrect }
$F3/ { di }
$D3/$99/ { out ($99),a }
$3E/$8F/ { ld a,128+15 }
$D3/$99/ { out ($99),a }
$DB/$99/ ( in a,($99) ; you forgot this one }
$1F/ { rra }
$3E/$00/ { ld a,0 }
$D3/$99/ { out ($99),a }
$3E/$8F/ { ld a,128+15 }
$FB/ { ei }
$D3/$99/ { out ($99),a }
$DA/VDPready { jp c,VDPready ; even though the name is correct now I think it's going wrong here. }
);

Por Sonic_aka_T

Enlighted (4130)

Imagen del Sonic_aka_T

19-06-2004, 12:46

Have you given any thought to programming in ASM directly? The MSX is a great platform to learn ASM on. Even if you're not a very good assembly programmer, you're still likely to get better results in ASM then you are in Pascal. Apart from that, programming a simple computer like the MSX is very easy to do in ASM. Just a suggestion, although I'm sure I'll be flamed to death for making a suggestion like this Tongue

Por BiFi

Enlighted (4348)

Imagen del BiFi

19-06-2004, 14:11

I now have a feeling you just killed him flaming him with that one time more. Wink

Por Snatcher-br

Supporter (12)

Imagen del Snatcher-br

22-06-2004, 05:34

thak's Smile BIFi now the procedure work fine Smile

Answering the Sonic_aka_T question .. Smile

I'm learning ASM but the pascal language r my lab Smile

I'm making a Library to MSX that can controll Shapes, Scroll[if I have a decent speed Smile] , sound etc .. to make games and some tools

I'm using the pascal because I'll port the library to a free Pascal compiller for Palm .. changing only the core of procedures and functions .. creating a cross library plataform to make games in both plataforms Smile