KimJorgensen / easyflash

Fork of https://bitbucket.org/skoe/easyflash
http://skoe.de/easyflash/
41 stars 11 forks source link

INFO REQUEST: C64 core on the MEGA65 #11

Closed sy2002 closed 1 year ago

sy2002 commented 1 year ago

Hi Kim,

This is not an issue, but an info request. Together with Michael Jørgensen aka @MJoergen (also from Denmark, nice coincidence :-)) I am building the C64 core for the MEGA65 computer.

The MEGA65 sports a hardware Expansion Port that is compatible to the C64's, see this photo:

mega65-with-easyflash-3

Our core is based on the MiSTer C64 core and is already extremely (as in 99.98%) compatible to the real C64. All game cartridges that I know, including more modern ones like Sam's Journey, and also the EasyFlash 1CR from Daniel Mantione work like a charme with our C64 core on the MEGA65. We can flash the EasyFlash 1CR and play games such as A Pig Quest and Eye of the Beholder.

But I am still struggling with the EasyFlash 3. Is there any chance that you share some info with me how EasyProg works? I am able to debug the signal flow between the C64 (MEGA65) and the EasyFlash cartridge via Vivado's ILA, which is a scope that is built into the FPGA. If I knew a bit more, what is happening on the software side, then I might be able to fine-tune anything that we might currently not doing perfectly right (phi2? IRQ? NMI? DMA?). But as said: EasyFlash 1CR works :-)

Here is what currently happens: I wanted to flash the EasyFlash 3 initialization package using EasyProg. EasyFlash detects the EF3's flash driver and starts flashing. After a second or two, it shows this error message:

ef3-1

And here is the screen that comes after the error message, so that you can see the Flash Driver, etc. :

ef3-2

And as an FYI: Before I ran into the situation that I needed to re-flash EF3's initialization package, I was actually able to "kind of use it" at the MEGA65 using our C64 core:

  1. It did start, I was able to see the main menu
  2. I was not able to start any of the cartridges visible in the main menu: The frame became colorful and then the system crashed
  3. I was able to start EasyProg directly using the EF3 and it recognized the Flash Driver
  4. I tried to flash a small CRT into Slot 1 (not into the system slot)
  5. This did not work
  6. Since then the EF3 does not start any more
  7. This is why I am now working to get the flashing working first, so that I can proceed at all :-)

Is there any chance that you share some info here in this GitHub chat? Or via a Skype Chat? Or maybe via Discord? Here is an invite to the MEGA65's Discord server: https://discord.gg/UW9A5HAz We discuss the development in a closed group there, you could also DM me on Discord, my handle there is sy2002#5425

KimJorgensen commented 1 year ago

@sy2002 Well, I no expert on EasyFlash 3 that will be @skoe

However, EasyProg (and programs using the EasyAPI) will be using a specific flash driver that defines the communication between the C64 and the particular flash chip on the cartridge. In your case you can find the source code for that driver here: https://github.com/KimJorgensen/easyflash/blob/master/EasySDK/eapi/eapi-mx29640b.s

I'm assuming that EasyFlash 1CR works because it has a different flash chip that uses a different driver

sy2002 commented 1 year ago

Thank you for your feedback, Kim. This is helpful.