Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Amstrad CPC] core #35

Closed
juri74 opened this issue Dec 18, 2016 · 27 comments
Closed

[Amstrad CPC] core #35

juri74 opened this issue Dec 18, 2016 · 27 comments

Comments

@juri74
Copy link

juri74 commented Dec 18, 2016

not an issue but just a request:
could be possible to "unlock" 15khz RGBS mode please?
thanks

@renaudhelias
Copy link
Contributor

renaudhelias commented Dec 18, 2016

Amstrad is using a 50Hz display, not interlaced. It cannot be scandoubler for mode 2 (lost of precision)

Using mist.ini scandoubler parameter, you can enable original signal output (SCART), but it was a blind development : some signal are ouput, but VSYNC/HSYNC offset are not confirmed.

I tested with my TV, but no way to run any 15kHz signals on it correctly (SNES doesn't run on it, same problem of display moving up), so I'm blind here. I have to validate a TV before validating my code...

Process generating TV signals is "aZRaEL_process" in
https://github.com/renaudhelias/CoreAmstrad/blob/master/BuildYourOwnZ80Computer/simple_GateArrayInterrupt.vhd
RED_out,GREEN_out, BLUE_out, HSYNC_out, VSYNC_out.

Another way of approach : compare signal with MAME's Amstrad core (if it does run correctly at 15kHz)

@juri74
Copy link
Author

juri74 commented Dec 20, 2016

sorry for late reply,
i noticed other cores uses a RGBS (RGB + COMPOSITE sync) for 15khz video signal, maybe the problem is that HV sync control..
unfortunately VHD is alien language for me :(

@harbaum
Copy link
Contributor

harbaum commented Dec 20, 2016

SCART TVs expect a composite sync. The VGAs vsync is connected the SCART pin used to detect a RGB signal and is constantly driven high. A TV will not cope with a video signal with separate H and V sync.

Bu tit's usually sufficient to xor hsync and vsync to get a csync acceptable for many TVs.

@juri74
Copy link
Author

juri74 commented Dec 21, 2016

But it's usually sufficient to xor hsync and vsync to get a csync acceptable for many
TVs.

@renaudhelias maybe could you give it a try?
thanks

@renaudhelias
Copy link
Contributor

Added to TODO-list
(TODO-list is here : http://www.cpcwiki.eu/index.php/FPGAmstrad#Effort_done)

@renaudhelias
Copy link
Contributor

renaudhelias commented Jan 27, 2017

http://github.com/mist-devel/mist-board/tree/master/tutorials/soc#lesson-11-15khz-tv-video could be fine to adapt first (50Hz/60Hz), as it I could begin by... validating my TV.

@juri74 lesson11's core (60Hz with separate V and H sync) does run correctly on your TV ?)

@renaudhelias
Copy link
Contributor

renaudhelias commented Jan 27, 2017

Hi @harbaum can you first align lesson11 60Hz 15kHz with unix "modeline" -parameters- command protocol ? (refactor) / "modeline" is an unix command showing all world screen/tv parameters for generating easily all world screen/tv signals...

@harbaum
Copy link
Contributor

harbaum commented Jan 27, 2017

@renaudhelias thanks for the hint. I'll have a look.

@renaudhelias
Copy link
Contributor

renaudhelias commented Mar 8, 2017

I saw in tutorial the use of xor for TV output, so then I try it at home, my TV sucks @15khz.

So I put a try by here : https://github.com/mist-devel/mist-binaries/tree/master/cores/amstrad/experimental

@juri74 perhaps you can try theses not-tested version (4 alternates).

@squidrpi
Copy link
Contributor

squidrpi commented Mar 10, 2017

@renaudhelias, if you point me to your source code changes for these 15khz tests I can have a look. I've done quite a lot of 15khz work recently and can test it properly.

@renaudhelias
Copy link
Contributor

Amstrad is 50Hz

Candidate patchs are here (one is inversing the output signal...) :

Component concerned is :
http://github.com/renaudhelias/CoreAmstrad/blob/master/BuildYourOwnZ80Computer/MiST_SCART.vhd
This MiST_SCART.vhd component does use the mist.ini feature http://github.com/mist-devel/mist-binaries/blob/master/cores/amstrad/experimental/mist.ini scandoubler_disable=1

Another component can be patched also :
http://github.com/renaudhelias/CoreAmstrad/blob/master/BuildYourOwnZ80Computer/simple_GateArrayInterrupt.vhd
My second patch is not a great one (xorTV2 and xor2TV2 alternative), I did just try hacking the "HSYNC_out" output (used for TV signal) by here
In this last component simple_GateArrayInterrupt.vhd you'll find the TV signal output generation :

  • RED_out : out STD_LOGIC_VECTOR (5 downto 0);
  • GREEN_out : out STD_LOGIC_VECTOR (5 downto 0);
  • BLUE_out : out STD_LOGIC_VECTOR (5 downto 0);
  • HSYNC_out : out STD_logic;
  • VSYNC_out : out STD_logic

@renaudhelias
Copy link
Contributor

If you never tryed CoreAmstrad all is explain here http://github.com/mist-devel/mist-board/wiki/CoreDocAmstrad#installation (you can contact me also : renaudhelias at gmail dot com)

@squidrpi
Copy link
Contributor

Having a quick look this one looks correct to create the csync. I can't check properly until I get home and test the cores and see what signals are being generated.

See my quick conversion changes of TCA2600 here. Specifically:
VGA_HS <= not (vga_hsync_i xor vga_vsync_i) when tv15khz='1' else vga_hsync_i;
VGA_VS <= '1' when tv15khz='1' else vga_vsync_i;

@juri74
Copy link
Author

juri74 commented Mar 10, 2017

hello @renaudhelias ,

my wife is at the hospital i do not have time to try at the moment sorry :(
i will publish your test link on my fb page and let other mist users to try it out.
thanks for your effort!!

EDIT 1: sony trinitron 21 inches (PAL TV but it support ntsc and pal60)
170308 r005.8.14e xorTv: image displayed with some disturbs & rolling up
170308 r005.8.14e xor tv 2: image displayed with some disturbs, off center on the left & rolling up
other two experimental cores: black screen

@renaudhelias
Copy link
Contributor

renaudhelias commented Mar 22, 2017

amstrad_170308_r005.8.14e_xorTV will be integrated in next realise.
DrOG from atari-forum succeeded in running with it. I think last problem is about VSYNC/HSYNC signal length.
471amstrad_170308_r005 8

"Unfortunatley no F12-menu"

bernouilli from atari-forum did succeed also using amstrad_170308_r005.8.14e_xorTV, he said that amstrad_170308_r005.8.14e_xorTV2 is better centered (r005.8.14e_xorTV2 does correct a delay of RGB output versus HSYNC/VSYNC output, passing signal throw the same number of components, but it's a "no brain" version)
amstrad_170308_r005.8.14e_xorTV2 :
384705img3669

amstrad_170308_r005.8.14e_xorTV :
amstrad_170308_r005 8 14e_xortv
Offset seems needed, both in VSYNC and HSYNC.

@juri74
Copy link
Author

juri74 commented Mar 23, 2017

great!

@renaudhelias
Copy link
Contributor

renaudhelias commented Mar 23, 2017

amstrad_170323_r005.8.15c12.rbf published (for ones of atari-forum), normally does resolve OSD in TV mode. It's candidate 12 because I'm currently working on next version (FDC)

Return : OSD is OK.

@KLNHOMEALONE
Copy link

Please add AMX mouse support if possible

@renaudhelias
Copy link
Contributor

amstrad_170328_r005.8.15c16e.rbf published "applying Gerald HSYNC/VSYNC width formula"

@renaudhelias
Copy link
Contributor

@KLNHOMEALONE added to TODO-list (http://www.cpcwiki.eu/index.php/FPGAmstrad)

@renaudhelias
Copy link
Contributor

"Perfect and well-centered!" - DrOG
ok

@renaudhelias
Copy link
Contributor

I've got a TV !
PAL 50Hz 15KHz Parrot test ( https://github.com/mist-devel/mist-board/blob/master/tutorials/soc/lesson11/lesson11.png ) does pass on it, but CoreAmstrad doesn't.
I'll refactor Parrot test into modeline and then in a second step will try to adapt it to CoreAmstrad output :)

@renaudhelias
Copy link
Contributor

I compare HSYNC/VSYNC width with Parrot test, it results this experimental version : cores/amstrad/amstrad_170507_r005.8.14.2e.rbf (not tested)

@renaudhelias
Copy link
Contributor

Ok, back from Tetalab laboratory.
tvoutputok
r005.8.14.2e.rbf does run fine, one char or one half-char h-offset in left (screen not horizontally centered)
tvoutput_strangehalfcharhdisp
All chars are displayed, but HDISP does come too early and go away too later : about one half-char each.
tvoutputhvbordersize4
Ignoring the two previous bugs. Border seems having a 4 chars size (H and V)

@renaudhelias
Copy link
Contributor

amstrad_170507_r005.8.14.2j.rbf TV mode with borders (not tested)

@renaudhelias
Copy link
Contributor

r005.8.14.2j OK for me, just an half-char offset of HDISP (cutting chars at right) but border limits OK.
Tryed also with another TV (same model but image not stable verticaly (blurred screen))
r005 8 14 2j-boot
mamouth

@renaudhelias
Copy link
Contributor

r005.8.14.2 realized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants