C64 Core

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

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

yellperil
Atariator
Atariator
Posts: 25
Joined: Sun Jun 04, 2017 10:53 am

C64 Core

Postby yellperil » Sat Jan 06, 2018 2:24 pm

A generic place for C64 Core discussions . . .

yellperil
Atariator
Atariator
Posts: 25
Joined: Sun Jun 04, 2017 10:53 am

Re: C64 Core

Postby yellperil » Sat Jan 06, 2018 2:38 pm

Happy New Year,

So I've been playing with the C64 a little trying to learn how to program a little and I set myself a little project to attach my uIEC SD card drive to the 64 core.

It works pretty well, but I can't work out how to get the internal 1541 and the external IEC to work at the same time, they sort of freeze each other out. So I used Switch(0) on the nano board to switch between them. It works on the fly so no need to restart the core.

The source is here if you want to have your own play with it and if you own a uIEC adapter or a SD2IEC adapter (my uIEC uses the same firmware).
You do need to build an adapter board though . . . breadboard layout is also in the github repo.

https://github.com/mtfong/C64_MiSTer

I used some spare Arduino pins as well so as not to impinge on the real core, although if you have an I/O board getting the 3.3V and 5V pins may be hard.

I also got a patch called JAFFY DOS to add some functionality to the C64 kernal for some SD2IEC hotkeys as well.

Lastly if you work out how to get them both to work together any help would be appreciated.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Sat Jan 06, 2018 2:51 pm

Why don't use secondary SD card as SD2IEC? Of course you will need to emulate SD2IEC as well. C64 is relatively small core and there is enough FPGA space for SD2IEC.

Although i don't know what is the advantage of SD2IEC over 1541 emulation.

kolla
Captain Atari
Captain Atari
Posts: 163
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: C64 Core

Postby kolla » Sat Jan 06, 2018 11:24 pm

Just want to say big thanks for the additional joystick buttons! I now get the map up on Bear Essentials with button2 :D
-- kolla

yellperil
Atariator
Atariator
Posts: 25
Joined: Sun Jun 04, 2017 10:53 am

Re: C64 Core

Postby yellperil » Sun Jan 07, 2018 12:56 am

Sorgelig wrote:Why don't use secondary SD card as SD2IEC? Of course you will need to emulate SD2IEC as well. C64 is relatively small core and there is enough FPGA space for SD2IEC.

Although i don't know what is the advantage of SD2IEC over 1541 emulation.


Yes I had thought of that, but it was something that was far too complex for me to start off with as I am learning from absolute zero. I needed something that I could achieve with my limited skill level, so I wouldn't give up and actually achieve something tangible. I just wanted to share in case someone else was mildly interested.

In truth there probably isn't anything really useful to add with SD2IEC. It does support more Commodore disk formats and some other cool features like disk swap files for multi disk games. I think it's pretty quick at loading disks too. Features as per the Wiki.

https://www.c64-wiki.com/wiki/sd2iec_(firmware)

I have bought a SD card attachment ( which is still in the XMAS post ) so I can use the IO Board pins that you set up, I'm doubtful that I have the skills required to port it into the core itself.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Sun Jan 07, 2018 5:46 am

yellperil wrote:cool features like disk swap files for multi disk games.

This bug has been fixed already in 1541 code. So, you can use multi-disk games in 1541 as well.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Sun Jan 07, 2018 5:48 am

yellperil wrote:Yes I had thought of that, but it was something that was far too complex for me to start off with as I am learning from absolute zero. I needed something that I could achieve with my limited skill level, so I wouldn't give up and actually achieve something tangible.

Good point. I hope you will learn fast and will be able to improve C64 core soon :)

keito
Atari User
Atari User
Posts: 30
Joined: Tue Dec 26, 2017 5:46 am

Re: C64 Core

Postby keito » Tue Jan 30, 2018 8:42 am

Just a quick couple of questions.... Firstly this Core is easily one of my favourites and most used, great work on this.

Some demos, such as http://csdb.dk/release/?id=149405 detect "emulated hardware", it still works of course but I was just wondering what it is detecting in the FPGA implementation of this core that is flagging it as emulation. I guess you would have to look at their startup/checking routine to see what they are looking for. I would guess it is something to do with timing/interrupts? But I am not sure :)

Also I have tried very hard to get http://csdb.dk/release/?id=93836 running but just cannot, music plays but screen doesn't go into the demo, I know even on a real C64 this demo requires that it be run first with no other commands or memory bytes eaten, and I can get it working on a real C64 and Vice, just not on the MiSTer core, any advice and info would be welcome, cheers.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Tue Jan 30, 2018 9:31 am

keito wrote:I guess you would have to look at their startup/checking routine to see what they are looking for. I would guess it is something to do with timing/interrupts? But I am not sure :)

This is easier to check from C64 code using some debugger or Action replay cartridge.

flenst111
Atarian
Atarian
Posts: 4
Joined: Mon Feb 19, 2018 11:23 am
Location: near Flensburg Germany
Contact:

Re: C64 Core

Postby flenst111 » Tue Mar 13, 2018 10:47 pm

I m very empresssed by the work on the mister and I use the C64 Core to test some old programs. One question: How can I put programs on the SD-CARD, load them and save them? I tried SAVE "TEST.PRG" and got the message PRESS RECORD & PLAY ON TAPE. I there a way to emulate the keys.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Wed Mar 14, 2018 2:42 pm

Saving is possible only to disk. You need to mount the D64 disk and save there.
You need to insert the disk with enough free space. Core doesn't support disk initialization, so use pre-made Empty.D64 from release folder.

About saving to tape - i never tried it and it's not convenient anyway since there is no support for loading from audio input.

ch570512
Atariator
Atariator
Posts: 22
Joined: Sun Jan 14, 2018 1:17 pm

Re: C64 Core

Postby ch570512 » Sun Mar 25, 2018 8:43 pm

Hello!

Maybe a dumb question but where is the "+" key on the C64 core?
Just wanted to hack in a little BASIC program but can't figure out where it is.
Thank you. :)

Thorsten

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Sun Mar 25, 2018 8:58 pm

F10 :)

ch570512
Atariator
Atariator
Posts: 22
Joined: Sun Jan 14, 2018 1:17 pm

Re: C64 Core

Postby ch570512 » Mon Mar 26, 2018 6:59 pm

Hi Sorgelig

That did the trick. Thank you!

Thorsten

nathan1974au
Atariator
Atariator
Posts: 22
Joined: Mon Sep 24, 2007 1:11 pm

Re: C64 Core

Postby nathan1974au » Mon Apr 09, 2018 3:40 am

I've got a sd2iec and there piss to a real floppy drive heaps of games and demos don't run using that thing. :D
be cool game on!!!

User avatar
MacBack
Atarian
Atarian
Posts: 6
Joined: Wed Apr 04, 2018 1:46 pm
Location: Cologne, Germany
Contact:

Re: C64 Core

Postby MacBack » Wed Apr 18, 2018 12:48 am

nathan1974au wrote:I've got a sd2iec and there piss to a real floppy drive heaps of games and demos don't run using that thing. :D


There are tons of sd2iec fixed game releases out - game images (d64) which use loaders that copy own fastload routines to the floppy ram are not supported because the sd2iec does not emulate the real cpu and ram.

And it's the same with the C64 MiSTer Code, this kind of floppy speeders are not supported. Get d64 images that were "cracked" ages ago and don't contain any fasloader / copy protection anymore.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Wed Apr 18, 2018 3:12 am

Well, it's not entirely true. MiSTer emulates real CPU and RAM of 1541. That's why you can use JiffyDOS ROM for 1541 and C64 and get fast loading. The problem is how precise 1541 features are emulated.

THaase
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 111
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: C64 Core

Postby THaase » Thu Apr 19, 2018 1:59 pm

If you want to have very precise implementation than switch to TC64 or Ultimate64.
But than you have more or less only C64 (not totally right for TC64) and not the flexibility of MiSTer and not Open Source for 250€/220€

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Thu Apr 19, 2018 3:00 pm

I don't know what was a reason for U1541 become open source, but i hope U64 will become open source as well. I don't think open source will harm U64 sales as it is interesting mostly as a hardware replacement for C64 fans.

THaase
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 111
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: C64 Core

Postby THaase » Thu Apr 19, 2018 3:21 pm

Gideon also mentioned that the U64 might become Open Source. (Second batch is already complete sold it seems)
I‘ve also thought about buying one, but then decided for the MiSTer as this is more of interest for me (as I already own a Turbo Chameleon).
C64 Reloaded MK3 will be also a very interesting board - but this will stay Closed Source.

Also a lot of people @Forum64 have brought the DE10 in the meanwhile - so community is growing.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3133
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Postby Sorgelig » Thu Apr 19, 2018 3:34 pm

Too bad still there is no self-motivated C64 fan who can improve the current core.
C64 Reloaded is based on original chips as far as i know - it has no relation to FPGA.

THaase
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 111
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: C64 Core

Postby THaase » Thu Apr 19, 2018 3:49 pm

Jens announced the MK3 - as a Turbo Chameleon on stereoids.

FPGA - I‘m willing to learn, but I‘m more a SW guy.
But I already have some ideas to easier integrate unsupported joysticks than compile them to the MiSTer app

silverfox0786
Atariator
Atariator
Posts: 28
Joined: Thu Mar 30, 2017 3:19 pm
Location: Slough, UK
Contact:

Re: C64 Core

Postby silverfox0786 » Mon May 07, 2018 11:34 pm

how do you load disks, load"*",8,1 doesnt work for me

prg and crt work fine

User avatar
DrOG
Captain Atari
Captain Atari
Posts: 449
Joined: Sun Jul 31, 2016 8:23 pm
Location: Gyula, Hungary

Re: C64 Core

Postby DrOG » Tue May 08, 2018 3:38 am

silverfox0786 wrote:how do you load disks, load"*",8,1 doesnt work for me

prg and crt work fine

Hi!

Try to list the attached .d64 as follows:

First type
LOAD"$",8 [RETURN]
then, after loading the directory (READY prompt appears)
LIST [RETURN]

Load the firt .PRG from the list which is longer than 0 block (sometimes the first file is not a real .PRG, just a spacer or part of a PETSCII-art, in this case it has 0 block length).

If this does not help try another release of the game (current C64 core is not perfect yet).

Hope it helps: Gábor

silverfox0786
Atariator
Atariator
Posts: 28
Joined: Thu Mar 30, 2017 3:19 pm
Location: Slough, UK
Contact:

Re: C64 Core

Postby silverfox0786 » Tue May 08, 2018 11:24 am

DrOG wrote:
silverfox0786 wrote:how do you load disks, load"*",8,1 doesnt work for me

prg and crt work fine

Hi!

Try to list the attached .d64 as follows:

First type
LOAD"$",8 [RETURN]
then, after loading the directory (READY prompt appears)
LIST [RETURN]

Load the firt .PRG from the list which is longer than 0 block (sometimes the first file is not a real .PRG, just a spacer or part of a PETSCII-art, in this case it has 0 block length).

If this does not help try another release of the game (current C64 core is not perfect yet).

Hope it helps: Gábor


thnkas alot that worked and i found out why my method was not,

I was being too impatient and thought it was liek a tape load with the rainbow banding. i left it on loading long enough and teh ready prompt came, types RUN and the game loaded


thanks


Return to “MiSTer”

Who is online

Users browsing this forum: HappyBirthday and 2 guests