Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » Commodore 8-bit » Chameleon 64
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Chameleon 64 [message #213790] Thu, 26 December 2013 15:07 Go to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi,

.... my wife gave me two Chameleon 64 carts for Christmas. :) Yes, I
have a wonderful wife. :)

Anyway, neither the docs, nor the icomp.de wiki has anything about
reading the builtin RTC. I also haven't found anything useful on this
subject on the net. Does anybody have any piece of code for primarily
reading from, but possibly also writing to the builtin RTC of the
Chameleon 64?
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #213808 is a reply to message #213790] Thu, 26 December 2013 16:29 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank Buss

Paul Förster wrote:
>
> ... my wife gave me two Chameleon 64 carts for Christmas. :) Yes, I have
> a wonderful wife. :)

Nice, with two you can do some interesting tests with user port BBS
software, or program some network games.

> Anyway, neither the docs, nor the icomp.de wiki has anything about
> reading the builtin RTC.

You are right, the chapter 15, "Using the RTC (Real Time Clock) Chip" in
the progmanual is empty. Maybe ask in the Chameleon Yahoo mailing list,
the developers are active on this list:

http://groups.yahoo.com/neo/groups/chameleon_64/info

--
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss
Re: Chameleon 64 [message #213809 is a reply to message #213790] Thu, 26 December 2013 17:03 Go to previous messageGo to next message
Payton Byrd is currently offline  Payton Byrd
Messages: 1198
Registered: December 2011
Karma: 0
Senior Member
On Thursday, December 26, 2013 2:07:27 PM UTC-6, Paul Förster wrote:
> ... my wife gave me two Chameleon 64 carts for Christmas. :) Yes, I
> have a wonderful wife. :)
>

Wow, that **IS** a wonderful wife and Christmas present!
Re: Chameleon 64 [message #213932 is a reply to message #213790] Fri, 27 December 2013 09:30 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
On Thursday, December 26, 2013 3:07:27 PM UTC-5, Paul Förster wrote:
> Hi,
>
> ... my wife gave me two Chameleon 64 carts for Christmas. :) Yes, I
> have a wonderful wife. :)
>
Just curious: what's a Chameleon 64? :(
Re: Chameleon 64 [message #213935 is a reply to message #213932] Fri, 27 December 2013 10:16 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank Buss

Harry Potter wrote:
> On Thursday, December 26, 2013 3:07:27 PM UTC-5, Paul Förster wrote:
>> Hi,
>>
>> ... my wife gave me two Chameleon 64 carts for Christmas. :) Yes, I
>> have a wonderful wife. :)
>>
> Just curious: what's a Chameleon 64? :(

http://lmgtfy.com/?q=chameleon+64

--
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss
Re: Chameleon 64 [message #213936 is a reply to message #213935] Fri, 27 December 2013 11:28 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
On Friday, December 27, 2013 10:16:30 AM UTC-5, Frank Buss wrote:
> http://lmgtfy.com/?q=chameleon+64

Cool! :) Can it interface with a PC for software transfer? What about transferring to a *real* C64?
Re: Chameleon 64 [message #213989 is a reply to message #213936] Fri, 27 December 2013 13:52 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank Buss

Harry Potter wrote:
> On Friday, December 27, 2013 10:16:30 AM UTC-5, Frank Buss wrote:
>> http://lmgtfy.com/?q=chameleon+64
>
> Cool! :) Can it interface with a PC for software transfer? What
> about transferring to a *real* C64?

You can transfer programs from a PC to a SD-card and then insert the
SD-card into the Chameleon to start the programs. You can even transfer
D64 files and mount it as a virtual floppy, for programs with loaders
(more complex games). Works standalone with VGA output, or you can use
the Chameleon as a cartridge for a real C64.

And then there is a PC program for it (chaco.exe), with which you can
read and write the memory of the Chameleon from a PC over USB. Once I
mounted a D64 image from the Chameleon menu, then I overwrote the memory
area where it was mounted with a different D64 image from a PC and it
worked. But I don't know an easy to use GUI program for PC to simply
transfer programs to it.

--
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss
Re: Chameleon 64 [message #213990 is a reply to message #213989] Fri, 27 December 2013 14:04 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
On Friday, December 27, 2013 1:52:57 PM UTC-5, Frank Buss wrote:
> Harry Potter wrote:
>> Cool! :) Can it interface with a PC for software transfer? What
>> about transferring to a *real* C64?
>
> You can transfer programs from a PC to a SD-card and then insert the
> SD-card into the Chameleon to start the programs. You can even transfer
> D64 files and mount it as a virtual floppy, for programs with loaders
> (more complex games). Works standalone with VGA output, or you can use
> the Chameleon as a cartridge for a real C64.
>
That's good. And I could use HDD64 and the XE1541 cable on a Win98 PC to transfer data between the PC and a C= drive. Thank you!
Re: Chameleon 64 [message #214128 is a reply to message #213808] Sat, 28 December 2013 08:24 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Frank,

On 2013-12-26 21:29:13 +0000, Frank Buss said:
> Nice, with two you can do some interesting tests with user port BBS
> software, or program some network games.

.... I will have to wait until February, until my 2 RR-Net cards arrive. :-)

> You are right, the chapter 15, "Using the RTC (Real Time Clock) Chip" in
> the progmanual is empty. Maybe ask in the Chameleon Yahoo mailing list,
> the developers are active on this list:
> http://groups.yahoo.com/neo/groups/chameleon_64/info

.... I did ask Jens and he says, everything is closed source but he is
willing to provide some details as how to read the RTC. I will have to
wait for an answer.
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214129 is a reply to message #213809] Sat, 28 December 2013 08:25 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Payton,

On 2013-12-26 22:03:02 +0000, Payton Byrd said:
> Wow, that **IS** a wonderful wife and Christmas present!

.... most definitely. She is really supportive and also buys me a C64
and/or accessories from time to time. :)
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214130 is a reply to message #213989] Sat, 28 December 2013 08:32 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Frank,

On 2013-12-27 18:52:57 +0000, Frank Buss said:
> Works standalone with VGA output, or you can use
> the Chameleon as a cartridge for a real C64.

.... well, sort of. You can attach a PS/2 keybaord, a PS/2 mouse and
floppy drive in standalone-mode. If you want to attach a real C64
keyboard and/or C64 joysticks or a C64 mouse, you need the dock. User
and tape ports are still missing in that configuration.

> And then there is a PC program for it (chaco.exe), with which you can
> read and write the memory of the Chameleon from a PC over USB. Once I
> mounted a D64 image from the Chameleon menu, then I overwrote the memory
> area where it was mounted with a different D64 image from a PC and it
> worked. But I don't know an easy to use GUI program for PC to simply
> transfer programs to it.

.... ChaCo ist designed for debugging purposes and/or transferral of
cores to the Chameleon exclusively. Transferring files from and to an
SD card is not possible. There simply is no file transfer program.
Since such a program, eve if it existed, would probably be Windows
only, it would be unusable for me anyway. :-P So if that would be
technically feasable at all, do it in Java or some other portable
language, so that it can be used on Linux and Mac OS too. :-)
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214170 is a reply to message #214128] Sat, 28 December 2013 11:26 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank Buss

Paul Förster wrote:
>
> ... I did ask Jens and he says, everything is closed source but he is
> willing to provide some details as how to read the RTC. I will have to
> wait for an answer.

This is a strange answer. Of course, would be nice if anything would be
open source, but this is his decision. But this is unrelated to describe
how to write and read the RTC. It is advertised with a battery backed
real time clock, so it should be documented how to use it.

--
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss
Re: Chameleon 64 [message #214230 is a reply to message #214170] Sat, 28 December 2013 17:17 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Frank,

On 2013-12-28 16:26:06 +0000, Frank Buss said:
> This is a strange answer. Of course, would be nice if anything would be
> open source, but this is his decision. But this is unrelated to describe
> how to write and read the RTC. It is advertised with a battery backed
> real time clock, so it should be documented how to use it.

.... well, in fact it is, but it took me some time to realize that. The
new 8i core release includes a programmer's guide which lists all the
registers. It does not provide complete information on how the
registers behave, nor does it have sample code. Yet, I found an old
posting with small sample code. I adapted that and now can read out all
the data, i.e. century, year, day, day-of-week, hour, minute and second
(in that order). So, my next step is to find out how to write the RTC.
:-)

The thing is, having studied it in detail today, I can fully understand
Jens' statement. There's a very thin line between disclosing this an
opening the door to fully disassembly of everything including the core.
So Jens must be very careful what information he provides and what he
hides. Studying the manual today while experimenting with reading the
RTC, it popped into my mind that I hold the key to reading and
manipulating everything and anything on the cart in my hands, just
being limited by time and will to do so. But I *could* now take the
whole thing apart (software-wise) and manipulate everything to my
wants. This is extremely powerful and I see that Jens doesn't want
people to tamper with that. I respect that and will not disclose
anything without his consent.

However, if Jens agrees, I am willing to share my code to read the RTC.
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214231 is a reply to message #214230] Sat, 28 December 2013 18:56 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank Buss

Paul Förster wrote:
>
> The thing is, having studied it in detail today, I can fully understand
> Jens' statement. There's a very thin line between disclosing this an
> opening the door to fully disassembly of everything including the core.

The main work is in the HDL for the FPGA. The bitstream can't be
disassembled back to VHDL or Verilog, and certainly knowing the meaning
of some real time clock registers doesn't help, if you want to implement
e.g. your own 6502 CPU core with VIC and SID emulation in a FPGA.

> But I *could* now take the whole
> thing apart (software-wise) and manipulate everything to my wants. This
> is extremely powerful and I see that Jens doesn't want people to tamper
> with that. I respect that and will not disclose anything without his
> consent.

I think he doesn't care if people play with it. All the hardware is
already documented in detail, even with VHDL examples to create your own
FPGA core. And you could fry your Chameleon by creating your own core
and doing something silly with the FPGA in/out lines or clock settings.
I guess just playing with some registers in the existing Chameleon core
can't do this.

BTW: Just for fun I started my own core for the Atari 2600:

http://www.forum64.de/wbb3/board65-neue-hardware/board289-di verses/board322-chameleon/50166-a2601-core-f-r-das-turbo-cha meleon/

Needs still a lot of work. I plan to support loading games from the SD
card and to use parts of it for my Crazy Cartridge. But I can already
play Atari 2600 games with it.

--
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss
Re: Chameleon 64 [message #214248 is a reply to message #213790] Sat, 28 December 2013 19:26 Go to previous messageGo to next message
<address_is is currently offline  <address_is
Messages: 19
Registered: January 2013
Karma: 0
Junior Member
Paul Förster <paul.foerster@gmx.net> wrote:
> Hi,
>
> ... my wife gave me two Chameleon 64 carts for Christmas. :)

Lucky guy!

> Yes, I have a wonderful wife. :)

Lucky guy (it is true that some guys have all the luck...)! Yes, you do!! I
hope her first name is not Jeri? ;-))

Congrats!
--
SD!
Re: Chameleon 64 [message #214311 is a reply to message #214248] Sun, 29 December 2013 07:35 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi SD,

On 2013-12-29 00:26:11 +0000, <address_is@invalid.invalid> said:
> Lucky guy (it is true that some guys have all the luck...)! Yes, you do!! I
> hope her first name is not Jeri? ;-))
> Congrats!

.... thanks. And no, her name is not Jeri. :-)
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214312 is a reply to message #214231] Sun, 29 December 2013 07:38 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Frank,

On 2013-12-28 23:56:03 +0000, Frank Buss said:
> The main work is in the HDL for the FPGA. The bitstream can't be
> disassembled back to VHDL or Verilog, and certainly knowing the meaning
> of some real time clock registers doesn't help, if you want to implement
> e.g. your own 6502 CPU core with VIC and SID emulation in a FPGA.

.... well, one could read everything out. So why can't it be
disassembled then (necessary knowledge assumed)?

> I think he doesn't care if people play with it. All the hardware is
> already documented in detail, even with VHDL examples to create your own
> FPGA core. And you could fry your Chameleon by creating your own core
> and doing something silly with the FPGA in/out lines or clock settings.
> I guess just playing with some registers in the existing Chameleon core
> can't do this.

.... I definitely won't start playing with the core. :) I know nothing
about that FPGA stuff and don't have the time to learn it.

> BTW: Just for fun I started my own core for the Atari 2600:
> http://www.forum64.de/wbb3/board65-neue-hardware/board289-di verses/board322-chameleon/50166-a2601-core-f-r-das-turbo-cha meleon/
>
> Needs still a lot of work. I plan to support loading games from the SD
> card and to use parts of it for my Crazy Cartridge. But I can already
> play Atari 2600 games with it.

.... I didn't check it out, but I'm always impressed on what people do
with their spare time. :)
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214356 is a reply to message #214312] Sun, 29 December 2013 10:18 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank Buss

Paul Förster wrote:
>
> On 2013-12-28 23:56:03 +0000, Frank Buss said:
>> The main work is in the HDL for the FPGA. The bitstream can't be
>> disassembled back to VHDL or Verilog, and certainly knowing the meaning
>> of some real time clock registers doesn't help, if you want to implement
>> e.g. your own 6502 CPU core with VIC and SID emulation in a FPGA.
>
> ... well, one could read everything out. So why can't it be disassembled
> then (necessary knowledge assumed)?

First some background: A FPGA is mostly a bunch of LUTs (lookup tables),
with e.g. four inputs and one output (depends on the FPGA), flipflops,
PLLs, hardware multipliers etc. A bitstream configures and connects
these elements. This is the chameleon_beta8i.rbf file, which is flashed
to an external flash on the Chameleon and loaded into the FPGA on power up.

How is the bitstream created? It is a two step process: In VHDL the
programmer writes something like this:

if we == '0' and address == x"de00" then
bankSelection <= data(5 downto 0);
end if;

In the first step, this is compiled to a netlist, a representation of
simple gates like AND, OR, flipflop etc. and the connections between
these gates. The netlist might be optimized, like if the lower 8 bits of
an address is tested for "00" more than once in the VHDL source code, an
intermediate signal is generated and then this signal is used instead
whereever needed. The optimizations are very advanced. You might know
Karnaugh maps. This is old stuff, too slow for the tasks needed for
FPGA, with thousands of logic functions, and douzens of inputs and
outputs. Today binary decision diagrams (
http://en.wikipedia.org/wiki/Binary_decision_diagram ) and other
advanced data structures and even more advanced algorithms are used.
That's the reason why "compiling" a big design for a FPGA needs many
hours. For complex designs it is impossible to "decompile" such a
netlist automatically back to (readable) VHDL, because of all the
optimizations. The only way would be to simulate inputs, then check the
outputs and deduce how the source code could look like.

The next step is the compilation of the netlist to the LUTs of the FPGA.
This involves mapping and routing of the gates, and again optimizing, so
that the LUTs are used optimal, like merging multiple gates into one
LUT. And of course, there are no names from the original VHDL source
code anymore, just lots of LUT data. This makes it difficult to reverse
engineer the bitstream to a netlist. And the bitstream format of Xilinx
and Altera is undocumented, which makes it even more difficult.

Conclusion: It would be less work to program the Chameleon core again,
than reverse engineering it.

--
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss
Re: Chameleon 64 [message #214398 is a reply to message #214356] Sun, 29 December 2013 15:30 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Frank,

On 2013-12-29 15:18:21 +0000, Frank Buss said:
> This is the chameleon_beta8i.rbf file, which is flashed
> to an external flash on the Chameleon and loaded into the FPGA on power up.

.... that raises a question on my part. If I understand you right, the
core file gets flashed to some flash chip. As far as I know, flashing
means certain stress on the chip being flashed and the specified
lifetime is usually stated as about 10 years in data sheets. But what
about the FPGA? Is that some sort of RAM that gets loaded on boot time?
What about the lifetime of an FPGA? If it gets written on during each
boot process, does that mean the same stress as a real flash chip
suffers from or is it more like RAM that holds more or less a lifetime?

> Conclusion: It would be less work to program the Chameleon core again,
> than reverse engineering it.

.... thanks for this great insight. Though I probably only understood
half of your explanations right, it sounds like it's sort of one way
like how hash values work. Building a hash value garantees that one
thing fits it, but there are lots of other possible combinations also
fitting it, so the hash value does not allow a deduction from it to the
original because it could be anything as long as it fits, right? Same
with md5, the old /etc/passwd mechanism, etc.
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214399 is a reply to message #214398] Sun, 29 December 2013 16:10 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Frank Buss

Paul Förster wrote:
>
> What about the lifetime of an FPGA? If it gets written on during each
> boot process, does that mean the same stress as a real flash chip
> suffers from or is it more like RAM that holds more or less a lifetime?

Yes, it is RAM in the FPGA, no limits on how often it can boot. But
probably you should reflash the flash every 10 years :-)

> ... thanks for this great insight. Though I probably only understood
> half of your explanations right, it sounds like it's sort of one way
> like how hash values work. Building a hash value garantees that one
> thing fits it, but there are lots of other possible combinations also
> fitting it, so the hash value does not allow a deduction from it to the
> original because it could be anything as long as it fits, right? Same
> with md5, the old /etc/passwd mechanism, etc.

It is a bit similar. But not as mathematically one-way as a hash
function, more like a really complex multi-stage C compiler.

If you manage to reverse engineer the bitstream format (there are some
scientific papers and tools about this topic), then it should be easy to
create some VHDL code from the bitstream. But there are many ways how to
write the VHDL source code for a given bitstream, no identifiers for
internal signals in the bitstream alone allows this. A decompiler could
just list all LUTs of the bitstream as VHDL code, but this would be
useless for re-using it in other projects or for a clone. Because of the
optimizations and mergings when creating the bitstream, it can't
automatically create VHDL files for the different modules like 6502,
VIC, SID etc., and you can't change the functionality, because of the
inflexible low-level LUT representation (think of one big file with
thousands of tables with numbers) instead of some nice high-level VHDL code.

--
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss
Re: Chameleon 64 [message #214515 is a reply to message #214399] Mon, 30 December 2013 03:54 Go to previous messageGo to next message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Frank,

On 2013-12-29 21:10:49 +0000, Frank Buss said:
> Yes, it is RAM in the FPGA, no limits on how often it can boot. But
> probably you should reflash the flash every 10 years :-)

.... ok, good to know. There will probably a lot of core version before
it leaves beta stage. However, once flashed there could easily be no
more cores for a long time which would refreshing them every few years
necessary. And I have tons of stuff that easily makes mit a decade or
more without being powered on...

> Because of the
> optimizations and mergings when creating the bitstream, it can't
> automatically create VHDL files for the different modules like 6502,
> VIC, SID etc., and you can't change the functionality, because of the
> inflexible low-level LUT representation (think of one big file with
> thousands of tables with numbers) instead of some nice high-level VHDL code.

.... which means, you get some lookup tables with stuff for the VIC and
6502 for example. Changing something there to change the behavior of
the VIC also has a side effekt on the 6502 then. Ok, much clearer now,
thanks. :-)
--
cul8er

Paul
paul.foerster@gmx.net
Re: Chameleon 64 [message #214806 is a reply to message #213790] Tue, 31 December 2013 10:01 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
On Thursday, December 26, 2013 3:07:27 PM UTC-5, Paul Förster wrote:
> Hi,
>
> ... my wife gave me two Chameleon 64 carts for Christmas. :) Yes, I
> have a wonderful wife. :)
>
How about a Chameleon 128? :)
Re: Chameleon 64 [message #214907 is a reply to message #214806] Tue, 31 December 2013 15:31 Go to previous message
Paul Förster is currently offline  Paul Förster
Messages: 415
Registered: April 2012
Karma: 0
Senior Member
Hi Harry Potter,

On 2013-12-31 15:01:07 +0000, Harry Potter said:
> How about a Chameleon 128? :)

.... I doubt that Jens will do that but feel free to ask him. :)

Happy new year soon. :)
--
cul8er

Paul
paul.foerster@gmx.net
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: HiMem64 now available!
Next Topic: Re: Dutch Commodore meeting
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Apr 20 04:40:47 EDT 2024

Total time taken to generate the page: 0.34346 seconds