G

Guest

Guest
Archived from groups: rec.games.vectrex (More info?)

Hi,

I yesterday took a detailed look at the BIOS print_str routine ($F495)
and wondered a bit. It copies the entire string into the VIA Shift
Register ($F4C7-$F4D0), before activating RAMP ($F4D1-...). This would
mean that the VIA features some sort of buffering, but I couldn't find
something like that in the data sheets. How does this work?

Bye,
Martin
 
G

Guest

Guest
Archived from groups: rec.games.vectrex (More info?)

> Hi,
>
> I yesterday took a detailed look at the BIOS print_str routine ($F495) and
> wondered a bit. It copies the entire string into the VIA Shift Register
> ($F4C7-$F4D0), before activating RAMP ($F4D1-...). This would mean that
> the VIA features some sort of buffering, but I couldn't find something
> like that in the data sheets. How does this work?
>
> Bye,
> Martin

Hi,

No, RAMP is activated at F4C3 before writing anything to SHIFT.

After writing to SHIFT there is a 2 clock cycle delay before the first bit
(bit 7) is output to /BLANK. Then, every 2 cycles after that the remaining
bits are shifted out until it rests on bit 0. So it total you need 18 clock
cycles (minimum) per byte written to SHIFT. (Any less than 18 cycles and
the SHIFT register will stall.)

Note that that routine writes $18 to ACNTRL to switch RAMP to "non-timed"
mode and then toggles bit 7 of CNTRL to activate/disable RAMP. To shortcut
this you can just write $18 to ACNTRL to actiavte RAMP and $98 to deactivate
it (assuming bit 7 of CNTRL is 0, which it normaly would be). That works on
the real hardware but the MESS emulator doesn't see it however.

Also note that there is a flaw with the VecX emulator regarding the SHIFT
register - it shifts every clock rather than every 2 clocks so text
characters get drawn half width with spaces between. (Which is why the
invaders in YASI look so distorted.)

Hope this helps.

Alex
 
G

Guest

Guest
Archived from groups: rec.games.vectrex (More info?)

Hey,

> No, RAMP is activated at F4C3 before writing anything to SHIFT.
>
> After writing to SHIFT there is a 2 clock cycle delay before the first bit
> (bit 7) is output to /BLANK. Then, every 2 cycles after that the remaining
> bits are shifted out until it rests on bit 0. So it total you need 18 clock
> cycles (minimum) per byte written to SHIFT. (Any less than 18 cycles and
> the SHIFT register will stall.)
>
> Note that that routine writes $18 to ACNTRL to switch RAMP to "non-timed"
> mode and then toggles bit 7 of CNTRL to activate/disable RAMP. To shortcut
> this you can just write $18 to ACNTRL to actiavte RAMP and $98 to deactivate
> it (assuming bit 7 of CNTRL is 0, which it normaly would be). That works on
> the real hardware but the MESS emulator doesn't see it however.

Ah thanks, I see. Well, I guess I shouldn't rely too much on the
comments in my BIOS.ASM file, disable/enable are switched and I didn't
check this.


Thanks a lot,

Martin