Schrijver
| MSX2 - Screen 5 disabling sprite and more
|
Snatcher-br msx friend Berichten: 6 | Geplaatst: 11 Juni 2004, 06:08   |
Hi to all,
Anyone can help me  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  ?
|
|
pitpan msx master Berichten: 1389 | Geplaatst: 11 Juni 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.
|
|
ro msx guru Berichten: 2346 | Geplaatst: 11 Juni 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)?
|
|
sjoerd msx addict Berichten: 450 | Geplaatst: 11 Juni 2004, 11:50   |
why not translate the source to pascal?
|
|
| Unregistered | Geplaatst: 11 Juni 2004, 13:22   |
Quote:
| Hi to all,
Anyone can help me  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...
|
|
SLotman msx professional Berichten: 544 | Geplaatst: 14 Juni 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.
|
|
BiFi msx guru Berichten: 3142 | Geplaatst: 14 Juni 2004, 19:29   |
Re-inventing the wheel can be quite educational...
Quote:
| 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);
|
|
|
|
|