Amstrad CPC Core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

User avatar
thelatestmodel
Atariator
Atariator
Posts: 24
Joined: Thu Dec 20, 2018 2:51 pm

Re: Amstrad CPC Core

Postby thelatestmodel » Wed Feb 20, 2019 10:24 pm

This update is spectacular. So much better than before, thank you Sorgelig! :cheers:

User avatar
Xtro
Atari maniac
Atari maniac
Posts: 82
Joined: Fri Jan 09, 2015 11:47 am
Location: Spain

Re: Amstrad CPC Core

Postby Xtro » Thu Feb 21, 2019 9:52 pm

I have noticed that running Batman Forever Demo from a zipped folder sounds weird and loads kinda slow. Loading from a uncompresed DSK works OK. Is there a problem running software inside zipped folders?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5069
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Amstrad CPC Core

Postby Sorgelig » Fri Feb 22, 2019 7:10 am

Batman demo is very sensitive to disk access timings. Probably zip routines gives some small delays crucial for this demo.

User avatar
Xtro
Atari maniac
Atari maniac
Posts: 82
Joined: Fri Jan 09, 2015 11:47 am
Location: Spain

Re: Amstrad CPC Core

Postby Xtro » Sun Feb 24, 2019 10:32 am

OK, must be that. Also I found that CDT tape files don't work inside zip folders.

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sun Mar 03, 2019 10:57 am


breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sun Apr 07, 2019 8:55 am

hi

cpc core doesn't seem to work anymore after last mister update

i got tree color bare (red blue and green)

edit : after cold reboot some time core run ?!?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5069
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Amstrad CPC Core

Postby Sorgelig » Sun Apr 07, 2019 11:41 am

No problem with Amstrad core.

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sat Apr 13, 2019 10:41 am

hi

z80 test error report bug in that test

http://www.cpc-power.com/index.php?page ... &num=12883

SCF and CCF instructions

Edit :

This affects all versions of MAME and MESS, I doubt any game relies on this, even ZEXALL doesn't catch it. SCF and CCF X and Y flags are wrong in MAME. Following information has been tested by me and confirmed by several guys in #openmsx freenode and #msxdev rizon IRC.

NEC: flags & A & 0x28
SGS/SHARP/ZiLOG: (flags | A) & 0x28
T9769C (Toshiba IC used in turboR): (flags & 0x28) | (A & 8 )

What MAME does, is plain (A&0x28). The most common situation would be the 2nd one, so I suggest to implement that, until MAME emulates the trivial differences between chip brands, if ever.

change
OP(op,37) { z80->F = (z80->F & (SF|ZF|PF)) | CF | (z80->A & (YF|XF)); } /* SCF */
OP(op,3f) { z80->F = ((z80->F&(SF|ZF|PF|CF))|((z80->F&CF)<<4)|(z80->A&(YF|XF)))^CF; } /* CCF */

to:
OP(op,37) { z80->F = (z80->F & (SF|ZF|PF|XF|YF)) | CF | (z80->A & (YF|XF)); } /* SCF */
OP(op,3f) { z80->F = ((z80->F&(SF|ZF|PF|CF|XF|YF))|((z80->F&CF)<<4)|(z80->A&(YF|XF)))^CF; } /* CCF */

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5069
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Amstrad CPC Core

Postby Sorgelig » Sun Apr 14, 2019 6:41 am

SCF and CCF undocumented flags misbehaviour is KNOWN issue. I've wrote it many times in different places.
To correct it, it will require to set specific flag after EACH instruction type. This is quite enormous work. At the end Z80 from different manufacturers have different behaviour.
And no one relay on this besides the synthetic test tuned for specific Z80 manufacturer.

IT WON'T BE FIXED

P.S.: what MAME does is incorrect. It's known that behaviour of SCF/CCF depends on previous instruction. It's not depend only on result, so you can't simply check the flags or register. You have to add one more flag and adjust it in every instruction.

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sun Apr 14, 2019 9:21 am

Hi

i have test with real cpu on my cpc 6128

ST 28400AB1 Z80ACPU 28848

Zilog Z8400APS Z80 CPU 8631

Zilog Z0840004PSC Z80 CPU 8722

all tests passed

edit :

Bits 3 and 5 of the F Register
Woody confirmed that bits 3 and 5 of the flags are copied on all BIT instructions on both a Zilog Z80 and an NEC clone (stated on the link above as being "unverified").

Stuart Brady discovered that how bits 3 and 5 of the flags are set after the SCF and CCF instructions actually depends on the variant of Z80 in use. On a Zilog Z80, bits 3 and 5 of the flags were set by ORing their previous values with that of A. On an NEC clone, bit 3 was unaffected, while bit 5 appears to be set by ANDing the previous value with something unknown. Previously, Ian Greenway tested this and found that bits 3 and 5 seemed simply to be copied from A, although it is not known which CPU these tests were run on. For more details, see here, here and a more recent investigation here.

Patrik Rak however later discovered that the way how the flags 5 and 3 are affected after SCF/CCF actually depends on the previous instruction completed. In case of genuine Zilog CPU, if an instruction modifies the flags, the immediately following SCF/CCF does move of bits 5 and 3 from A to F, whereas if an instruction doesn't modify the flags (and after interrupt), the SCF/CCF does OR of bits 5 and 3 from A to F. In case of NEC and other clones, it is similar, except that instead of OR it does AND with some unknown value, making the result unreliable.

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sun Apr 14, 2019 4:16 pm

hi

crtc bug this time

10 ' Glagla
20 SPEED INK 100,100:MODE 0:BORDER 0:INK 0,0:INK 1,26,2:OUT &BC00,8:OUT &BD00,1:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT" Si je tremble : C'est de froid.":CALL &BB06

screen must scramble a little

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sun Apr 28, 2019 10:24 am

hi

new demo that run only with crtc 1 and 512ko ram

https://cpcrulez.fr/demostestDO_post_scriptum.htm

work great on MiSTer Amstrad core !!!

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sat May 04, 2019 5:38 pm

hi

just see Supersly that said to test climax on mister …

http://www.cpc-power.com/index.php?page=detail&num=7701

losts a crtc bug and crash of the core

good burning test for crtc (have a version for crtc 2 too) !!!

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5069
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Amstrad CPC Core

Postby Sorgelig » Sun May 05, 2019 8:31 am

Probably with decapping the CRTC chip and full internal schematics, it will be possible to make a full replica of CRTC.
With currently available info and from hard guessing i've made everything i could for CRTC. I've rewrote it from scratch several times already. I'm not going to re-write it again. So, don't wait any CRTC fixes from me anymore. You are free to fix it further and submit the patches.
I'm done with it.

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sun May 05, 2019 8:50 am

as you say before i can report bug for future dev :cheers:

geta array is already decap

https://www.octoate.de/wp/tag/amstrad-40010/
http://www.cpcwiki.eu/forum/amstrad-cpc ... #msg170713

acid cpc+

http://www.cpcwiki.eu/index.php/Amstrad ... e#Pictures

no find crtc related info for decap sorry

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sat May 11, 2019 10:21 am


breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sat May 25, 2019 2:54 pm

hi

cpc core normaly write to dsk file no ?

if yes it seem to have a problem with this

http://www.cpc-power.com/index.php?page ... &num=16166

as it seem to read well track, writing is super fast and Nothing on dest dsk ...

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5069
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Amstrad CPC Core

Postby Sorgelig » Sat May 25, 2019 3:17 pm

Yes, core supports disk writing. But it may have problem handling some specific protected disks. Special copiers like this may use some undocumented features or very precise timings. Just don't use this app. It's pretty much useless for core. It's to copy real disks. Just copy dsk file to other file name - and it's done :)

tempus007
Atarian
Atarian
Posts: 9
Joined: Mon Mar 18, 2019 7:09 am

Re: Amstrad CPC Core

Postby tempus007 » Thu May 30, 2019 6:59 pm

I am new to MISTer.

Is it possible to replace in the Boot ROM OS6128 + BASIC1.1 by Azerty versions "keyboard fr" ?

BASIC1-1-AZERTY.ROM =>BASIC1-1.e00=>16ko

and

OS6128-AZERTY.rom=>OS6128.eZZ=>16k0

Thank you,

tempus007
Atarian
Atarian
Posts: 9
Joined: Mon Mar 18, 2019 7:09 am

Re: Amstrad CPC Core

Postby tempus007 » Thu May 30, 2019 7:00 pm

delete.

slingshot
Atari God
Atari God
Posts: 1128
Joined: Mon Aug 06, 2018 3:05 pm

Re: Amstrad CPC Core

Postby slingshot » Fri May 31, 2019 4:13 pm

breiztiger wrote:hi

cpc core normaly write to dsk file no ?

if yes it seem to have a problem with this

http://www.cpc-power.com/index.php?page ... &num=16166

as it seem to read well track, writing is super fast and Nothing on dest dsk ...


Probably it tries to format the track, which is not implemented.

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Sun Jun 30, 2019 3:16 pm

hi

when i set in mister.ini

video_mode_ntsc=8
video_mode_pal=9

Amstrad core run in NTSC (60hz) in hdmi but core report 50hz as it is in pal like my real cpc 6128 in france

scart is in 50hz scrolls are smooth

i have miss Something ?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5069
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Amstrad CPC Core

Postby Sorgelig » Mon Jul 01, 2019 4:26 am

breiztiger wrote:i have miss Something ?

vsync_adjust=2 ?

breiztiger
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: Amstrad CPC Core

Postby breiztiger » Mon Jul 01, 2019 5:48 am

yes

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5069
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Amstrad CPC Core

Postby Sorgelig » Tue Jul 02, 2019 8:26 pm

either i didn't understand your question, or you doing something wrong.


Return to “MiSTer”

Who is online

Users browsing this forum: culexus, digitron and 10 guests