Autor
| help!: Question for very expert vdp guys...
|
PingPong msx master Mensajes: 1069 | Publicado: Septiembre 12 2006, 14:23   |
Hi, I'm wondering if after VDP set of read/write address i can (on the real machine) do these stuffs without altering the next vdp read /write address set before:
- Can i write to registers (i suppose yes) without re-doing the VRAM address setup?
- Can i read the status reg? in a,(99), without re-doing the Vram address setup?
In an msx2, supposing that:
i've set the vram write address at 0x0000,
then "outed" a byte on port 98h
then write the 3 high order bits of VRAM in msx2 register with value of 1 (meaning that i want to operate on the next 16k block)
the next out(98),a writes at 0x0001 or 0x0001+16K?
Thx, to all...
|
|
NYYRIKKI msx master Mensajes: 1533 | Publicado: Septiembre 12 2006, 15:48   |
I would say: Yes, Yes, #4001
|
|
ARTRAG msx master Mensajes: 1802 | Publicado: Septiembre 12 2006, 16:27   |
I remember that you can safely write VDP registers without loosing the current VRAM address.
I think that your trick should work, the next address should be 04001h
and more in general, after you access to 0000h, you can continue writing in any X*16k+1 address
|
|
PingPong msx master Mensajes: 1069 | Publicado: Septiembre 12 2006, 16:39   |
thx
|
|
DamageX msx freak Mensajes: 168 | Publicado: Septiembre 13 2006, 04:05   |
If reading the status register does not disturb the VRAM address... then why does it seem like I have to disable interrupts (my own routine) while copying stuff to VRAM? Otherwise strange things happen
|
|
dvik msx master Mensajes: 1376 | Publicado: Septiembre 13 2006, 06:54   |
You only need to disable VRAM while setting up the VDP write address, but you don't need the interrupts disabled while transfering data from RAM to VRAM. So you only need to disable interrupts for a short time when writing the stuff to port 99h
|
|
NYYRIKKI msx master Mensajes: 1533 | Publicado: Septiembre 13 2006, 09:07   |
You need to disable interrupts, when other than first status register is selected because BIOS interrupt routine expects first status register to be selected when it is executed. When you write stuff to VDP registers disabling interrupts is needed to awoid situation where interrupt routine has changed the register you are about to read/write. With carefull planning this can be awoided also without disabling interrupts. (Make sure interrupt does not occur while you are writing your changes)
|
|
|
|
|