Re: A82: Re: a82: writing to the display port!!!


[Prev][Next][Index][Thread]

Re: A82: Re: a82: writing to the display port!!!






>Thank Dines, the info was very helpful!
If you want to make the display rutine very fast remember that the CALL $7F3
actually makes a delay which is too long. Instead try counting the T states,
that will give you a much faster rutine. I took the following comment from a
program written by Sam Davies:
;CALL $07F3 does the following:
;       CALL $07F3      17
;07F3:  PUSH AF         11
;       INC HL           6
;       DEC HL           6
;       POP AF          10
;       RET             10
;                      =60 T States
;
;You only need exactly 29 T States between OUT (C),r's to port 10.

Later tests have shown that some calcs need more then 29 T states, but 45
should be enough. So if you included the LD's in the count you would be able
to make a delay which is a lot shorter.

>A couple of questions though:
>RLC L???

Rotate Left thrue Carry = RLC  L=register L (lower part of HL)

>and how fast is checking the keyboard port compared to ROM_CALL(Key_hand)
to
>CALL GETKEY

The interrupt rutine reads the keyport port to find which keys is pressed on
every interrupt, and stores this in the mem. All the GET_KEY function does
is load the register with this value.

Some poeple say that it is alot faster to read the port your self, but i
have never tested this. But since this means that the port is read twice
instead of once, i am not sure. Most games however inlcude delays and use
GET_KEY anyway, so i guess it should be fast enough. The only real reason i
can think of for reading the port directly is that you can then check for
multiple keys.

If anyone has tested which method is the fast, it would be great to see the
results.

Dines