Discussion:
Scanlines effect for the Atari 800XL core
jugac64-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-16 16:44:24 UTC
Permalink
Hi Mark!


Would it be possible you add scanlines effects to the Atari 800XL core?


You can see how the image looks on the C64 core with the scanlines effect activated. The VGA image looks much more retro with them, especially with the LCD/TFT/LED monitors most of us use.


Which VGA resolutions will support the a8 core on PAL and NTSC?



Thanks! BR, Juan
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-16 17:27:01 UTC
Permalink
On Wednesday, 16 July 2014, jugac64-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:
>
> Would it be possible you add scanlines effects to the Atari 800XL core?
>
It looks much better on a real CRT:) Maybe I can be convinced to have a
build with a /2 on every other line in the scandoubler!

Though rather than every core doing this...

> Which VGA resolutions will support the a8 core on PAL and NTSC?
>
The a8 core itself outputs RGB with PAL/NTSC timings. I will plug in my
scandoubler component, more lcd monitors handle the higher resolution
better.

Unfortunately some monitors do not like vsync <56Hz, but ones that do
aren't hard to find.
jugac64-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-17 16:00:48 UTC
Permalink
Thanks Mark for your answer.

About this:


The a8 core itself outputs RGB with PAL/NTSC timings. I will plug in my scandoubler component, more lcd monitors handle the higher resolution better.



Does the a8 core output to the same resolution of the Minimig core?


The Minimig and Spectrum cores output PAL to 50Hz, to some resolution I don't remember now, but my LCD monitor (and I guess many others) works well with them.


BR! Juan
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-17 16:37:00 UTC
Permalink
On Thursday, 17 July 2014, jugac64-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:
>
> Does the a8 core output to the same resolution of the Minimig core?
>
> The Minimig and Spectrum cores output PAL to 50Hz, to some resolution I
> don't remember now, but my LCD monitor (and I guess many others) works well
> with them.
>

Yep exactly. It will work where they work, if I've got it right!
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-17 20:50:12 UTC
Permalink
On 17 July 2014 18:37, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:

> On Thursday, 17 July 2014, jugac64-***@public.gmane.org [chameleon_64] <
> chameleon_64-***@public.gmane.org> wrote:
>>
>> Does the a8 core output to the same resolution of the Minimig core?
>>
>> The Minimig and Spectrum cores output PAL to 50Hz, to some resolution I
>> don't remember now, but my LCD monitor (and I guess many others) works well
>> with them.
>>
>
> Yep exactly. It will work where they work, if I've got it right!
>

Just wanted to add...
sdram working (Thanks Jens)
sd card working
scan doubler connected
So just a few bugs to fix then I'll put it out. Most likely tomorrow :-)
jugac64-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-17 21:41:23 UTC
Permalink
Wonderful! I will be playing Star Raiders and The Last Starfighter very soon on my Chameleon 64 :-)
'Tom Bonucchi' tombonucchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-17 22:15:54 UTC
Permalink
Sweet!
-----Original Message-----
From: "***@gmail.com [chameleon_64]" <***@yahoogroups.com>
Sender: ***@yahoogroups.com
Date: 17 Jul 2014 14:41:23
To: <***@yahoogroups.com>
Reply-To: ***@yahoogroups.com
Subject: Re: [chameleon_64] Scanlines effect for the Atari 800XL core

Wonderful! I will be playing Star Raiders and The Last Starfighter very soon on my Chameleon 64 :-)
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 00:05:23 UTC
Permalink
Great news! Looking forward to it.

Just wondering: will it support native c64 joystick ports ? There is one
minimig which core does, whereas the speccy cores are sadly lacking
joystick support, making gameplay just a tad less enjoyable:)




On Fri, Jul 18, 2014 at 12:15 AM, 'Tom Bonucchi' tombonucchi-***@public.gmane.org
[chameleon_64] <chameleon_64-***@public.gmane.org> wrote:

>
>
> Sweet!
> ------------------------------
> *From: * "jugac64-***@public.gmane.org [chameleon_64]" <chameleon_64-***@public.gmane.org>
>
> *Sender: * chameleon_64-***@public.gmane.org
> *Date: *17 Jul 2014 14:41:23 -0700
> *To: *<chameleon_64-***@public.gmane.org>
> *ReplyTo: * chameleon_64-***@public.gmane.org
> *Subject: *Re: [chameleon_64] Scanlines effect for the Atari 800XL core
>
>
>
> Wonderful! I will be playing Star Raiders and The Last Starfighter very
> soon on my Chameleon 64 :-)
>
>
>
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-18 06:26:54 UTC
Permalink
On Friday, 18 July 2014, fierman fierman-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

>
>
> Great news! Looking forward to it.
>
> Just wondering: will it support native c64 joystick ports ? There is one
> minimig which core does, whereas the speccy cores are sadly lacking
> joystick support, making gameplay just a tad less enjoyable:)
>

Well at least for the Speecy most games didn't need joystick. Everyone used
keys.

First release will support docking station joystick ports only.

Later, soon I hope, I'll add c64 keyboard and joystick support. Be
interesting to see if the C64 CIA keyboard/joystick overlap causes any
Atari games problems. Jens explained how to read C64 registers, such as the
CIA, however I do not have a C64 to test with. Anyone in Switzerland here
who wants to sell me a C64? :)
Paul Förster paul_r_foerster-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 08:51:43 UTC
Permalink
Hi Mark,

On 18. Jul, 2014, at 08:26, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
> Anyone in Switzerland here who wants to sell me a C64? :)

look at www.ricardo.ch which is kind of a swiss equivalent to Ebay. A C64 shows up there from time to time. You'll need an account of course. Account verification is done by snail mail. This means, it takes a week or so after registration on the website until you can actually buy or sell. Most Swiss people buy/sell there. They don't like Ebay here in Switzerland because of high import/export charges. Still, Ebay is there too, of course. :-P
--
cul8er

Paul
paul_r_foerster-/***@public.gmane.org



------------------------------------
Posted by: =?iso-8859-1?Q?Paul_F=F6rster?= <paul_r_foerster-/***@public.gmane.org>
------------------------------------
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-18 09:52:43 UTC
Permalink
Thanks Paul. I'll check out ricardo.ch.
>
>
Just one thought on kb/joy access... Doesn't the C64 OS poll the CIA
periodically? So I could just snoop the bus to read it, rather than
attempting, slightly trickier, DMA reads?
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 11:21:58 UTC
Permalink
I might be completely wrong here (don't understand that much of vhdl, so
please pardon me if I am wrong indeed), but Peter Wendrich wrote a module
which does exactly what you need:
https://github.com/robinsonb5/minimig_c3/blob/master/ChameleonRTL/chameleon_io.vhd

(o, and i would be happy to donate a c64 if needed, it is just that
shipping would be a tad expensive)


On Fri, Jul 18, 2014 at 11:52 AM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64] <chameleon_64-***@public.gmane.org> wrote:

>
>
> Thanks Paul. I'll check out ricardo.ch.
>
>>
> Just one thought on kb/joy access... Doesn't the C64 OS poll the CIA
> periodically? So I could just snoop the bus to read it, rather than
> attempting, slightly trickier, DMA reads?
>
>
>
Tobias tobias-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-18 11:28:46 UTC
Permalink
Am Freitag, 18. Juli 2014, 13:21:58 schrieben Sie:
> I might be completely wrong here (don't understand that much of vhdl, so
> please pardon me if I am wrong indeed), but Peter Wendrich wrote a module
> which does exactly what you need:
> https://github.com/robinsonb5/minimig_c3/blob/master/ChameleonRTL/chameleon_
> io.vhd

correct... if you use the io module, joystick and keyboard should work,
regardless if in standalone, dockingstation or cartridge mode (and use the C64
keyboard/joysticks)

--
http://www.icomp.de http://wiki.icomp.de


------------------------------------
Posted by: Tobias <tobias-S0d+***@public.gmane.org>
------------------------------------
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 11:44:27 UTC
Permalink
Just checked postage tariffs, shipping a c64 would cost around 33 euro.
Which is no problem for me really, but a bit too much if you could pick up
a c64 locally for 10 euro. (imho they arent worth that much more :))


Mark: please let me know whether you would be needing one if you can't find
a c64 in your area, and I will ship one. (no fancy setup, just a c64c with
psu. )


>
>
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-18 12:22:27 UTC
Permalink
Awesome. I'll plug that io module in tonight.
>
>
I'll test with the docking station and then one brave sole here can see if
it fries their C64 and/or Chameleon:)

Thanks for the kind offer of the C64. Lets see if it 'just runs' first with
this module.
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-18 20:37:22 UTC
Permalink
On 18 July 2014 13:22, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:

> Awesome. I'll plug that io module in tonight.


I plugged this module in. All still works and CDTV remote works. Hopefully
C64 stick will also work - I enabled the option, but can't test it.

I'm just doing a build to release but noticed a problem when I flashed a
release candidate using chaco. If I upload the sof over jtag it works fine
every time. If I flash the rbf then 'start core' from chaco it starts the
2nd time! If I select it from the menu then it fails. The failure seems to
be that it can't load the ROM from the SD card. i.e. something isn't reset
properly and the sd card init fails.

Will have a think but I'm not sure what is different between the two
methods. I am taking my reset signal from the pll locked line.

I added scan lines toggled on the freeze button, but need to debounce I
think...
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-18 21:23:10 UTC
Permalink
On 18 July 2014 21:37, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:

> On 18 July 2014 13:22, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>
>> Awesome. I'll plug that io module in tonight.
>
>
> I plugged this module in. All still works and CDTV remote works. Hopefully
> C64 stick will also work - I enabled the option, but can't test it.
>
> I'm just doing a build to release but noticed a problem when I flashed a
> release candidate using chaco. If I upload the sof over jtag it works fine
> every time. If I flash the rbf then 'start core' from chaco it starts the
> 2nd time! If I select it from the menu then it fails. The failure seems to
> be that it can't load the ROM from the SD card. i.e. something isn't reset
> properly and the sd card init fails.
>
> Will have a think but I'm not sure what is different between the two
> methods. I am taking my reset signal from the pll locked line.
>
> I added scan lines toggled on the freeze button, but need to debounce I
> think...
>

I put the build online 'as is' for now.
sof/rbf files: http://www.scrameta.net/autobuild/20140718/chameleon/
code: http://www.scrameta.net/atarixlfpga_svn/trunk/atari_800xl/chameleon/

PAL_VGA or PAL_NTSC are probably the version you want. The RGB ones are
15KHz and the CS ones have composite on hsync (for my HD CRT :-)).

It runs well, but the big problem remains. i.e. Need to run 'start core'
twice from chaco! It also won't start from the menu:-(

For some reason sd is working from the .sof but not on first run of the
.rbf. Any ideas what could cause this?
jugac64-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 21:33:24 UTC
Permalink
Thank you very much Mark!


No problem on starting it from Chaco, it is the first release!


I am happy that the Chameleon is first on the list :-)


chameleon/ 2014-07-18 22:22
de1/ 2014-07-18 22:20
nstructions.txt 2014-07-18 22:22 4.0K
log 2014-07-18 22:22 17K
mcc216/ 2014-07-18 22:20
mist/ 2014-07-18 22:20
replay/ 2014-07-18 22:20
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 22:15:08 UTC
Permalink
Thank you for the build.
Contrary to your problems , the core starts fine from the menu here. Also
when connected to the c64. (flashed the .rbf in slot 14 )

Sadly the joystick does not appear to work though.. (neither in port 1,
neither in port2), and since the a8 core menu needs joystick, I can't tell
whether the c64 joyports are completely disfunctional, or just in the menu.





On Fri, Jul 18, 2014 at 11:23 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64] <chameleon_64-***@public.gmane.org> wrote:

>
>
> On 18 July 2014 21:37, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>
>> On 18 July 2014 13:22, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>>
>>> Awesome. I'll plug that io module in tonight.
>>
>>
>> I plugged this module in. All still works and CDTV remote works.
>> Hopefully C64 stick will also work - I enabled the option, but can't test
>> it.
>>
>> I'm just doing a build to release but noticed a problem when I flashed a
>> release candidate using chaco. If I upload the sof over jtag it works fine
>> every time. If I flash the rbf then 'start core' from chaco it starts the
>> 2nd time! If I select it from the menu then it fails. The failure seems to
>> be that it can't load the ROM from the SD card. i.e. something isn't reset
>> properly and the sd card init fails.
>>
>> Will have a think but I'm not sure what is different between the two
>> methods. I am taking my reset signal from the pll locked line.
>>
>> I added scan lines toggled on the freeze button, but need to debounce I
>> think...
>>
>
> I put the build online 'as is' for now.
> sof/rbf files: http://www.scrameta.net/autobuild/20140718/chameleon/
> code: http://www.scrameta.net/atarixlfpga_svn/trunk/atari_800xl/chameleon/
>
> PAL_VGA or PAL_NTSC are probably the version you want. The RGB ones are
> 15KHz and the CS ones have composite on hsync (for my HD CRT :-)).
>
> It runs well, but the big problem remains. i.e. Need to run 'start core'
> twice from chaco! It also won't start from the menu:-(
>
> For some reason sd is working from the .sof but not on first run of the
> .rbf. Any ideas what could cause this?
>
>
>
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 23:43:08 UTC
Permalink
Anyway, apart from the joystick issue and the numerous obvious non-finished
parts, I am very impressed. Been 10 years ago since I last switched on my
a8, and after just watching Numen/taquart , I can only conclude that your
core does a8 all the way and beyond, pixel perfect. Thanks!


On Sat, Jul 19, 2014 at 12:15 AM, fierman <fierman-***@public.gmane.org> wrote:

> Thank you for the build.
> Contrary to your problems , the core starts fine from the menu here. Also
> when connected to the c64. (flashed the .rbf in slot 14 )
>
> Sadly the joystick does not appear to work though.. (neither in port 1,
> neither in port2), and since the a8 core menu needs joystick, I can't tell
> whether the c64 joyports are completely disfunctional, or just in the menu.
>
>
>
>
>
> On Fri, Jul 18, 2014 at 11:23 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
> [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
>
>>
>>
>> On 18 July 2014 21:37, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>>
>>> On 18 July 2014 13:22, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>>>
>>>> Awesome. I'll plug that io module in tonight.
>>>
>>>
>>> I plugged this module in. All still works and CDTV remote works.
>>> Hopefully C64 stick will also work - I enabled the option, but can't test
>>> it.
>>>
>>> I'm just doing a build to release but noticed a problem when I flashed a
>>> release candidate using chaco. If I upload the sof over jtag it works fine
>>> every time. If I flash the rbf then 'start core' from chaco it starts the
>>> 2nd time! If I select it from the menu then it fails. The failure seems to
>>> be that it can't load the ROM from the SD card. i.e. something isn't reset
>>> properly and the sd card init fails.
>>>
>>> Will have a think but I'm not sure what is different between the two
>>> methods. I am taking my reset signal from the pll locked line.
>>>
>>> I added scan lines toggled on the freeze button, but need to debounce I
>>> think...
>>>
>>
>> I put the build online 'as is' for now.
>> sof/rbf files: http://www.scrameta.net/autobuild/20140718/chameleon/
>> code:
>> http://www.scrameta.net/atarixlfpga_svn/trunk/atari_800xl/chameleon/
>>
>> PAL_VGA or PAL_NTSC are probably the version you want. The RGB ones are
>> 15KHz and the CS ones have composite on hsync (for my HD CRT :-)).
>>
>> It runs well, but the big problem remains. i.e. Need to run 'start core'
>> twice from chaco! It also won't start from the menu:-(
>>
>> For some reason sd is working from the .sof but not on first run of the
>> .rbf. Any ideas what could cause this?
>>
>>
>>
>
>
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-19 10:23:41 UTC
Permalink
On 18 July 2014 23:15, fierman fierman-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

> Thank you for the build.
> Contrary to your problems , the core starts fine from the menu here. Also
> when connected to the c64. (flashed the .rbf in slot 14 )
>
> Sadly the joystick does not appear to work though.. (neither in port 1,
> neither in port2), and since the a8 core menu needs joystick, I can't tell
> whether the c64 joyports are completely disfunctional, or just in the menu.
>

Weird it starts for you from the menu. I've tried several things and had no
luck:
i) Change reset logic to match minimig core
ii) Added a delay before I start using spi (1 second!)
iii) Initialize the mmc and extra time.
No luck with any of them:-(

I guess I need to connect up the logic analzyer to the sd card pins to see
what is going on...

As for the c64 joystick. This chameleon_io is supposed to send me the c64
joystick or docking station joystick as appropriate. I can't see anything
I've connected up wrong. I have the '4 port' support disabled, perhaps that
breaks it. Hmmm. Anyway Paul has kindly found me a C64 so I'll be able to
test it in a week or two.
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-19 11:32:45 UTC
Permalink
On 19 July 2014 12:23, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:

> On 18 July 2014 23:15, fierman fierman-***@public.gmane.org [chameleon_64] <
> chameleon_64-***@public.gmane.org> wrote:
>
>> Thank you for the build.
>> Contrary to your problems , the core starts fine from the menu here. Also
>> when connected to the c64. (flashed the .rbf in slot 14 )
>>
>> Sadly the joystick does not appear to work though.. (neither in port 1,
>> neither in port2), and since the a8 core menu needs joystick, I can't tell
>> whether the c64 joyports are completely disfunctional, or just in the menu.
>>
>
> Weird it starts for you from the menu. I've tried several things and had
> no luck:
> i) Change reset logic to match minimig core
> ii) Added a delay before I start using spi (1 second!)
> iii) Initialize the mmc and extra time.
> No luck with any of them:-(
>
> I guess I need to connect up the logic analzyer to the sd card pins to see
> what is going on...
>
> As for the c64 joystick. This chameleon_io is supposed to send me the c64
> joystick or docking station joystick as appropriate. I can't see anything
> I've connected up wrong. I have the '4 port' support disabled, perhaps that
> breaks it. Hmmm. Anyway Paul has kindly found me a C64 so I'll be able to
> test it in a week or two.
>

Well I captured the traces and there is nothing obvious, except the SD card
communication itself does not progress as I'd expect. Gets stuck where it
normally starts with the data transfers. However the signals to the card
prior to that look fine. I need to take this logic analyser capture and
decode/figure it out...

Anyway... I switched SD card and a different one works first time, from the
menu etc.

So it seems that my init code does not work for some sd cards, when they
are in the state left in by the Chameleon menu. Hmmm.
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-19 11:43:44 UTC
Permalink
There have been issues reported in the past regarding sd card
compatibility, unavoidable I guess. Not your fault:)

Regarding native c64 joysticks: looks like you not only disabled the
4-player adapter (which was not enabled in the minimig core either, so not
needed), but the c64 itself as well.
line 121 in chameleon_io :
enable_c64_joykeyb : boolean := false;

Just built a new core (thanks for the build script, useful!) , which
started fine, but still no joy support.

No rush I guess:)





On Sat, Jul 19, 2014 at 1:32 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64] <chameleon_64-***@public.gmane.org> wrote:

>
>
> On 19 July 2014 12:23, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>
>> On 18 July 2014 23:15, fierman fierman-***@public.gmane.org [chameleon_64] <
>> chameleon_64-***@public.gmane.org> wrote:
>>
>>> Thank you for the build.
>>> Contrary to your problems , the core starts fine from the menu here.
>>> Also when connected to the c64. (flashed the .rbf in slot 14 )
>>>
>>> Sadly the joystick does not appear to work though.. (neither in port 1,
>>> neither in port2), and since the a8 core menu needs joystick, I can't tell
>>> whether the c64 joyports are completely disfunctional, or just in the menu.
>>>
>>
>> Weird it starts for you from the menu. I've tried several things and had
>> no luck:
>> i) Change reset logic to match minimig core
>> ii) Added a delay before I start using spi (1 second!)
>> iii) Initialize the mmc and extra time.
>> No luck with any of them:-(
>>
>> I guess I need to connect up the logic analzyer to the sd card pins to
>> see what is going on...
>>
>> As for the c64 joystick. This chameleon_io is supposed to send me the c64
>> joystick or docking station joystick as appropriate. I can't see anything
>> I've connected up wrong. I have the '4 port' support disabled, perhaps that
>> breaks it. Hmmm. Anyway Paul has kindly found me a C64 so I'll be able to
>> test it in a week or two.
>>
>
> Well I captured the traces and there is nothing obvious, except the SD
> card communication itself does not progress as I'd expect. Gets stuck where
> it normally starts with the data transfers. However the signals to the card
> prior to that look fine. I need to take this logic analyser capture and
> decode/figure it out...
>
> Anyway... I switched SD card and a different one works first time, from
> the menu etc.
>
> So it seems that my init code does not work for some sd cards, when they
> are in the state left in by the Chameleon menu. Hmmm.
>
>
>
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-19 12:00:39 UTC
Permalink
There must be a better way of resetting it. I think I'll add a check if it
failed, wait 100us then retry. It works manually with a 5 second wait so
should work I hope!

You need to change it in atari800core_chameleon where I do generic map, not
in the chameleon io file. That is just the default value. Try enabling the
4 player mode too and see if it works.

Mark


On 19 July 2014 13:43, fierman fierman-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

>
>
> There have been issues reported in the past regarding sd card
> compatibility, unavoidable I guess. Not your fault:)
>
> Regarding native c64 joysticks: looks like you not only disabled the
> 4-player adapter (which was not enabled in the minimig core either, so not
> needed), but the c64 itself as well.
> line 121 in chameleon_io :
> enable_c64_joykeyb : boolean := false;
>
> Just built a new core (thanks for the build script, useful!) , which
> started fine, but still no joy support.
>
> No rush I guess:)
>
>
>
>
>
> On Sat, Jul 19, 2014 at 1:32 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
> [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
>
>>
>>
>> On 19 July 2014 12:23, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>>
>>> On 18 July 2014 23:15, fierman fierman-***@public.gmane.org [chameleon_64] <
>>> chameleon_64-***@public.gmane.org> wrote:
>>>
>>>> Thank you for the build.
>>>> Contrary to your problems , the core starts fine from the menu here.
>>>> Also when connected to the c64. (flashed the .rbf in slot 14 )
>>>>
>>>> Sadly the joystick does not appear to work though.. (neither in port 1,
>>>> neither in port2), and since the a8 core menu needs joystick, I can't tell
>>>> whether the c64 joyports are completely disfunctional, or just in the menu.
>>>>
>>>
>>> Weird it starts for you from the menu. I've tried several things and had
>>> no luck:
>>> i) Change reset logic to match minimig core
>>> ii) Added a delay before I start using spi (1 second!)
>>> iii) Initialize the mmc and extra time.
>>> No luck with any of them:-(
>>>
>>> I guess I need to connect up the logic analzyer to the sd card pins to
>>> see what is going on...
>>>
>>> As for the c64 joystick. This chameleon_io is supposed to send me the
>>> c64 joystick or docking station joystick as appropriate. I can't see
>>> anything I've connected up wrong. I have the '4 port' support disabled,
>>> perhaps that breaks it. Hmmm. Anyway Paul has kindly found me a C64 so I'll
>>> be able to test it in a week or two.
>>>
>>
>> Well I captured the traces and there is nothing obvious, except the SD
>> card communication itself does not progress as I'd expect. Gets stuck where
>> it normally starts with the data transfers. However the signals to the card
>> prior to that look fine. I need to take this logic analyser capture and
>> decode/figure it out...
>>
>> Anyway... I switched SD card and a different one works first time, from
>> the menu etc.
>>
>> So it seems that my init code does not work for some sd cards, when they
>> are in the state left in by the Chameleon menu. Hmmm.
>>
>>
>
>
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-19 12:54:50 UTC
Permalink
Enabled 4player in atari800core_chameleon, to no avail. I do somehow have
the idea there are no references to the c64 joysticks, joystick1/4 are only
referred to docking_joystick in there. Adding c64 entries did not help much.
But like said before: i have not that much vhdl experience, so it's a
hit&miss debugging for me really:)

Also, regarding the sd card: the zx spectrum cores fail _always_ on sd card
on cold boot. The user has to manually reset the sd line there to get it
working.


On Sat, Jul 19, 2014 at 2:00 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64] <chameleon_64-***@public.gmane.org> wrote:

>
>
> There must be a better way of resetting it. I think I'll add a check if it
> failed, wait 100us then retry. It works manually with a 5 second wait so
> should work I hope!
>
> You need to change it in atari800core_chameleon where I do generic map,
> not in the chameleon io file. That is just the default value. Try enabling
> the 4 player mode too and see if it works.
>
> Mark
>
>
>
> On 19 July 2014 13:43, fierman fierman-***@public.gmane.org [chameleon_64] <
> chameleon_64-***@public.gmane.org> wrote:
>
>>
>>
>> There have been issues reported in the past regarding sd card
>> compatibility, unavoidable I guess. Not your fault:)
>>
>> Regarding native c64 joysticks: looks like you not only disabled the
>> 4-player adapter (which was not enabled in the minimig core either, so not
>> needed), but the c64 itself as well.
>> line 121 in chameleon_io :
>> enable_c64_joykeyb : boolean := false;
>>
>> Just built a new core (thanks for the build script, useful!) , which
>> started fine, but still no joy support.
>>
>> No rush I guess:)
>>
>>
>>
>>
>>
>> On Sat, Jul 19, 2014 at 1:32 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
>> [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
>>
>>>
>>>
>>> On 19 July 2014 12:23, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>>>
>>>> On 18 July 2014 23:15, fierman fierman-***@public.gmane.org [chameleon_64] <
>>>> chameleon_64-***@public.gmane.org> wrote:
>>>>
>>>>> Thank you for the build.
>>>>> Contrary to your problems , the core starts fine from the menu here.
>>>>> Also when connected to the c64. (flashed the .rbf in slot 14 )
>>>>>
>>>>> Sadly the joystick does not appear to work though.. (neither in port
>>>>> 1, neither in port2), and since the a8 core menu needs joystick, I can't
>>>>> tell whether the c64 joyports are completely disfunctional, or just in the
>>>>> menu.
>>>>>
>>>>
>>>> Weird it starts for you from the menu. I've tried several things and
>>>> had no luck:
>>>> i) Change reset logic to match minimig core
>>>> ii) Added a delay before I start using spi (1 second!)
>>>> iii) Initialize the mmc and extra time.
>>>> No luck with any of them:-(
>>>>
>>>> I guess I need to connect up the logic analzyer to the sd card pins to
>>>> see what is going on...
>>>>
>>>> As for the c64 joystick. This chameleon_io is supposed to send me the
>>>> c64 joystick or docking station joystick as appropriate. I can't see
>>>> anything I've connected up wrong. I have the '4 port' support disabled,
>>>> perhaps that breaks it. Hmmm. Anyway Paul has kindly found me a C64 so I'll
>>>> be able to test it in a week or two.
>>>>
>>>
>>> Well I captured the traces and there is nothing obvious, except the SD
>>> card communication itself does not progress as I'd expect. Gets stuck where
>>> it normally starts with the data transfers. However the signals to the card
>>> prior to that look fine. I need to take this logic analyser capture and
>>> decode/figure it out...
>>>
>>> Anyway... I switched SD card and a different one works first time, from
>>> the menu etc.
>>>
>>> So it seems that my init code does not work for some sd cards, when they
>>> are in the state left in by the Chameleon menu. Hmmm.
>>>
>>>
>>
>
>
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-19 13:01:01 UTC
Permalink
In the io module it combines them in theory with:
joystick1 <= docking_joystick1 and ("1" & c64_joystick1);
joystick2 <= docking_joystick2 and ("1" & c64_joystick2);
joystick3 <= docking_joystick3 and ("1" & c64_joystick3);
joystick4 <= docking_joystick4 and ("1" & c64_joystick4);

I wonder if my 1MHz clock needs to be more precise...

Regarding SD cards - I made my failing card init 'first time' using init,
read sector 1 (fails), wait 100us, init! So I'll see which parts of that I
can improve:-)


On 19 July 2014 14:54, fierman fierman-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

>
>
> Enabled 4player in atari800core_chameleon, to no avail. I do somehow have
> the idea there are no references to the c64 joysticks, joystick1/4 are only
> referred to docking_joystick in there. Adding c64 entries did not help much.
> But like said before: i have not that much vhdl experience, so it's a
> hit&miss debugging for me really:)
>
> Also, regarding the sd card: the zx spectrum cores fail _always_ on sd
> card on cold boot. The user has to manually reset the sd line there to get
> it working.
>
>
> On Sat, Jul 19, 2014 at 2:00 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
> [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
>
>>
>>
>> There must be a better way of resetting it. I think I'll add a check if
>> it failed, wait 100us then retry. It works manually with a 5 second wait so
>> should work I hope!
>>
>> You need to change it in atari800core_chameleon where I do generic map,
>> not in the chameleon io file. That is just the default value. Try enabling
>> the 4 player mode too and see if it works.
>>
>> Mark
>>
>>
>>
>> On 19 July 2014 13:43, fierman fierman-***@public.gmane.org [chameleon_64] <
>> chameleon_64-***@public.gmane.org> wrote:
>>
>>>
>>>
>>> There have been issues reported in the past regarding sd card
>>> compatibility, unavoidable I guess. Not your fault:)
>>>
>>> Regarding native c64 joysticks: looks like you not only disabled the
>>> 4-player adapter (which was not enabled in the minimig core either, so not
>>> needed), but the c64 itself as well.
>>> line 121 in chameleon_io :
>>> enable_c64_joykeyb : boolean := false;
>>>
>>> Just built a new core (thanks for the build script, useful!) , which
>>> started fine, but still no joy support.
>>>
>>> No rush I guess:)
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Jul 19, 2014 at 1:32 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
>>> [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
>>>
>>>>
>>>>
>>>> On 19 July 2014 12:23, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
>>>>
>>>>> On 18 July 2014 23:15, fierman fierman-***@public.gmane.org [chameleon_64] <
>>>>> chameleon_64-***@public.gmane.org> wrote:
>>>>>
>>>>>> Thank you for the build.
>>>>>> Contrary to your problems , the core starts fine from the menu here.
>>>>>> Also when connected to the c64. (flashed the .rbf in slot 14 )
>>>>>>
>>>>>> Sadly the joystick does not appear to work though.. (neither in port
>>>>>> 1, neither in port2), and since the a8 core menu needs joystick, I can't
>>>>>> tell whether the c64 joyports are completely disfunctional, or just in the
>>>>>> menu.
>>>>>>
>>>>>
>>>>> Weird it starts for you from the menu. I've tried several things and
>>>>> had no luck:
>>>>> i) Change reset logic to match minimig core
>>>>> ii) Added a delay before I start using spi (1 second!)
>>>>> iii) Initialize the mmc and extra time.
>>>>> No luck with any of them:-(
>>>>>
>>>>> I guess I need to connect up the logic analzyer to the sd card pins to
>>>>> see what is going on...
>>>>>
>>>>> As for the c64 joystick. This chameleon_io is supposed to send me the
>>>>> c64 joystick or docking station joystick as appropriate. I can't see
>>>>> anything I've connected up wrong. I have the '4 port' support disabled,
>>>>> perhaps that breaks it. Hmmm. Anyway Paul has kindly found me a C64 so I'll
>>>>> be able to test it in a week or two.
>>>>>
>>>>
>>>> Well I captured the traces and there is nothing obvious, except the SD
>>>> card communication itself does not progress as I'd expect. Gets stuck where
>>>> it normally starts with the data transfers. However the signals to the card
>>>> prior to that look fine. I need to take this logic analyser capture and
>>>> decode/figure it out...
>>>>
>>>> Anyway... I switched SD card and a different one works first time, from
>>>> the menu etc.
>>>>
>>>> So it seems that my init code does not work for some sd cards, when
>>>> they are in the state left in by the Chameleon menu. Hmmm.
>>>>
>>>>
>>>
>>
>
>
Jens Schoenfeld jens-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-19 14:50:01 UTC
Permalink
Am 19.07.2014 15:01, schrieb Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64]:
> Regarding SD cards - I made my failing card init 'first time' using
> init, read sector 1 (fails), wait 100us, init! So I'll see which parts
> of that I can improve:-)
SD-card init is a procedure of "wake-up code" that goes through a
sequence of methods until a card properly answers. Maybe it's best if
Tobias extracts that part from the Chameleon menu code and shares it
with you, so you don't have to re-invent the wheel. I've bought many
cards over the course of Chameleon development, only to find that each
of them has it's own shortcomings that must be covered in the menu
software. Maybe it's SDHC mode that Tobias enables, which confuses yours
and the Spectrum code? You never know with those short-product-cycle
China-made cards.

ciao,
--
Jens Schönfeld



------------------------------------
Posted by: Jens Schoenfeld <jens-S0d+***@public.gmane.org>
------------------------------------
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-19 16:49:24 UTC
Permalink
I'm using the code from this link, pretty thorough.

http://elm-chan.org/docs/mmc/gx1/sdinit.png

>
However at the start note it starts from 'power on'. It's not assuming an
already set up card. Is it possible to reset the card prior to init state
before starting new cores? That would fix spectrum
too:)
Tobias tobias-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-20 16:23:44 UTC
Permalink
Am Samstag, 19. Juli 2014, 18:49:24 schrieben Sie:
> I'm using the code from this link, pretty thorough.
>
> http://elm-chan.org/docs/mmc/gx1/sdinit.png
>
>
> However at the start note it starts from 'power on'. It's not assuming an
> already set up card. Is it possible to reset the card prior to init state
> before starting new cores? That would fix spectrum
> too:)

regarding the sd card stuff.... indeed retrying after the first two steps is
the way to go. actually what the TC64 menu does on ALL those pathes that end
up in "error/unknown card" is retrying a few times (the whole init stuff),
that should fix most issues already.

another issue that we had a while ago are carts that would randomly stop
responding to the init sequence after they have been initialised once (see
wiki: http://wiki.icomp.de/wiki/Chameleon_SD_Card_Problems at the bottom) - in
the menu i fixed/worked around that by sending an "abort" (CMD12 ($4c)) before
the init sequence, which seems to make those cards exit the weird state they
are in that dont allow them to re-init.

that said, i would like to suggest to make the menu code so it can detect and
re-init the card when its pulled out and reinserted... having to restart the
core every time becomes boring quickly =)

other than that, cool job - watched a couple demos and mostly everything seems
to work just fine \o/

--
http://www.icomp.de http://wiki.icomp.de


------------------------------------
Posted by: Tobias <tobias-S0d+***@public.gmane.org>
------------------------------------
Tobias tobias-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-20 18:23:16 UTC
Permalink
Am Sonntag, 20. Juli 2014, 18:23:44 schrieben Sie:
> other than that, cool job - watched a couple demos and mostly everything
> seems to work just fine \o/

that said, i noticed that the sd-card browser for some reason doesnt show all
files ....

65536 29. Sep 2001 Rescue on Fractalus!.rom <- not listed
92176 17. Jun 2008 Yoomp_ V1.1.atr <- not listed

i can accept the .rom file missing... but the other? (yes, renaming it to
something that only has one dot in there works)...

another more or less cosmetic thing: perhaps the boot code should clear the
sound buffers - right now it comes up with machinegun noise at powerup, which
can be surprising after having turned up the volume for gaming =P

btw, i can more or less reproduce sd-card related hang at powerup even after
many times "start core" from chaco, and even after full power cycle - perhaps
be a bit more aggressive with retrying (some cards can really take a while,
like several 10 seconds or so, until they init properly)

i will try if i can improve the start-from-menu situation somehow.....

(do you have another more "official" channel to send bug reports? i feel this
list isnt the best place...)

--
http://www.icomp.de http://wiki.icomp.de


------------------------------------
Posted by: Tobias <tobias-S0d+***@public.gmane.org>
------------------------------------
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-20 18:38:10 UTC
Permalink
On Sunday, 20 July 2014, Tobias tobias-S0d+***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:
>
> Am Sonntag, 20. Juli 2014, 18:23:44 schrieben Sie:
> > other than that, cool job - watched a couple demos and mostly everything
> > seems to work just fine \o/
> 92176 17. Jun 2008 Yoomp_ V1.1.atr <- not listed
>
> i can accept the .rom file missing... but the other? (yes, renaming it to
> something that only has one dot in there works)..
>
Thanks. It's meant to filter .atr and .xex. The extra dot is a bug. I'll
fix...

> another more or less cosmetic thing: perhaps the boot code should clear
> the
> sound buffers - right now it comes up with machinegun noise at powerup,
> which
> can be surprising after having turned up the volume for gaming =P
>
> Do you mean the beeping? That is normal, the atari pokey sound chip is the
serial coms chip. It's possible for the software to mute the channels, but
I don't do anything fpga side. Would make it less authentic:)

Btw there are turbo loading roms patches available here, which makes
loading much faster... Though a few fail with it.
http://www.horus.com/~hias/atari/

> btw, i can more or less reproduce sd-card related hang at powerup even
> after
> many times "start core" from chaco, and even after full power cycle -
> perhaps
> be a bit more aggressive with retrying (some cards can really take a
> while,
> like several 10 seconds or so, until they init properly)
>
Well currently it retries forever in the latest core 20140719. Forever is
too short? I'll add in that abort command you mentioned in case it helps.

> (do you have another more "official" channel to send bug reports? i feel
> this
> list isnt the best place...)
>
My email or the potential new hardware thread (or PM) on atariage. Here is
also fine by me if others don't mind the traffic.










>
>
Tobias tobias-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-20 19:20:05 UTC
Permalink
Am Sonntag, 20. Juli 2014, 20:38:10 schrieben Sie:
> serial coms chip. It's possible for the software to mute the channels, but
> I don't do anything fpga side. Would make it less authentic:)

oooh, so a real a800 does the same? might be worth a notice in the docs - if
you dont know that fact, it very much sounds like broken sound buffer init =)

> > btw, i can more or less reproduce sd-card related hang at powerup even
> > after
> > many times "start core" from chaco, and even after full power cycle -
> > perhaps
> > be a bit more aggressive with retrying (some cards can really take a
> > while,
> > like several 10 seconds or so, until they init properly)
>
> Well currently it retries forever in the latest core 20140719. Forever is
> too short? I'll add in that abort command you mentioned in case it helps.

ok, that explains why it hangs then. whats a bit strange at this point is that
you can't pull out the card and reinsert - that should fix the problem (since
you powercycle the card) perhaps that abort command does the trick, it did for
the issues we had in the menu at least.

as said, i will look into it a bit myself, will see what i can do to "power
down" the card as much as possible before running a core... no guarantees
though, i dont think this is something you need to do, not sure if/how to
convince the card to go back to "not initialized" state :)

> > (do you have another more "official" channel to send bug reports? i feel
> > this
> > list isnt the best place...)
>
> My email or the potential new hardware thread (or PM) on atariage.

http://atariage.com/forums/topic/213827-potential-new-hardware/

this one?

> Here is also fine by me if others don't mind the traffic.

we would like to keep the traffic here low, and focussed on chameleon itself
(and the TC64 core) - i will add a link to that thread on the chameleon wiki
page, it probably helps you as well to get all the reports at one central
place... :)

--
http://www.icomp.de http://wiki.icomp.de


------------------------------------
Posted by: Tobias <tobias-S0d+***@public.gmane.org>
------------------------------------
Tobias tobias-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-21 00:49:30 UTC
Permalink
Am Sonntag, 20. Juli 2014, 21:20:05 schrieben Sie:
> as said, i will look into it a bit myself, will see what i can do to "power
> down" the card as much as possible before running a core... no guarantees
> though, i dont think this is something you need to do, not sure if/how to
> convince the card to go back to "not initialized" state :)

http://beta.icomp.de/bin/rom-menu-sd-abort-hack.zip

this is beta 9a (only the menu rom - use the core from the 9a release) with
the mentioned hack before starting a core from the menu - it does indeed fix
starting the atari core from the menu here. have fun!

--
http://www.icomp.de http://wiki.icomp.de


------------------------------------
Posted by: Tobias <tobias-S0d+***@public.gmane.org>
------------------------------------
Jens Schoenfeld jens-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-19 15:01:44 UTC
Permalink
Am 19.07.2014 15:01, schrieb Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64]:
> I wonder if my 1MHz clock needs to be more precise...

The Chameleon uses a tricky-multiplexed way to communicate with the C64
- this was done in order to save pins on the FPGA. The C64's 1MHz clock
(which in reality is 0,985MHz on PAL and 1,02MHz on NTSC) is supplied
directly into the FPGA after a 5V->3.3V converter that also inverts the
signal, so you have it non-muxed with very little delay inside your
design. Communication *must* be sync to that C64-clock, otherwise it
won't work. Better check how that's connected on the Minimig core.

If that doesn't help, Peter will be able to tell you how his IO part is
meant to be hooked up. As you already found out, I wasn't even aware
that he already completed C64 joystick support ;-)

ciao,
Jens



------------------------------------
Posted by: Jens Schoenfeld <jens-S0d+***@public.gmane.org>
------------------------------------
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-19 18:00:36 UTC
Permalink
On 19 July 2014 17:01, Jens Schoenfeld jens-S0d+***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

> Am 19.07.2014 15:01, schrieb Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
> [chameleon_64]:
> > I wonder if my 1MHz clock needs to be more precise...
>
> The Chameleon uses a tricky-multiplexed way to communicate with the C64
> - this was done in order to save pins on the FPGA. The C64's 1MHz clock
> (which in reality is 0,985MHz on PAL and 1,02MHz on NTSC) is supplied
> directly into the FPGA after a 5V->3.3V converter that also inverts the
> signal, so you have it non-muxed with very little delay inside your
> design. Communication *must* be sync to that C64-clock, otherwise it
> won't work. Better check how that's connected on the Minimig core.
>
> If that doesn't help, Peter will be able to tell you how his IO part is
> meant to be hooked up. As you already found out, I wasn't even aware
> that he already completed C64 joystick support ;-)
>

Thanks. It looks the the 1MHz on minimig is a ~113MHz clock/113. Mine is a
~57.7MHz clock/57. phi2_n is passed directly in to chameleon_io.

Perhaps I need to run the mux faster. I'm running it at 57MHz - perhaps the
design is relying on another speed, or require more cycles per phi2 cycle
to work properly.

Does Peter read the list or am I best to email him directly?
Peter Wendrich pwsoft-iYaX0aD0rSNBDgjK7y7TUQ@public.gmane.org [chameleon_64]
2014-07-20 15:44:31 UTC
Permalink
Hoi,

Most of my Chameleon designs are based on a 100 Mhz clock. So this is
also true for the chameleon_io and the included mux code. You can
deviate a little bit as it will synchronize automatically on phi2_n
transitions. In general a faster internal clock is better as slower
(especially on NTSC machines). The 57 Mhz clock is certainly way too
low. It will not be able to fit all the scheduled MUX actions and
therefore fail to communicate correctly with the C64. It will run "out
of time" about halfway through its schedule.

L8r,
Peter

On 7/19/2014 20:00, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org [chameleon_64]
wrote:
> On 19 July 2014 17:01, Jens Schoenfeld jens-S0d+***@public.gmane.org
> <mailto:jens-S0d+***@public.gmane.org> [chameleon_64] <chameleon_64-***@public.gmane.org
> <mailto:chameleon_64-***@public.gmane.org>> wrote:
>
> Am 19.07.2014 15:01, schrieb Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
> <mailto:scrameta-gM/Ye1E23mwN+***@public.gmane.org>
> [chameleon_64]:
> > I wonder if my 1MHz clock needs to be more precise...
>
> The Chameleon uses a tricky-multiplexed way to communicate with the C64
> - this was done in order to save pins on the FPGA. The C64's 1MHz clock
> (which in reality is 0,985MHz on PAL and 1,02MHz on NTSC) is supplied
> directly into the FPGA after a 5V->3.3V converter that also inverts the
> signal, so you have it non-muxed with very little delay inside your
> design. Communication *must* be sync to that C64-clock, otherwise it
> won't work. Better check how that's connected on the Minimig core.
>
> If that doesn't help, Peter will be able to tell you how his IO part is
> meant to be hooked up. As you already found out, I wasn't even aware
> that he already completed C64 joystick support ;-)
>
>
> Thanks. It looks the the 1MHz on minimig is a ~113MHz clock/113. Mine
> is a ~57.7MHz clock/57. phi2_n is passed directly in to chameleon_io.
>
> Perhaps I need to run the mux faster. I'm running it at 57MHz - perhaps
> the design is relying on another speed, or require more cycles per phi2
> cycle to work properly.
>
> Does Peter read the list or am I best to email him directly?
>
>


------------------------------------
Posted by: Peter Wendrich <pwsoft-***@public.gmane.org>
------------------------------------
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-20 18:46:57 UTC
Permalink
Thanks Peter. I switched to a 113MHz clock which also failed. Surprised
because it's almost the same as minimig uses. I will soon get a C64, thanks
to Paul, so will investigate what's happening then. Before then I'll try it
in isim to see if I can get to the bottom of it...

Anyway many thanks for the io component. Made cdtv remote, spi and docking
station connection a breeze.

Mark

On Sunday, 20 July 2014, Peter Wendrich pwsoft-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

>
>
> Hoi,
>
> Most of my Chameleon designs are based on a 100 Mhz clock. So this is
> also true for the chameleon_io and the included mux code. You can
> deviate a little bit as it will synchronize automatically on phi2_n
> transitions. In general a faster internal clock is better as slower
> (especially on NTSC machines). The 57 Mhz clock is certainly way too
> low. It will not be able to fit all the scheduled MUX actions and
> therefore fail to communicate correctly with the C64. It will run "out
> of time" about halfway through its schedule.
>
> L8r,
> Peter
>
> On 7/19/2014 20:00, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
> <javascript:_e(%7B%7D,'cvml','scrameta-gM/Ye1E23mwN+***@public.gmane.org');> [chameleon_64]
> wrote:
> > On 19 July 2014 17:01, Jens Schoenfeld jens-S0d+***@public.gmane.org
> <javascript:_e(%7B%7D,'cvml','jens-S0d+***@public.gmane.org');>
> > <mailto:jens-S0d+***@public.gmane.org <javascript:_e(%7B%7D,'cvml','jens-S0d+***@public.gmane.org');>>
> [chameleon_64] <chameleon_64-***@public.gmane.org
> <javascript:_e(%7B%7D,'cvml','chameleon_64-***@public.gmane.org');>
> > <mailto:chameleon_64-***@public.gmane.org
> <javascript:_e(%7B%7D,'cvml','chameleon_64-***@public.gmane.org');>>> wrote:
> >
> > Am 19.07.2014 15:01, schrieb Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
> <javascript:_e(%7B%7D,'cvml','scrameta-gM/Ye1E23mwN+***@public.gmane.org');>
> > <mailto:scrameta-gM/Ye1E23mwN+***@public.gmane.org
> <javascript:_e(%7B%7D,'cvml','scrameta-gM/Ye1E23mwN+***@public.gmane.org');>>
> > [chameleon_64]:
> > > I wonder if my 1MHz clock needs to be more precise...
> >
> > The Chameleon uses a tricky-multiplexed way to communicate with the C64
> > - this was done in order to save pins on the FPGA. The C64's 1MHz clock
> > (which in reality is 0,985MHz on PAL and 1,02MHz on NTSC) is supplied
> > directly into the FPGA after a 5V->3.3V converter that also inverts the
> > signal, so you have it non-muxed with very little delay inside your
> > design. Communication *must* be sync to that C64-clock, otherwise it
> > won't work. Better check how that's connected on the Minimig core.
> >
> > If that doesn't help, Peter will be able to tell you how his IO part is
> > meant to be hooked up. As you already found out, I wasn't even aware
> > that he already completed C64 joystick support ;-)
> >
> >
> > Thanks. It looks the the 1MHz on minimig is a ~113MHz clock/113. Mine
> > is a ~57.7MHz clock/57. phi2_n is passed directly in to chameleon_io.
> >
> > Perhaps I need to run the mux faster. I'm running it at 57MHz - perhaps
> > the design is relying on another speed, or require more cycles per phi2
> > cycle to work properly.
> >
> > Does Peter read the list or am I best to email him directly?
> >
> >
>
>
robinsonb5-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-21 00:05:20 UTC
Permalink
Hi :)

> Thanks Peter. I switched to a 113MHz clock which also failed. Surprised because it's almost the same as
> minimig uses. I will soon get a C64, thanks to Paul, so will investigate what's happening then. Before then
> I'll try it in isim to see if I can get to the bottom of it...

One thing that springs to mind here: the ena_1mhz signal is a trigger, not a clock - so double check that you're only driving it high for a single cycle, and not for 50% of the period.

All the best
--
Alastair M. Robinson
robinsonb5-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-21 17:23:48 UTC
Permalink
Hi,

one other thing springs to mind - looking at the commit history for the Minimig core, the problem I was having with spurious joystick events went away when I gave the IO block an extended reset pulse.

Without delving into the code to check or figure out why, I'm guessing that the reset pulse needs to span a couple of ena_1mhz pulses.

All the best
--
Alastair M. Robinson

---In ***@yahoogroups.com, <***@...> wrote :

Hi :)

> Thanks Peter. I switched to a 113MHz clock which also failed. Surprised because it's almost the same as
> minimig uses. I will soon get a C64, thanks to Paul, so will investigate what's happening then. Before then
> I'll try it in isim to see if I can get to the bottom of it...



One thing that springs to mind here: the ena_1mhz signal is a trigger, not a clock - so double check that you're only driving it high for a single cycle, and not for 50% of the period.

All the best
--
Alastair M. Robinson
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-19 20:08:08 UTC
Permalink
I fixed the SD card init by retrying. A build will be up shortly.

I reviewed the C64 joystick vs the Minimig setup. The only difference I
found was the clock speed I'm running the C64 connection at (57MHz me,
113MHz minimig). I changed the code to use the 113MHz clock - maybe...

Build up with these two in about half an hour when it completes.

Be great if you are happy to give it a go:-) Though as before since I don't
yet have a C64 its untested and its possible it won't be good for your C64
or the Chameleon.

On 19 July 2014 14:54, fierman fierman-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

>
>
> Enabled 4player in atari800core_chameleon, to no avail. I do somehow have
> the idea there are no references to the c64 joysticks, joystick1/4 are only
> referred to docking_joystick in there. Adding c64 entries did not help much.
> But like said before: i have not that much vhdl experience, so it's a
> hit&miss debugging for me really:)
>
> Also, regarding the sd card: the zx spectrum cores fail _always_ on sd
> card on cold boot. The user has to manually reset the sd line there to get
> it working.
> ,_.___
> ------------------------------
> Posted by: fierman <fierman-***@public.gmane.org>
> ------------------------------
> Reply via web post
> <https://groups.yahoo.com/neo/groups/chameleon_64/conversations/messages/3967;_ylc=X3oDMTJxbWQwdGhiBF9TAzk3MzU5NzE0BGdycElkAzIzMjI2ODQzBGdycHNwSWQDMTcwODI4NTY2MwRtc2dJZAMzOTY3BHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTQwNTc3NDQ5Mg--?act=reply&messageNum=3967>
> • Reply to sender
> <fierman-***@public.gmane.org?subject=Re%3A%20%5Bchameleon_64%5D%20Scanlines%20effect%20for%20the%20Atari%20800XL%20core>
> • Reply to group
> <chameleon_64-***@public.gmane.org?subject=Re%3A%20%5Bchameleon_64%5D%20Scanlines%20effect%20for%20the%20Atari%20800XL%20core>
> • Start a New Topic
> <https://groups.yahoo.com/neo/groups/chameleon_64/conversations/newtopic;_ylc=X3oDMTJmZXJmZ2lsBF9TAzk3MzU5NzE0BGdycElkAzIzMjI2ODQzBGdycHNwSWQDMTcwODI4NTY2MwRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzE0MDU3NzQ0OTI->
> • Messages in this topic
> <https://groups.yahoo.com/neo/groups/chameleon_64/conversations/topics/3936;_ylc=X3oDMTM1aG9qaTRhBF9TAzk3MzU5NzE0BGdycElkAzIzMjI2ODQzBGdycHNwSWQDMTcwODI4NTY2MwRtc2dJZAMzOTY3BHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTQwNTc3NDQ5MgR0cGNJZAMzOTM2>
> (30)
> ------------------------------
> Yahoo Groups
> Improved Group Homepage!
>
> <https://help.yahoo.com/kb/groups/overview-page-sln15400.html?impressions=true>
> The About page of your Group now gives you a heads up display of recent
> activity, including the latest photos and files
> ------------------------------
> Yahoo Groups
> Control your view and sort preferences per Yahoo Group
> <http://yahoogroups.tumblr.com/>
> You can now control your default Sort & View Preferences for
> Conversations, Photos and Files in the membership settings page.
> ------------------------------
> Visit Your Group
> <https://groups.yahoo.com/neo/groups/chameleon_64/info;_ylc=X3oDMTJmNGczcGRoBF9TAzk3MzU5NzE0BGdycElkAzIzMjI2ODQzBGdycHNwSWQDMTcwODI4NTY2MwRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzE0MDU3NzQ0OTI->
>
> - New Members
> <https://groups.yahoo.com/neo/groups/chameleon_64/members/all;_ylc=X3oDMTJnNXRscG9jBF9TAzk3MzU5NzE0BGdycElkAzIzMjI2ODQzBGdycHNwSWQDMTcwODI4NTY2MwRzZWMDdnRsBHNsawN2bWJycwRzdGltZQMxNDA1Nzc0NDky>
> 2
>
> [image: Yahoo! Groups]
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJlb3R0aTVzBF9TAzk3NDc2NTkwBGdycElkAzIzMjI2ODQzBGdycHNwSWQDMTcwODI4NTY2MwRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTQwNTc3NDQ5Mw-->
> • Privacy <https://info.yahoo.com/privacy/us/yahoo/groups/details.html> •
> Unsubscribe <chameleon_64-unsubscribe-***@public.gmane.org?subject=Unsubscribe>
> • Terms of Use <https://info.yahoo.com/legal/us/yahoo/utos/terms/>
>
> .
>
>
>
fierman fierman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-19 20:51:02 UTC
Permalink
Thank you for your perseverance, just tried it with a c64: joystick not
working alas.
No visible or audible damage otherwise though:)


On Sat, Jul 19, 2014 at 10:08 PM, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64] <chameleon_64-***@public.gmane.org> wrote:

>
>
> I fixed the SD card init by retrying. A build will be up shortly.
>
> I reviewed the C64 joystick vs the Minimig setup. The only difference I
> found was the clock speed I'm running the C64 connection at (57MHz me,
> 113MHz minimig). I changed the code to use the 113MHz clock - maybe...
>
> Build up with these two in about half an hour when it completes.
>
> Be great if you are happy to give it a go:-) Though as before since I
> don't yet have a C64 its untested and its possible it won't be good for
> your C64 or the Chameleon.
>
> .
>
>
>
jugac64-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-19 23:11:11 UTC
Permalink
By the way, just to provide some feedback to Mark, I tested the last build (20140719) and it is working very well.


My setup is a Chameleon + docking station, VGA monitor, USB-to-PS2 keyboard, ps2 mouse, RR-NET Mk3, CDTV Remote Control and a Kingston 32GB SDHC Class 4 SD card (FAT32).


I can launch both NTSC and PAL a8 cores from the C64 core menu and from Chaco.


The keyboard, remote control and joystick are working as expected, it is very nice to control the core from the remote control.


Still can’t find a version of Star Raider that works, but that’s ok, I will keep trying :-)


Many games works fine in NTSC, I don’t know in Atari: there are different versions of the games for PAL and NTSC?


In some games I have seen some glitches in the right border of the screen.


Best regards and thanks again! Juan
Mark Watson scrameta-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org [chameleon_64]
2014-07-20 05:50:24 UTC
Permalink
Thanks, for star raiders versions see here:
http://atariage.com/forums/topic/179618-star-raiders/
The one in the second link on the multi-disk works well. Several in the
first link also work, but too many to choose from there!

Regarding glitches - the original hardware version does this too:-) Its
more obvious scan doubled on a VGA screen though, since they show more
overscan usually. So I need to do something with clipping the display I
guess - been on my list for a long time, but since I run on a SD/HD CRT I
can't see them:-)

I'm not aware of things with PAL/NTSC versions. They just tend to run a bit
faster on NTSC:-). I think PAL tends to run NTSC better because of more
time/vblank. So games written to the limit for PAL don't go the other way
so well. One other key difference is artifacting. The colour clock
frequency was the same as the pixel frequency on NTSC, this was put to use
to make colours from stripes. I support this in the original way for now -
i.e. plug it through composite video if you want it! However I am
considering using some filters to pick up to pass it through a fake
composite cable in the FPGA:-)

Mark


On 20 July 2014 01:11, jugac64-***@public.gmane.org [chameleon_64] <
chameleon_64-***@public.gmane.org> wrote:

>
>
> By the way, just to provide some feedback to Mark, I tested the last build
> (20140719) and it is working very well.
>
> My setup is a Chameleon + docking station, VGA monitor, USB-to-PS2
> keyboard, ps2 mouse, RR-NET Mk3, CDTV Remote Control and a Kingston 32GB
> SDHC Class 4 SD card (FAT32).
>
> I can launch both NTSC and PAL a8 cores from the C64 core menu and from
> Chaco.
>
> The keyboard, remote control and joystick are working as expected, it is
> very nice to control the core from the remote control.
>
> Still can’t find a version of Star Raider that works, but that’s ok, I
> will keep trying :-)
>
> Many games works fine in NTSC, I don’t know in Atari: there are different
> versions of the games for PAL and NTSC?
>
> In some games I have seen some glitches in the right border of the screen.
>
> Best regards and thanks again! Juan
>
>
>
Tobias tobias-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-20 16:01:04 UTC
Permalink
Am Samstag, 19. Juli 2014, 22:51:02 schrieben Sie:
> Thank you for your perseverance, just tried it with a c64: joystick not
> working alas.
> No visible or audible damage otherwise though:)

playing around a bit with it now, too... one thing i noticed is that the
"joystick" which is emulated on the numpad does not work either (but i am not
sure if it is supposed to... i cant read that vhdl code all that well yet =))

--
http://www.icomp.de http://wiki.icomp.de


------------------------------------
Posted by: Tobias <tobias-S0d+***@public.gmane.org>
------------------------------------
Jens Schoenfeld jens-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-20 10:06:23 UTC
Permalink
Am 19.07.2014 22:08, schrieb Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org
[chameleon_64]:
>
> I reviewed the C64 joystick vs the Minimig setup. The only difference I
> found was the clock speed I'm running the C64 connection at (57MHz me,
> 113MHz minimig). I changed the code to use the 113MHz clock - maybe...

Yes, a fast clock is required to run the CPLD mux.

Peter and Tobias do read this list (Peter is actually the list owner),
but it's a) weekend and b) very nice weather, so don't expect too much
activity (also from me - off for the rest of the day).

ciao,
--
Jens Schönfeld


------------------------------------
Posted by: Jens Schoenfeld <jens-S0d+***@public.gmane.org>
------------------------------------
Paul Förster paul_r_foerster-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 14:34:07 UTC
Permalink
Hi fierman,

On 18. Jul, 2014, at 13:44, fierman fierman-***@public.gmane.org [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
> Just checked postage tariffs, shipping a c64 would cost around 33 euro. Which is no problem for me really, but a bit too much if you could pick up a c64 locally for 10 euro. (imho they arent worth that much more :))

lucky you. They sell for much more here in Switzerland...
--
cul8er

Paul
paul_r_foerster-/***@public.gmane.org



------------------------------------
Posted by: =?iso-8859-1?Q?Paul_F=F6rster?= <paul_r_foerster-/***@public.gmane.org>
------------------------------------
Paul Förster paul_r_foerster-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 15:39:37 UTC
Permalink
Hi Mark,

I just asked my special Swiss source if he has a cheap C64 lying around. Doesn't need to look good but must be 100% working. I'll let you know if he has a spare C64 for you as soon as he answers.

He's usually not exactly cheap, but he delivers only the best quality. All the C64s I have from him are 100% working and have a good looking case. So chances are that he might have a not so good looking, but fully working one for you too.

I'll keep you posted.
--
cul8er

Paul
paul_r_foerster-/***@public.gmane.org


On 18. Jul, 2014, at 11:52, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:

>
>
> Thanks Paul. I'll check out ricardo.ch.
>
> Just one thought on kb/joy access... Doesn't the C64 OS poll the CIA periodically? So I could just snoop the bus to read it, rather than attempting, slightly trickier, DMA reads?
>
>
>



------------------------------------

------------------------------------
Paul Förster paul_r_foerster-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [chameleon_64]
2014-07-18 20:37:08 UTC
Permalink
Hi Mark,

On 18. Jul, 2014, at 08:26, Mark Watson scrameta-gM/Ye1E23mwN+***@public.gmane.org [chameleon_64] <chameleon_64-***@public.gmane.org> wrote:
> Anyone in Switzerland here who wants to sell me a C64? :)

I'll have a C64 incl. power supply for you somewhere around mid next week. No additional stuff, no joysticks, no video cable, no nothing, only a plain C64 plus power supply. I've been told the SID is broken, but you don't need that anyway. The rest should be good, but I'll check that out myself when I receive it to make sure you definitely get one with two good CIAs for your work.

Drop me a line with your address (PM -> @gmail.com) and I'll send it to you then.
--
cul8er

Paul
paul_r_foerster-/***@public.gmane.org



------------------------------------
Posted by: =?iso-8859-1?Q?Paul_F=F6rster?= <paul_r_foerster-/***@public.gmane.org>
------------------------------------
Tobias tobias-S0d+oa0fsY4@public.gmane.org [chameleon_64]
2014-07-17 21:52:34 UTC
Permalink
Am Donnerstag, 17. Juli 2014, 22:50:12 schrieben Sie:
> On 17 July 2014 18:37, Mark Watson <scrameta-gM/Ye1E23mwN+***@public.gmane.org> wrote:
> > On Thursday, 17 July 2014, jugac64-***@public.gmane.org [chameleon_64] <
> >
> > chameleon_64-***@public.gmane.org> wrote:
> >> Does the a8 core output to the same resolution of the Minimig core?
> >>
> >> The Minimig and Spectrum cores output PAL to 50Hz, to some resolution I
> >> don't remember now, but my LCD monitor (and I guess many others) works
> >> well
> >> with them.
> >
> > Yep exactly. It will work where they work, if I've got it right!
>
> Just wanted to add...
> sdram working (Thanks Jens)
> sd card working
> scan doubler connected
> So just a few bugs to fix then I'll put it out. Most likely tomorrow :-)

awesome \o/

--
http://www.icomp.de http://wiki.icomp.de


------------------------------------
Posted by: Tobias <tobias-S0d+***@public.gmane.org>
------------------------------------
sven.burger-Mmb7MZpHnFY@public.gmane.org [chameleon_64]
2014-07-17 22:06:47 UTC
Permalink
Yeah. You are so f**king fast...!!!
Thanks.
Loading...