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.

McArti0

Done it.  ;D Zilog Z84C0020PEG in CPC.

Basically it consumes no energy. It is cold. 
According to the documentation, at 4MHz it consumes 20mA or 0.1W.

BASIC works.
keyboard works. 
GOTEK works.
CPM works.
Bomb Jack works.
Sound works

some undocumented instructions Z80 works.
I checked LD A,LY
v%=0:CALL &BFF8,&C912,0,&7DDD,@v%:PRINT v%
246
(LD A,LY : NOP: NOP: LD (DE),A : RET)

Pinball Dream without synchronization and bad noise screen
AY3 only produces noise.

Batman Forever many scenes don't work.
AY3 only produces noise.
The relay to the tape recorder is ticking.

That's all for now.
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.

Prodatron

Thanks for reporting!
Very interesting, I would like to hear about more testings.
I wonder if the issues with BG-stuff are undocumented instructions or timing.
(btw I really like your Basic hacks!)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

roudoudou

most of problems are due to (i guess) OUT (C),0 undocumented opcode which was fixed (or reassigned) in later versions
My pronouns are RASM and ACE

Prodatron

OUT (C),0 is used in all optimized AY routines, so yes, that makes sense with the corrupted sound.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

McArti0

OUT (c),0 working  :-* but like OUT (c),255   :picard: ;D

OUT &BC00,15: OUT &BD00,15: rem CURSOR REGISTER
?INP(&BFFF)
15
CALL &BFFC, &e9dd ,&c9 ,  &71ED,     &BD00, &100
REM             JP(IX)   RET   OUT(c),0    LD BC,&BD00
? INP(&BFFF)
255

Dear Zilog, does 1 CY really save you?  :-\

But SymbOS working  :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.

andycadley

Isn't this a reasonably well known issue with CMOS Z80s ( I think I've seen speculation that, since the instruction was unintended, it's just a result of how internal signals value when floating differs between NMOS/CMOS)

There's also a slight difference in LD A,R/LD A,I behaviour according to @arnoldemu 

https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/z80-cpu-nmos-or-cmos/

McArti0

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.

Prodatron

Quote from: andycadley on 19:17, 24 April 24There's also a slight difference in LD A,R/LD A,I behaviour according to @arnoldemu

Quote from: McArti0 on 18:56, 24 April 24But SymbOS working  :D

Thanks, yery good to know!

SymbOS is using LD A,I/LD I,A a lot, so this part seems to be 100% the same for both Z80 versions.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

McArti0

I will be making a hardware patch in an inelegant version, i.e. shorting D0-7 from high to low. If anyone knows whether the CMOS output can withstand such frequent treatment, please write something.
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.

andycadley

Quote from: Prodatron on 21:17, 24 April 24
Quote from: andycadley on 19:17, 24 April 24There's also a slight difference in LD A,R/LD A,I behaviour according to @arnoldemu

Quote from: McArti0 on 18:56, 24 April 24But SymbOS working  :D

Thanks, yery good to know!

SymbOS is using LD A,I/LD I,A a lot, so this part seems to be 100% the same for both Z80 versions.
According  to that thread it's a bug on the NMOS version only where the P/V flag gets cleared if an interrupt occurs while processing one of those instructions. I imagine caring about that is such an incredibly niche situation that nothing would be affected unless specifically testing for it.

VincentGR

Can you also test Relentless? (sound)

McArti0

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.


McArti0

Quote from: VincentGR on 09:22, 25 April 24Can you also test Relentless? (sound)
GamePlay work. Sound noise (Intro and Game).
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.

VincentGR


McArti0

Hardcore Hardware Patch Z84C - OUT(C),0

Someone tell me if the CMOS output can be shorted with impunity.
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.

GUNHED

Would be nice to know if this will work! Good luck!  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

McArti0

I measured the short-circuit current of the Z84c data line. 20mA.
8x20=160 mA. 750ns pulse 160mA (0.8W). 

I will do it, but don't do it at home.  :P

ps. Or maybe I won't.  :picard:
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.

McArti0

Softcore Hardware Patch Z84C - OUT(C),0

This version is an adapter between Z84C and socket. I wanted to avoid it, but 0.8W scares me.

QS3244 is fine bus gate.

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.

McArti0

#19
External hardware Z84C for OUT (c),0 working and ALL SOFT WORKING  :o ;D :P 8)

Semi HARDCORE version.

Hardware patch converts OUT(c),0 [ED 71] to IN(c) [ED 70] next pushing 00 on the data bus and forcing RD Hi and WR Lo.  short circuit current ~2x20 mA CMOS outputs are very strong.

Correct The WR and RD signals should be gated.

Now I'm waiting to see what goes first: the RD and WR outputs in the Z80 or the forcing outputs in the SLG

The patch was sewn into the SLG46826v-DIP

Maybe someone would like to create such an interface in the version between Z84cmos and the socket?

Hardware Patch Z84C SemiHardcore emulated

Greetings to All McArti0.

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.

Benedikt

Quote from: McArti0 on 21:29, 15 May 24Hardware patch converts OUT(c),0 [ED 71] to IN(c) [ED 70] next pushing 00 on the data bus and forcing RD Hi and WR Lo.  short circuit current ~2x20 mA CMOS outputs are very strong.

Correct The WR and RD signals should be gated.
Wouldn't it be possible to just put XORs in the /WR and /RD lines to selectively invert them?

McArti0

@Benedikt
I didn't want to make an interface between the socket and the z80 at all costs. Fun for 80 pins.
Besides, in my micro fpga I have no free input left and only one gate.
I used SLG46826 because it has NVM configuration. I could probably fit everything in 46533 but there is OTP (PROM)

It is enough to confirm that OUT (C),0 is the only significant compatibility problem.
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.

McArti0

#22
PinballDream on Z84 CMOS.

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.

Benedikt

While your hardware fix is remarkable, I am wondering about the feasibility of a hybrid fix:

What 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?

McArti0

#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.
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