MSX2 - Screen 5 disabling sprite and more

Por Snatcher-br

Supporter (12)

Imagen del Snatcher-br

11-06-2004, 06:08

Hi to all,
Anyone can help me Smile I'm using Pascal to make some routines that i'll use in a game..

Weel reading nice doc's in MAP (http://map.tni.nl/articles/vdp_commands_speed.php) I see that when we disable Sprite in Screen 5 the VDP give us more speed... well the routine to disable screen is:

Sprites_Off: ld a,(VDP+8)
or %00000010
ld (VDP+8),a
di
out (#99),a
ld a,8+128
ei
out (#99),a
ret

but in Pascal 3.x we can't use the directive ASM to put a ASM code .. the unic form to put a ASM code is the inline method ..

Hre's my problme :) I don't know ASM and can't translate the ASM to inline or another method in Pascal to do this!! :)

To get more speed we an disable some lines in screen 5 only working with 192 lines in the page have the code too but ...

If can anyone here can give a little help :) ?

Login sesión o register para postear comentarios

Por pitpan

Prophet (3135)

Imagen del pitpan

11-06-2004, 07:33

Use an assembler to create a .COM file, for example. Then, just use any binary editor or make your own tiny tool to get the hexa values of all the instructions.

If you do not use much asm, then I suggest to use the table from Sean Young's Z80 undocumented documented, that you can download from his site, http://www.msxnet.org

Using that extensive table (at the end of his doc) you can easily translate from mnemonics to opcodes.

Por ro

Scribe (4368)

Imagen del ro

11-06-2004, 09:27

hmm, why not copy paste the source in some assembler running on some emulater and then check the monitor (or the disasm)?

Por sjoerd

Hero (599)

Imagen del sjoerd

11-06-2004, 11:50

why not translate the source to pascal?

Por anonymous

incognito ergo sum (116)

Imagen del anonymous

11-06-2004, 13:22

Hi to all,
Anyone can help me Smile I'm using Pascal to make some routines that i'll use in a game..

Weel reading nice doc's in MAP (http://map.tni.nl/articles/vdp_commands_speed.php) I see that when we disable Sprite in Screen 5 the VDP give us more speed... well the routine to disable screen is:

Sprites_Off: ld a,(VDP+8)
or %00000010
ld (VDP+8),a
di
out (#99),a
ld a,8+128
ei
out (#99),a
ret

but in Pascal 3.x we can't use the directive ASM to put a ASM code .. the unic form to put a ASM code is the inline method ..

Hre's my problme :) I don't know ASM and can't translate the ASM to inline or another method in Pascal to do this!! :)

To get more speed we an disable some lines in screen 5 only working with 192 lines in the page have the code too but ...

If can anyone here can give a little help :) ?

Instead of reinventing a whole set of wheels, you could consider using the libraries available on e.g. funet: http://www.funet.fi/pub/msx/programming/pascal .

HTH...

Por SLotman

Paragon (1236)

Imagen del SLotman

14-06-2004, 18:48

I don't get it why people just don't look in the included files of MSXPad...

SPRITE.INC has two procedures: EnableSprites and DisableSprites, that does exacly what you're looking for.

Por BiFi

Enlighted (4348)

Imagen del BiFi

14-06-2004, 19:29

Re-inventing the wheel can be quite educational... Wink

Sprites_Off: ld a,(VDP+8)
or %00000010
ld (VDP+8),a
di
out (#99),a
ld a,8+128
ei
out (#99),a
ret

inline($3A,$E7,$FF,
$F6,$02,
$32,$E7,$FF,
$F3,
$D3,$99,
$3E,$88,
$FB,
$D3,$99);