News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_McArti0

Zilog Z84C0020PEG in my CPC not all works.

Started by McArti0, 00:01, 24 April 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andycadley

Quote from: Benedikt on 09:59, 30 May 24What would happen if we replaced all occurrences of ED 71 in RAM with ED 70 and added a pull-down resistor network to the data bus?
You'd have to know which ED 71 byte sequences were intended to be code and not just arbitrary data.

Benedikt

Quote from: McArti0 on 12:21, 30 May 24
Quote from: Benedikt on 09:59, 30 May 24added a pull-down resistor network to the data bus
less than 1.4 kOhm for TTL inputs to notice this as Lo. it is not good idea. 3.6mA for all Hi data signal.
In that case, only the two extremes are possible: Your hardware fix or a pure software fix.
A pure software fix could e.g. replace OUT (C),0 with RST 6. Memory mapping could obviously be an issue.

Quote from: andycadley on 12:36, 30 May 24
Quote from: Benedikt on 09:59, 30 May 24What would happen if we replaced all occurrences of ED 71 in RAM with ED 70 and added a pull-down resistor network to the data bus?
You'd have to know which ED 71 byte sequences were intended to be code and not just arbitrary data.
The risk is fortunately only 1/65536, because it is a two-byte sequence.
If the primitive, exhaustive approach turns out to be impractical, a more sophisticated option would involve code scanning.

On a side note, I find it a bit strange that Pinball Dreams even relies on OUT (C),0, considering that the port is from 2019 and that CMOS Z80s from Zilog had been around since 1985 and were the only ones still manufactured in 2019.

andycadley

Quote from: Benedikt on 16:41, 30 May 24The risk is fortunately only 1/65536, because it is a two-byte sequence.
If the primitive, exhaustive approach turns out to be impractical, a more sophisticated option would involve code scanning.

Well 1/65536 probably isn't great odds of you have 65536 bytes of RAM. Plus there are things like compressed code or even dynamic code modification etc.

Quote from: Benedikt on 16:41, 30 May 24On a side note, I find it a bit strange that Pinball Dreams even relies on OUT (C),0, considering that the port is from 2019 and that CMOS Z80s from Zilog had been around since 1985 and were the only ones still manufactured in 2019.

CMOS Z80s were never used in CPCs and the OUT(C),0 instruction saves not only a small amount of execution time but also potentially an entire register. It's not really very surprising that it will occur a lot in performance critical code.

McArti0

@Benedikt @andycadley 

There is still the matter of replacing RD and WR in this situation, it is not known when. :D
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

Powered by SMFPacks Menu Editor Mod