C64 Core

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

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

Locked
yellperil
Atari freak
Atari freak
Posts: 51
Joined: Sun Jun 04, 2017 10:53 am

C64 Core

Post by yellperil »

A generic place for C64 Core discussions . . .

yellperil
Atari freak
Atari freak
Posts: 51
Joined: Sun Jun 04, 2017 10:53 am

Re: C64 Core

Post by yellperil »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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: 282
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: C64 Core

Post by kolla »

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
Atari freak
Atari freak
Posts: 51
Joined: Sun Jun 04, 2017 10:53 am

Re: C64 Core

Post by yellperil »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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

Post by keito »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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: 7
Joined: Mon Feb 19, 2018 11:23 am
Location: near Flensburg Germany
Contact:

Re: C64 Core

Post by flenst111 »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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
Atari User
Atari User
Posts: 32
Joined: Sun Jan 14, 2018 1:17 pm

Re: C64 Core

Post by ch570512 »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

F10 :)

ch570512
Atari User
Atari User
Posts: 32
Joined: Sun Jan 14, 2018 1:17 pm

Re: C64 Core

Post by ch570512 »

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

Post by nathan1974au »

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

Post by MacBack »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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
Captain Atari
Captain Atari
Posts: 187
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: C64 Core

Post by THaase »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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
Captain Atari
Captain Atari
Posts: 187
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: C64 Core

Post by THaase »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: C64 Core

Post by Sorgelig »

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
Captain Atari
Captain Atari
Posts: 187
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: C64 Core

Post by THaase »

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

Post by silverfox0786 »

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

prg and crt work fine

User avatar
DrOG
Atari Super Hero
Atari Super Hero
Posts: 725
Joined: Sun Jul 31, 2016 8:23 pm
Location: Gyula, Hungary

Re: C64 Core

Post by DrOG »

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

Post by silverfox0786 »

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

Locked

Return to “MiSTer”