Changes

Jump to: navigation, search
/* Ports */
When a IN is performed from this port:
* 0x079 is always reported on a CPC6128+,* 0x078 is always reported on a CPC464+,* on the CPC 0x0ff is mostly reported , 
The resulting input value is always written.
This weird bug can be seen on the game "Into the Eagles Nest". The code that exhibits the bug is:
This weird bug can be seen on the game "Into the Eagles Nest". The code that exhibits the bug is:
<pre>
;; before entering this code, B has been set to 0x07f
LD C,&54 ;; select black colour
IN A,(C) ;; !!!!!!!!
</pre> * On the CPC6128+, the bottom border is coloured green, (the green colour is the equivalent of OUTing with 0x079),* On the CPC464+, the bottom border is purple, (the purple colour is the equivalent of OUTing with 0x078),* on a CPC it remains black. 
In the CPC and CPC+ design, the CRTC is written to via 2 ports ("select register" and "write data"). On the CPC+, performing an IN operation on either of these ports has the same effect as performing an OUT. On the CPC, performing an IN on these ports has no effect.
This bug can be reproduced from basic using the following code:
<pre>
OUT &BC00,6:? INP(&BD00)
</pre>
The result of this code causes the vertical displayed to be 0x079 on a CPC6128+ or 0x078 on a CPC464+.
8,326
edits