Commodore 64 (C64) Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
C64 Kernel in a Cartridge..
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    Commodore 64 (C64) Forum Index -> General
View previous topic :: View next topic  
Author Message
skoe
Groupie in Training
Groupie in Training


Joined: 03 Sep 2009
Posts: 121

PostPosted: Sun Nov 21, 2010 10:03 pm    Post subject: Reply with quote

The basic idea of that circuit is OK: The only way to see HIRAM at the expansion port (indirectly) is to attach a cartridge there (i.e. to set the GAME/EXROM lines like a cartridge was attached). If a cartridge is attached and the CPU accesses an address range at $a000...$bfff the control line /ROMH shows directly the state of HIRAM.

But the working principle of that device is even dangerous: It tries to use a moment when AEC changed already (i.e. A12..A15 are not driven but only pulled up with resistors), but the CPU does not drive the address lines yet. In this moment it changes A14.

The timing window is very short and controlled by gate delays and RC elements. One has to find the right setting to get it to work on a certain C64, because all of them have a slightly different timing. And the timing even changes over temperature.

What happens if the timing does not fit to the C64? In one direction simply HIRAM cannot be detected and the external kernal does not work. In the other direction A14 is driven against the CPU address pad driver. This may still work if the driver on the cartridge is stronger than the CPU. But the CPU will become hotter and may even be damaged possibly.

That's why I do not recommend to build the cartridge shown at that PDF. It may damage you C64. But it is possible to build a kernal cartrigde with a HIRAM detection over ROMH but with a safer operation Smile One has to use a different way to avoid bus contention.

The battery buffered RAM is used to write a kernal to the cartridge directly using the C64 AFAIK. Something which is also possible with modern flash memory today.

Edit: I applied for the bounty. In case it's assigned to me I'll write and release a functional description of the operating principle in the first 60 days.
_________________


Last edited by skoe on Mon Nov 22, 2010 8:07 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
brain
C64 Enthusiast
C64 Enthusiast


Joined: 20 Jun 2004
Posts: 771

PostPosted: Mon Nov 22, 2010 3:25 am    Post subject: Reply with quote

Very ingenious solution.

Jim
Back to top
View user's profile Send private message Visit poster's website
c64web
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 28 Jun 2007
Posts: 3633
Location: Qld OZ

PostPosted: Mon Nov 22, 2010 11:00 am    Post subject: Reply with quote

Will this be possible for the C128 as well in c64 mode. ?
_________________
Looking for a causal coder, Python/MYSQL/PHP/Java. PM Me Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
e5frog
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 30 Apr 2009
Age: 38
Posts: 3465
Location: Sweden

PostPosted: Mon Nov 22, 2010 9:07 pm    Post subject: Reply with quote

According to the description in 64'er it's possible for the C128 as well but requires different timings. There was a different PCB for the C128 version.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
redrumloa
Groupie in Training
Groupie in Training


Joined: 22 Jun 2005
Posts: 121

PostPosted: Mon Nov 22, 2010 11:47 pm    Post subject: Reply with quote

The C64 Kernal cartridge bounty has been assigned to Skoe.
Back to top
View user's profile Send private message
trip6
C64 Enthusiast
C64 Enthusiast


Joined: 02 Feb 2007
Age: 41
Posts: 727
Location: Buffalo, New York USA

PostPosted: Tue Nov 23, 2010 12:21 am    Post subject: Reply with quote

Another very worthy bounty I must contribute to... When payday comes i'll add to the pot... Looking forward to see what you come up with Skoe... I'll test it with my eprom PLA if you like...
Back to top
View user's profile Send private message Send e-mail
dmackey828
C64 Enthusiast
C64 Enthusiast


Joined: 05 Jun 2009
Age: 45
Posts: 868
Location: Fulton, NY

PostPosted: Tue Nov 23, 2010 2:13 am    Post subject: Reply with quote

I gotta say, this topic went WAY farther than I could have hoped, Looking forward to your progress Skoe.

A lot of good things have been learned and brought out in this forum.

Nice..
_________________
A clean bench is a sign of a weak mind...
Website : http://www.commodoredungeon.com
BLOG : http://www.commodoredungeon.com/blog
Back to top
View user's profile Send private message Visit poster's website
skoe
Groupie in Training
Groupie in Training


Joined: 03 Sep 2009
Posts: 121

PostPosted: Tue Nov 23, 2010 7:32 am    Post subject: Reply with quote

e5frog wrote:
According to the description in 64'er it's possible for the C128 as well but requires different timings. There was a different PCB for the C128 version.

That's true. The C128 has a very different timing and even a different behaviour in some situations (e.g. R/W is low when the VIC reads data and the CPU will read data in the following cycle O_o). I had to learn this when I made EasyFlash compatible to the C128.

Btw the description in the 64er is totally crap. They explained the mechanism wrongly. Or lets say they tried to simplify it so much that it became wrong.

These differences are also the reason that the Chameleon will not work on a C128 AFAIK. Regarding the Kernal cartridge: I'll try it.
_________________
Back to top
View user's profile Send private message Visit poster's website
e5frog
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 30 Apr 2009
Age: 38
Posts: 3465
Location: Sweden

PostPosted: Tue Nov 23, 2010 10:31 am    Post subject: Reply with quote

Seems like it's the right person trying to get it done.

I wish you good luck skoe.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mistermsk
Grandmaster of C64
Grandmaster of C64


Joined: 29 Jun 2009
Age: 40
Posts: 2618
Location: Baltimore, MD Favorite Games: Ultima ][, Wasteland

PostPosted: Fri Nov 26, 2010 2:01 pm    Post subject: Reply with quote

skoe wrote:
These differences are also the reason that the Chameleon will not work on a C128 AFAIK.

Sad Man. I knew I should just go back to the 64 instead of holding onto my 128D. I spend my time on my SX-64 then my 128D anyway.
Back to top
View user's profile Send private message Visit poster's website
mistermsk
Grandmaster of C64
Grandmaster of C64


Joined: 29 Jun 2009
Age: 40
Posts: 2618
Location: Baltimore, MD Favorite Games: Ultima ][, Wasteland

PostPosted: Tue Nov 30, 2010 1:57 pm    Post subject: Reply with quote

Found this link that shows one made by Clocky. However, I do not know if it has the problem that was brought up on this forum. Only problem is that it has that internal wire issue going on. Which looks a lot more complicated then just remove a chip and inserting another chip.

Back to top
View user's profile Send private message Visit poster's website
r.cade
Master of C64
Master of C64


Joined: 28 Aug 2004
Age: 41
Posts: 1424
Location: Augusta, Georgia, USA

PostPosted: Tue Nov 30, 2010 2:09 pm    Post subject: Reply with quote

That's a very simple way using no "tricks". However, you must modify your 64 internally to put the chip enable for the kernal ROM onto an unused cart pin for it to work.
_________________
-
Pete Rittwage
C64 Preservation Project
Register your C64 today - http://c64preservation.com/registry
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
maraud
Forum Junkie
Forum Junkie


Joined: 21 Mar 2009
Posts: 583
Location: Florida, USA

PostPosted: Wed Dec 01, 2010 4:13 am    Post subject: Reply with quote

I threw my few bucks in the pot as I could then have my "stock" units bot LtK friendly and JD "happy" without the two every converging!

-maraud
_________________
Please call My C=ult BBS
maraud.dynalias.com:6400
AABBS 128 12.5c on a C128 and Rear Admiral Hyperdrive
Back to top
View user's profile Send private message
jonnosan
Groupie
Groupie


Joined: 24 May 2009
Posts: 230
Location: Australia (blue mountains)

PostPosted: Wed Dec 01, 2010 8:50 am    Post subject: Reply with quote

mistermsk wrote:
Found this link that shows one made by Clocky.


What's the kernel shown in the second last photo? The startup screen is shown with a white text on black background, text is "GERARDUS v6.01 OCT. 2008"
_________________
Back to top
View user's profile Send private message Visit poster's website
skoe
Groupie in Training
Groupie in Training


Joined: 03 Sep 2009
Posts: 121

PostPosted: Sat Jan 15, 2011 10:11 pm    Post subject: Reply with quote

Today I added a first publication to the bounty page:
http://commodorebounty.com/ind...;Itemid=69

Thomas
_________________
Back to top
View user's profile Send private message Visit poster's website
r.cade
Master of C64
Master of C64


Joined: 28 Aug 2004
Age: 41
Posts: 1424
Location: Augusta, Georgia, USA

PostPosted: Sat Jan 15, 2011 11:09 pm    Post subject: Reply with quote

I understand it's an engineering challenge, but all that just to avoid one wire clipped inside the machine? Smile
_________________
-
Pete Rittwage
C64 Preservation Project
Register your C64 today - http://c64preservation.com/registry
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
e5frog
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 30 Apr 2009
Age: 38
Posts: 3465
Location: Sweden

PostPosted: Sat Jan 15, 2011 11:10 pm    Post subject: Reply with quote

Interesting read Skoe, not that I understand all technical details. I wonder if Gideon wants to try it in the Ultimate (if it can handle it).

Imagine all Ultimate users being able to test it on all their different computers, that would be good data.

Quote:
I understand it's an engineering challenge, but all that just to avoid one wire clipped inside the machine? Smile


It's been discussed before so... let's agree it's easier, anyone can plug in a cartridge, not everyone can do the other stuff.

... It's so easy to fix in WinVICE, why bother with it at all? Evil or Very Mad
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Schema
Master of C64
Master of C64


Joined: 28 May 2002
Age: 39
Posts: 1186
Location: Toronto, Canada

PostPosted: Sun Jan 16, 2011 12:42 am    Post subject: Reply with quote

r.cade wrote:
I understand it's an engineering challenge, but all that just to avoid one wire clipped inside the machine? Smile

I agree, I'd be content with the wire. Still better than desoldering!
Back to top
View user's profile Send private message Visit poster's website
c64web
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 28 Jun 2007
Posts: 3633
Location: Qld OZ

PostPosted: Sun Jan 16, 2011 1:04 am    Post subject: Reply with quote

I would perfer to just insert the kernal cartridge. Smile

Great project.
_________________
Looking for a causal coder, Python/MYSQL/PHP/Java. PM Me Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Wiesel
Groupie
Groupie


Joined: 01 Feb 2008
Age: 39
Posts: 265
Location: out in the wild

PostPosted: Sun Jan 16, 2011 11:31 am    Post subject: Reply with quote

I've read Skoe's document and was pointed to the bounty this morning (things got a little hot over at Forum64).

The basic principle of finding out the state of the Hiram line by applying a different address for a split cycle is the same on all the external Kernal circuits. However, I'd like to throw in some improvements for Skoe, as I have made such a circuit in 1999 already named "Flash Gordon" (was demonstrated at a user meeting some time later, but never released as a product).

Using the DMA line is not a good idea, especially in combination with an asyncronous 25MHz clock. Pulling DMA for a split cycle means that addresses that are already valid on the bus are removed for that split cycle. However, the RAS line may go low during that short time (remember 25MHz is async, so it's a statistical thing), and the false address is stored within the Ram chips -> this cycle would read the wrong address, possibly crashing the machine.

It is perfectly OK to pull low on A14 while the CPU is driving the bus. The reason for this is that NMOS and HMOS circuits do not have push/pull FETs on their output pads, but an always-on-pullup-FET. What looks like a short at first glance is a perfectly normal operation, as it happens all the time in such old technology. No chip (especially not the CPU) will get any hotter than in normal operation when you pull A14 low.

I'll dig out the source code of my Flash Gordon cart and adapt it to the "Nordic Replay" cartridge, which is the ideal base for this. Nordic Replay is sold in Europe and the US (Retro-Donald in Germany and Mike from California, who also sells EF kits), and with the MACH chip in a socket, it can easily be changed to be the "Flash gordon" that I've designed back then.

I won't claim the bounty, but support Skoe in debugging the circuit. The approach is correct, it's just not perfect yet.

Jens
Back to top
View user's profile Send private message Visit poster's website
Unseen
Über Groupie
Über Groupie


Joined: 26 Feb 2008
Posts: 361

PostPosted: Sun Jan 16, 2011 11:46 am    Post subject: Reply with quote

Wiesel wrote:
I've read Skoe's document

You didn't read it in detail or didn't bother understanding it though...

Quote:
However, the RAS line may go low during that short time (remember 25MHz is async, so it's a statistical thing), and the false address is stored within the Ram chips -> this cycle would read the wrong address, possibly crashing the machine.

The address stored during the /RAS cycles does not matter in his design. Whenever there is a chance that the wrong address is latched by the C64's ram chips, they will never be read in that cycle anyway because the proposed module provides both the external kernal and a replacement for the highest 8K of ram to avoid exactly this problem. Since write accesses in this area are always visible on the bus, they're mirrored in both the internal and external ram, so the VIC can read the internal E000-FFFF ram and will see the correct data.
Back to top
View user's profile Send private message
Wiesel
Groupie
Groupie


Joined: 01 Feb 2008
Age: 39
Posts: 265
Location: out in the wild

PostPosted: Sun Jan 16, 2011 11:52 am    Post subject: Reply with quote

Unseen,

I was just pointed to that external ram replacement on Forum64 - my mistake.

However, it's possible completely without additional external ram, as I described over at Forum64. Hope that Skoe will cool down a bit - I know it's bitter, but there's an easier way.

Jens
Back to top
View user's profile Send private message Visit poster's website
e5frog
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 30 Apr 2009
Age: 38
Posts: 3465
Location: Sweden

PostPosted: Sun Jan 16, 2011 12:43 pm    Post subject: Reply with quote

But the bounty was not about finding the easiest way. Wink

If you made your circuit in 1999 and it didn't fully work for some reason then perhaps this new approach is worth a try? So let him do it his way, if that doesn't work perhaps then it's easier to discuss another approach.


Last edited by e5frog on Sun Jan 16, 2011 12:46 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
skoe
Groupie in Training
Groupie in Training


Joined: 03 Sep 2009
Posts: 121

PostPosted: Sun Jan 16, 2011 12:44 pm    Post subject: Reply with quote

I'm more then happy about helpful hints. But if somebody hides the solution for many years and comes up when somebody else did it, just to say "I was the first one", that's not help at all.

As you realized already much of the ranting you wrote did not fit to the concept from my paper. It contained _one_ useful hint, that you measured that the A14 output of the 6510 can be pulled low without using the DMA line.

This can really simplify the concept and even shows that the old circuit in this document is not dangerous, but only instable. In case I decide to continue with this project I'd consider the simplification.

Thomas
_________________
Back to top
View user's profile Send private message Visit poster's website
Wiesel
Groupie
Groupie


Joined: 01 Feb 2008
Age: 39
Posts: 265
Location: out in the wild

PostPosted: Sun Jan 16, 2011 3:04 pm    Post subject: Reply with quote

e5frog wrote:
But the bounty was not about finding the easiest way. Wink

Granted Smile So the bounty can be considered solved, as he's the first who documented it in public.

e5frog wrote:
If you made your circuit in 1999 and it didn't fully work for some reason then perhaps this new approach is worth a try? So let him do it his way, if that doesn't work perhaps then it's easier to discuss another approach.

Nobody said it didn't work. The circuit is stable and it works with all known C64 models. Although it all boils down to less than ten macrocells, it just didn't fit into any of my previous products, and back when I did Retro Replay (which was actually built on the prototype of Flash Gordon), either nobody cared about a Kernal replacement, or nobody realized what kind of improvement it is over the existing solutions out there with the Hiram line taken with a clip on the CPU.

Anyway, now that we found out that I should have read Skoe's paper more closely (and not just the timing diagrams), I hope that Skoe can forgive me. After all, it's solving all problems that he encountered.

Jens
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Commodore 64 (C64) Forum Index -> General All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 5 of 8

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Tip: Get C64 Forever for super-comfy C64 emulation with pre-installed games, demos and other goodies!


Powered by phpBB © 2001, 2005 phpBB Group