Chargen/ROMchar on the Pi0 got fixed in v1.25, i just got the beta and have 4 lines on my 32px display now (instead of 2, on a 64px it's 8 lines instead of 4!)
The "litmus test" for this is to load Ghosts&Goblins arcade game on a C64 with it. If the timing is perfect, then it loads perfectly! If the timing is off by even a slight amount, loading this game will fail. The Pi zero would not load this game for me, so I went through a painful endeavor to figure out how to use a Pi Zero 2W, which has more "CPU power and a faster clock speed". To use this, you have to load all the Pi1541 firmware on the pi zero 2 and "make" the firmware, then copy it to the appropriate MicroSD card. It took me most of a day to figure this out, but the Pi Zero 2W DOES have the power and precision to load Ghosts&Goblins with the Pi1541.
pi1541 is a very nice thing but I think the only device need is the Ultimate 2+ it costs almost the same of all raspberry stuff (the board, the hat, the psu, some case, the cables, etc etc) and gives to the C64 everything you ever dreamt of: ram expansion, cartridges, tapes and 2 perfectly emulated drives. Nothing more than that is really needed. Unless you have a fetish for tapes, the there is the Cute32 project too. But I was a drive guy more than a tape guy :D Anyway, nice video and keep it on!
Thanks for the kind words. I agree, the Ultimate is an excellent device. I covered it briefly in an earlier video. The cost of Pi1541 does vary a lot depending on what point you start at. Still, a new €10 Pi Zero or €35 RPi3 with a €20 hat and potentially a leftover PSU from some old phone still a far way from the €140 list price of the Ultimate. You can go very low in cost for Pi1541 and get a good experience, but going all in with all new stuff, list prices, big screen and custom case you might get close to €100. And if you’re aiming for the best possible you’re probably better off going for the Ultimate. Neither Pi1541 nor SD2IEC will get you the best.
Thank you for this video. :-) Everything was explained very well. With this guide I was able to configure my Raspberry Pi Zero as a Pi1541 emulator. Unfortunately, the link in the video min 3:13 (Nightly builds) no longer works. The following information appears: "Game Over - Use the officially supported ad hoc builds from Github"
Ok, that was a very good video. I have a question, I have a pi zero, did the work as described and tried to power it up, but without the connection to the CBM 64 itself. The screen on the pi hat does not light up. I see 2 green flashes from the ON led, but nothing else.... Is that normal, or can the pi1541 only work when connected to an actual 64?
built one yesterday (albeit the simpler A option) it seems to run but the oled displays only the boot logo I haven't connected it yet to my c64, is this correct behaviour or i'm missing some configuration?
So, after 2 years, I'm finally getting around to trying it with the Pi1b. It worked! In fact, my Pi3B+ was giving problems. So I have a couple problems to iron out. 1) 1581 .d81 images arent loading at all. I've checked all the settings. Getting "drive not ready' and stuff like that. Other problem is that disk copy to a real 1541 just isn't working. Fast Hack'em says that the disk was copied, but the disks just arent getting written. Drive can read commercial disks and ones that I made a year ago. Maybe the drive needs to be calibrated. I'm just about at the point of just selling the whole thing. Probably put only 10 hours into it last year and those were mostly trying to get different disk images to work on the pi1541.
Excellent video, thank you. Have you tried 1581 on it? I've followed the instructions online (there aren't many unfortunately) but cannot get it to work. If you can, would you consider making a quick video (also, have you tried jiffy dos at all?).
Thanks for the kind words! I did try the 1581 mode during beta testing a few months back and it worked nicely. I might get some time for video production next week so I’ll see what I can do. (JiffyDOS is something I haven’t tried in a very long time so the answer is leaning towards a no.)
I wonder why there is not a pi1541 sourcecode version on which the timings are adapted for Pi0 without the need to overclock the device. I think due to the compactness and price of Pi0 it had to be the preferred choice right from the start to develop pi1541.
That's excellent input, Roberto. Perhaps Steve White himself is a better person to answer that, but let me theorise. The 1541 drive contains a lot of components, and Pi1541 aims to be a "cycle exact" emulator. This means that for every emulated clock cycle the interactions between the components are timed accurately enough so that the emulated hardware behaves the same way as the original drive would for any given input. This interaction between the components are exploited in creative ways in some fast loaders and other drive injected software. For the 100% compatibility aim, staying cycle exact is key. To do this, the emulator must have a fair amount of performance headroom and not experience too many unpredictable events. Quite a large amount more actually than a normal, theoretically "instruction accurate", emulation at 1MHz. The Raspberry Pi 3 has 4 CPU cores, so it is fairly easy to dedicate a single core fully to emulation. The other 3 cores can do screen updates, polling, sound and other UI-related things. The emulated core can stay uninterrupted and run in a predictable way. For a long time, scaling it down to the Pi Zero was the intention, but certainly a challenge because there is only a single CPU core to work with. All UI except for GPIO/OLED had to be thrown out and all the crucial bits adjusted to run in the single CPU core of the Zero in a way that wouldn't interfere with the emulation. Also, the single A7 core is nowhere near as powerful as a single core of the Cortex A53 on the Pi 3, so a whole lot of code optimisation was needed. Still, at that point overclocking was the only way to stay cycle exact. There's just not enough grunt to have a margin for "timing" the emulation with the rest of the necessary code. Perhaps further optimisation of the code can remove this need in the future.
Which PLA was in that first C64 that was incompatible with the game? I am going to use the PLAnkton in my C64 build, so I wonder if there are any problems with that one.
Hi Sean! The PLA replacement I was using was an old CPLD implementation from 2010 by fpgaarcade. It was fairly experimental. The PLAnkton on the other hand is a great choice and should serve you well.
Thanks to your video I was able to run Pi1541 on Pi Zero. Even the rotary encoder works properly! Is it a chance that you or Steve will add support for USB flash drives on Pi Zero?
;) It was delayed by earth’s refusal to be flat. Thanks for the feedback. It’s nice to know that it is of value. I will check your question with Steve and get back to you. Spontaneously I feel it should be doable, but he will know for sure.
I've got one problem with both Pi Zero and Pi 3B+. Ghost'n Goblins shows glitched title screen and the game doesn't start. I don't care for that particular game and other games I tried run without any problems. But it bothers me anyway :) I have original 2.5A power supply. I've tried two different hex inverters - SN7406C by Texas Instruments and UCY7406 by CEMI. My Pi1541 hat is made on hackup.net board rev.4.
The most predictable results seem to be the latest Pi1541 release with GraphIEC off on RPi3:s. I’d start with that as a baseline, but after that I suppose there’s no good shortcut to troubleshooting it other than finding a buddy with a complete working setup and swapping parts until the culprit is found. If you find it’s the hat, and you have already tried a good inverter, I suppose the level shifter could be glitchy. I’ve even seen problems with GnG on some c64’s on original 1541 drives. I wish I could give you a better answer.
Apparently the USB driver module causes a lot of interrupts that effectively breaks the cycle exact emulation. So, only having a single CPU core to work with, it had to be removed the Pi Zero/1 version. It seems unlikely that it can be added in any time soon. Sorry.
I know this is an old video but hopefully you see this! :) I just tried this using my Pi Zero W but only get the "Rainbow Square" in the bootup process... According to the info I found this is because the kernel.img is not booting correctly! I am using the latest version of Pi1541 (v1.24) but cannot find any older versions like the one you are using to test with! Any ideas?
HDMI output on Pi1541 is only supported on Pi3 models. Running Pi1541 on a Zero or Pi1 WILL display a rainbow screen on HDMI, because Pi1541 never initialises the GPU at all. It still runs, but never touches the GPU, so the firmware rainbow screen will be the last thing the GPU is asked to display. So, in your case, if you have prepared the card right and use the right kernel.img for Zero, I would go with the assumption that Pi1541 is actually running, but you'll need verify that by connecting to a Commodore or using an on-HAT OLED. Good luck!
Can you please help me to get this working? I have a raspberry pi zero, I followed your instructions but when I turn it on the green led of the raspberry turns on for about 1 second then it turn off and flash 1 time. On the oled display I don't get anything and on the hdmi I get the rainbow image. I also tried to install noobs to see if the SD card was bad but I works fine
Hi Marcello! First I need to make one thing clear: Running Pi1541 on a Zero or Pi1 WILL display a rainbow screen on HDMI, because Pi1541 never initialises the GPU at all. It still runs, but never touches the GPU, so the firmware rainbow screen will be the last thing the GPU is asked to display. So, in your case, if you have prepared the card right and use the right kernel.img for Zero, I would go with the assumption that Pi1541 IS running, and you have some issue with the hat or maybe just the OLED. I would start with connecting it all up and try a load”$”,8 and a list. After that, it would be difficult for me to give you a good idea without getting my own hands on it, I suppose...
@@TheLEEC thank you very much for the answare. typing LOAD"$",8 results in a "?DEVICE NOT PRESENT ERROR" so i guess i did something wrong when i put the hat toghether, i'll try to check all the solderjoins
@@marcy12222 Bit late for the party, but could you share what did you skip? I have gone over the instructions several times and I'm trying to figure out did I mess up something with SD card or doesn't pi1541 just like rpi zero w.
Hi, great video! I tried this with my existing Pi1541 hat & my new RPi zero. It seems to work but the HDMI connection from the RPi zero to a monitor just displays a rainbow screen & a USB keyboard can't be used to navigate through the ROM list....The Pi1541's LCD screen displays correctly. When I use the Pi1541 with RPi 3B+ the HDMI & the LCD both work at the same time & I can use a USB keyboard to navigate the ROM list. Is the HDMI & USB keyboard supposed to work on the RPizero with the Pi1541 hat installed?
Hi, Len! Thanks for the kind words. On the Pi0 and Pi1 models Pi1541 has a reduced feature set, so the HDMI and USB control is not available and not possible. The reason for this is that anything that needs constantly unpredictable CPU cycles will make the emulation unstable. The single CPU core, already running at a high load on these Raspberry models, needs to be completely dedicated to the cycle exact emulation. So, the HDMI interface requires a Pi3 (which has 4 CPU cores that can coordinate the tasks without blocking the emulation thread).
@@TheLEEC ....Thanks for the explanation. Makes me sad that I won't be able to use those things, but I understand the reasoning ;-) ....it makes sense. I haven't got my Pi1541 Zero hat yet, but thought I'd try it out with my full-sized one while I wait. Your video was a really good guide to get the SD card set up correctly. Keep up the good work!
My pleasure! Good luck! Work is still being done to optimise the code and cram as many of the features as possible into the Zero, but the single core is a challenge. Maybe some day a new Zero version with multiple cores will come and solve that. All the best!
Hi Crazy! :P When it comes to the Pi1 models the results can be a bit unpredictable. The overclocking needed works on some boards, but it’s not guaranteed. Cooling helps sometimes but not always, so transmission line timings are probably part of the problem. It’s worth trying though! My attempts (2 B+ boards) have been successful and stable without cooling.
You know, you could just ZIP all the contents of the SD card for the zero so it would just need to download it and unzip it on an sdcard and it would be a breeze for people to use it.
ZIP? Who’s he? :P Well, sure, I see your point there... but that sort of defeats the purpose of doing an instructional video, doesn’t it? “Hey teacher, I need help with this algebra stuff. I’ll just pop off to the pub while you do it...”. Secondly, even if many people have a similar setup, a surprising amount of people have variants with different LCDs, rotary encoders, etc. You need to make decisions to get it running. Furthermore, the Pi firmware bits and the drive roms are not mine to redistribute and that’s why Steve White hasn’t included them in the Pi1541 package. But sure, some of the defaults in the config file could probably be updated to more common settings. Maybe Steve will work on that.
Hi Kevin, didn't worked in my setup, I tried with the original pi model b revision 1, from 2011 (the audio jack is black, not blue). Can be done with this model? I have replaced some pins, according to this diagram because my board have 26pins insted of 40, any clue? thanks in advance elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29
Hi Tony, Getting the Pi 1 running should be seen as a challenging entertainment more than a feasible solution at this point. The Pi 1 Plus model with the newer form factor has many improvements in its power rail circuitry and has a better potential for overclocking over the very original Pi 1, but even there it is a challenge and luck varies between boards. I would probably not see it as worth the effort given the 26-pin obstacle and that a supported Pi Zero can make the problem go away for less than $10. But... maybe I’d try it for the challenge with the lowest expectations. :) Good luck!
@@TheLEEC Thanks for the answer, George! (lol) I used to have that board in my closet and I thought will be a good use for it! My 3 board is with retro pi... Thanks for the advice, great video by the way!
Here are some info on how to connect the 26pin gpio (Not done by me by the way! ). It's implemented and supported in the original source code by Stephen White as well as far as I understand. Have been meaning to test this for some time now, but sadly I haven't had the time to test it myself. But will do that as soon as I can :) github.com/Andreas-B1105/Pi1541-RPI-1B-26GPIO
Hi there. The OLED/LCD works fine on Zero and it is not a part of the IEC circuit, uses its own pins and should be unaffected by the choice of Option A or B. Buzzer or speaker sound is not supported on Zero at all and that is honestly a relief.
Currently, no. Pi1541 is developed to run bare metal on the Raspberry Pi 0 (or 3) without any operating system, so a lot of the code is hardware specific. I’m sure Steve White wouldn’t object if someone wants to contribute and port it to other platforms but I don’t think it’s on the roadmap.
Hi there. The Zero W is practically identical the older Zero, apart from the additional radio chip, so Pi1541 will work fine. (For those who might read this and wonder why my answer doesn’t refer to the WH model, it is because there is no WH model. WH is just an order code to get the GPIO pin header factory soldered. Only models Zero and Zero W exists.)
I've already got it running on a Pi3, but it would be nice to free that up and use the Pi1B+ that is just doing nothing. Thanks for the video! edit: I think the extra config settings were what I was missing. Will try it today and provide feedback.
My pleasure. FYI, the 1B+ will usually work fine with these overclocking settings, but they are quite far above the reliable speeds for both the RAM and SoC and results may vary. I’ve seen a few 1B+ that struggle to keep up, but I haven’t heard of any of them being damaged from it. Good luck!
Very nice video tutorial. I'm actually using the Pi1541 cable version. It works fine but I'm wondering how can I use the browse mode on the RPI+USB keyboard+HDMI output to a monitor, in order to mount D64 images. In the official web page it says: "USING Once set up, you can optionally connect the Pi to a screen via the HDMI port (also connect a USB keyboard). You can then use the keyboard to navigate folders and select disk images. PAGEUP/DOWN help move faster through the folders. INSERT adds an image into the selected list. ENTER adds an image into the selected list and enters emulation mode. ESC exits a mounted image (and emulation mode) (and clears the selections). BACKSPACE backs out of a folder (and clears the selections). Whilst in emulation mode, the number keys are used to swap disk images (when multiple images are selected). Whilst in browse mode, the number keys are used to swap ROM images. Once an image is mounted you can use the Commodore computer as you would for a disk inserted into a real 1541." How can I use this mode, i.e. browsing d64 images on the RPI with a keyboard and HDMI monitor instead of the FB64 browser? Many thanks.
Hi David, sorry for the slow answer. Thanks for the kind words. From the context of the video I assume you are using a Pi Zero or Pi1. In this case the HDMI and USB is not available and not possible. The reason for this is that they need constantly unpredictable CPU cycles and the single CPU core needs to be completely dedicated to the cycle exact emulation. So, the HDMI interface requires a Pi3 (which has 4 CPU cores). So unfortunately your options to control Pi1541 are to use the FB64 file browser on the C64 or get a full LCD equipped Pi1541 hat.
@@TheLEEC Thank you very much, yes I am using an RPI 1 Model B+ w/ 512MB RAM and yes, your reply is exactly what I needed to know. So thank you for your explanation. I'll go with the FB64 file browser. At least until I get an RPI 3b+. :-)
In combination with many fast loaders or demos/games it is necessary to select all disks of the multi set before you mount the first one and swap between them WITHOUT unmounting and stopping the emulation. This is because you want the emulated drive to never “power off”. It nees to retain all the fast loader code that is injected on it. Unmounting the disk will exit emulation and pi1541 will be reset and almost all fast loaders will be confused. It is similar to power cycling a normal 1541 drive.
Hi! The overclocking for the Pi1 B+ is shown at 15:50 in the video and worked well for mine. The numbers are quite a bit over the comfortable levels for the Pi1 so success may vary from one Pi1 to another. We set the temp limit there also, so the Pi1 should be safe, but once it reaches the limit it’ll start to throttle down and that might give you emulation issues in Pi1541, so a heat sink is probably a good idea. I never needed one but I never ran the Pi1 more than a few minutes.
@@TheLEEC I had to overclock mine even more to get everything to work. Here is my config.txt: kernel_address=0x1f00000 arm_freq=1250 over_voltage=8 sdram_freq=550 sdram_over_voltage=2 core_freq=550 temp_limit=75 force_turbo=1 boot_delay=1 It's running with a home made copper heat sink and a fan.
Cool. Well done. Certainly proof that results may vary quite a bit with the Pi1. I found that SDRAM clock matters a bit more than the core to push that last margin. Thanks for sharing.
Hello. Fantastic video. Thanks for sharing! I booted my Pi and all I'm seeing is a logo for the Pi1541 V1.23 in the OLE screen. Pushing buttons 1-5 has no effect and the C64 can't find FB64. Any thoughts?
Hi Gary! Thanks for the kind words. Getting as far as the logo is promising, because that indicates the configuration can be read correctly. I would assume at that point Pi1541 attempts to access and list the contents of the 1541 folder. Make sure the file system on the SD card is healthy and proper FAT32. Also check to make sure there is no typo in the 1541 folder name. If I get the time later I will try to replicate that issue. I have never seen it lock up at the logo screen before.
@@TheLEEC Thank-you! I followed the website for the original build as you've directed (for the files). I have some confusing about what version to use for the VICE emulator files. Also many people around the web are renaming the DRIVE file; some with extensions some without; example: dos1541 vs d1541. I amusing a program to format my sd card on my Mac. It's called SD Card Formatter. so many variations. However, i didn't get anything to happen until i followed your video. i really hope to get this working. I spend probably 8 hour yesterday trying everything.
Hi again! I managed to replicate your issue here before seeing your reply and what I found is actually related to that rom file. The default drive firmware name should be exactly dos1541 without any extension. If this file is not found it will get stuck at the logo screen. This should be copied as is out of the DRIVES folder in any recent VICE version (identical file in all of them) and this is the one used when testing the releases. Also, it should be placed in the SD card root folder, not in the 1541 folder. Additional roms can be specified in options.txt but the default rom is intended to be this exact one. I hope this helps a bit.
@@TheLEEC Perfect. That makes sense as to why its not working!!! I was renaming it. Thanks again. I'll let you know how it goes! Again thanks for your very helpful video tutorial!
@@TheLEEC Hello again! Well i tried a forth time. I followed your steps exactly without using the Pi0 files. I'm using a pi3B. I used all the other files exactly as directed. And even though I enabled quick boot option as you've directed, I am still seeing it on my OLE screen and the FB does not appear. It's still stuck. I'm lost again on what else to do. Can i send you a zipped file of my SD card contents? Thanks!
Chargen/ROMchar on the Pi0 got fixed in v1.25, i just got the beta and have 4 lines on my 32px display now (instead of 2, on a 64px it's 8 lines instead of 4!)
Thanks for the info, Knut!
That sounds great! Is there a place to download that right now, or is it a closed beta?
@@theparkourhobo It's not for public download, but I guess Stephen will mail it to you if you ask him via mail! ;-)
@@fuckutube65 Why is he not updating github???
The "litmus test" for this is to load Ghosts&Goblins arcade game on a C64 with it. If the timing is perfect, then it loads perfectly! If the timing is off by even a slight amount, loading this game will fail. The Pi zero would not load this game for me, so I went through a painful endeavor to figure out how to use a Pi Zero 2W, which has more "CPU power and a faster clock speed". To use this, you have to load all the Pi1541 firmware on the pi zero 2 and "make" the firmware, then copy it to the appropriate MicroSD card. It took me most of a day to figure this out, but the Pi Zero 2W DOES have the power and precision to load Ghosts&Goblins with the Pi1541.
Since I already have a Pi 1 sitting here, this information is very helpful. Thanks!
Excellent! Glad I could help. Good luck.
Did you get it working well?
pi1541 is a very nice thing but I think the only device need is the Ultimate 2+ it costs almost the same of all raspberry stuff (the board, the hat, the psu, some case, the cables, etc etc) and gives to the C64 everything you ever dreamt of: ram expansion, cartridges, tapes and 2 perfectly emulated drives. Nothing more than that is really needed. Unless you have a fetish for tapes, the there is the Cute32 project too. But I was a drive guy more than a tape guy :D Anyway, nice video and keep it on!
Thanks for the kind words. I agree, the Ultimate is an excellent device. I covered it briefly in an earlier video. The cost of Pi1541 does vary a lot depending on what point you start at.
Still, a new €10 Pi Zero or €35 RPi3 with a €20 hat and potentially a leftover PSU from some old phone still a far way from the €140 list price of the Ultimate.
You can go very low in cost for Pi1541 and get a good experience, but going all in with all new stuff, list prices, big screen and custom case you might get close to €100. And if you’re aiming for the best possible you’re probably better off going for the Ultimate. Neither Pi1541 nor SD2IEC will get you the best.
Thank you for this video. :-)
Everything was explained very well.
With this guide I was able to configure my Raspberry Pi Zero as a Pi1541 emulator.
Unfortunately, the link in the video min 3:13 (Nightly builds) no longer works. The following information appears: "Game Over - Use the officially supported ad hoc builds from Github"
Couldn't find our conversation, but the lcd on my Pi1541 zero epyx cartridge was crap. Replaced it and now its party time!
Excellent! I guess that was the most likely culprit, but it would have been nice if it wasn’t. Thanks for the report and party on!
Ok, that was a very good video. I have a question, I have a pi zero, did the work as described and tried to power it up, but without the connection to the CBM 64 itself.
The screen on the pi hat does not light up. I see 2 green flashes from the ON led, but nothing else....
Is that normal, or can the pi1541 only work when connected to an actual 64?
I just got a RasPi0 for this exact purpose, thank you for the step-by-step guide!
Thanks Boris! I’m glad you found it useful.
Ok.. the rpi0 costs 6 euros but what about the HAT? where to find it? How much it costs? Shipping is what?.. hmmm can be a nice "backup" unit though.
Also great points. Well, the choices are many. The minimal solution option A hardware can be built for peanuts (
built one yesterday (albeit the simpler A option) it seems to run but the oled displays only the boot logo
I haven't connected it yet to my c64, is this correct behaviour or i'm missing some configuration?
Great!
I will try mine on a pi zero when it comes in the mail.
😁
Thanks! I hope it all goes smoothly.
Great video! Thanks. Question are you able to play in the pi zero multiple disk games?
So, after 2 years, I'm finally getting around to trying it with the Pi1b. It worked! In fact, my Pi3B+ was giving problems. So I have a couple problems to iron out. 1) 1581 .d81 images arent loading at all. I've checked all the settings. Getting "drive not ready' and stuff like that. Other problem is that disk copy to a real 1541 just isn't working. Fast Hack'em says that the disk was copied, but the disks just arent getting written. Drive can read commercial disks and ones that I made a year ago. Maybe the drive needs to be calibrated. I'm just about at the point of just selling the whole thing. Probably put only 10 hours into it last year and those were mostly trying to get different disk images to work on the pi1541.
I have a raspberry pi 1.1 a+ when I try and make with option RASPPI = 1BPlus it does not work.
Excellent video, thank you. Have you tried 1581 on it? I've followed the instructions online (there aren't many unfortunately) but cannot get it to work. If you can, would you consider making a quick video (also, have you tried jiffy dos at all?).
Thanks for the kind words! I did try the 1581 mode during beta testing a few months back and it worked nicely. I might get some time for video production next week so I’ll see what I can do. (JiffyDOS is something I haven’t tried in a very long time so the answer is leaning towards a no.)
@@TheLEEC Thanks, I'd like to see that :)
I wonder why there is not a pi1541 sourcecode version on which the timings are adapted for Pi0 without the need to overclock the device. I think due to the compactness and price of Pi0 it had to be the preferred choice right from the start to develop pi1541.
That's excellent input, Roberto. Perhaps Steve White himself is a better person to answer that, but let me theorise.
The 1541 drive contains a lot of components, and Pi1541 aims to be a "cycle exact" emulator. This means that for every emulated clock cycle the interactions between the components are timed accurately enough so that the emulated hardware behaves the same way as the original drive would for any given input. This interaction between the components are exploited in creative ways in some fast loaders and other drive injected software. For the 100% compatibility aim, staying cycle exact is key. To do this, the emulator must have a fair amount of performance headroom and not experience too many unpredictable events. Quite a large amount more actually than a normal, theoretically "instruction accurate", emulation at 1MHz.
The Raspberry Pi 3 has 4 CPU cores, so it is fairly easy to dedicate a single core fully to emulation. The other 3 cores can do screen updates, polling, sound and other UI-related things. The emulated core can stay uninterrupted and run in a predictable way.
For a long time, scaling it down to the Pi Zero was the intention, but certainly a challenge because there is only a single CPU core to work with. All UI except for GPIO/OLED had to be thrown out and all the crucial bits adjusted to run in the single CPU core of the Zero in a way that wouldn't interfere with the emulation. Also, the single A7 core is nowhere near as powerful as a single core of the Cortex A53 on the Pi 3, so a whole lot of code optimisation was needed. Still, at that point overclocking was the only way to stay cycle exact. There's just not enough grunt to have a margin for "timing" the emulation with the rest of the necessary code. Perhaps further optimisation of the code can remove this need in the future.
Hi! How many seconds are required to have rpi ready to accept command?
Hi Saverio! Pi1541 usually takes 3-6 seconds from power on until drive ready.
Which PLA was in that first C64 that was incompatible with the game? I am going to use the PLAnkton in my C64 build, so I wonder if there are any problems with that one.
Hi Sean! The PLA replacement I was using was an old CPLD implementation from 2010 by fpgaarcade. It was fairly experimental.
The PLAnkton on the other hand is a great choice and should serve you well.
@@TheLEEC Thank you for the information!
Thanks to your video I was able to run Pi1541 on Pi Zero. Even the rotary encoder works properly!
Is it a chance that you or Steve will add support for USB flash drives on Pi Zero?
It's nice that you like my comment Tony, but what about my question? :)
;) It was delayed by earth’s refusal to be flat. Thanks for the feedback. It’s nice to know that it is of value. I will check your question with Steve and get back to you. Spontaneously I feel it should be doable, but he will know for sure.
I've got one problem with both Pi Zero and Pi 3B+. Ghost'n Goblins shows glitched title screen and the game doesn't start. I don't care for that particular game and other games I tried run without any problems. But it bothers me anyway :) I have original 2.5A power supply. I've tried two different hex inverters - SN7406C by Texas Instruments and UCY7406 by CEMI. My Pi1541 hat is made on hackup.net board rev.4.
The most predictable results seem to be the latest Pi1541 release with GraphIEC off on RPi3:s. I’d start with that as a baseline, but after that I suppose there’s no good shortcut to troubleshooting it other than finding a buddy with a complete working setup and swapping parts until the culprit is found.
If you find it’s the hat, and you have already tried a good inverter, I suppose the level shifter could be glitchy. I’ve even seen problems with GnG on some c64’s on original 1541 drives. I wish I could give you a better answer.
Apparently the USB driver module causes a lot of interrupts that effectively breaks the cycle exact emulation. So, only having a single CPU core to work with, it had to be removed the Pi Zero/1 version. It seems unlikely that it can be added in any time soon. Sorry.
I know this is an old video but hopefully you see this! :) I just tried this using my Pi Zero W but only get the "Rainbow Square" in the bootup process... According to the info I found this is because the kernel.img is not booting correctly! I am using the latest version of Pi1541 (v1.24) but cannot find any older versions like the one you are using to test with! Any ideas?
HDMI output on Pi1541 is only supported on Pi3 models. Running Pi1541 on a Zero or Pi1 WILL display a rainbow screen on HDMI, because Pi1541 never initialises the GPU at all. It still runs, but never touches the GPU, so the firmware rainbow screen will be the last thing the GPU is asked to display.
So, in your case, if you have prepared the card right and use the right kernel.img for Zero, I would go with the assumption that Pi1541 is actually running, but you'll need verify that by connecting to a Commodore or using an on-HAT OLED. Good luck!
Can you please help me to get this working? I have a raspberry pi zero, I followed your instructions but when I turn it on the green led of the raspberry turns on for about 1 second then it turn off and flash 1 time. On the oled display I don't get anything and on the hdmi I get the rainbow image. I also tried to install noobs to see if the SD card was bad but I works fine
Hi Marcello! First I need to make one thing clear: Running Pi1541 on a Zero or Pi1 WILL display a rainbow screen on HDMI, because Pi1541 never initialises the GPU at all. It still runs, but never touches the GPU, so the firmware rainbow screen will be the last thing the GPU is asked to display.
So, in your case, if you have prepared the card right and use the right kernel.img for Zero, I would go with the assumption that Pi1541 IS running, and you have some issue with the hat or maybe just the OLED. I would start with connecting it all up and try a load”$”,8 and a list.
After that, it would be difficult for me to give you a good idea without getting my own hands on it, I suppose...
@@TheLEEC thank you very much for the answare. typing LOAD"$",8 results in a "?DEVICE NOT PRESENT ERROR" so i guess i did something wrong when i put the hat toghether, i'll try to check all the solderjoins
@@TheLEEC ok i fix it, the problem was that i'm stupid and i don't read instructions, sorry if i wasted your time
Cool! No worries. Glad you got it working!
@@marcy12222 Bit late for the party, but could you share what did you skip? I have gone over the instructions several times and I'm trying to figure out did I mess up something with SD card or doesn't pi1541 just like rpi zero w.
Hi, great video! I tried this with my existing Pi1541 hat & my new RPi zero. It seems to work but the HDMI connection from the RPi zero to a monitor just displays a rainbow screen & a USB keyboard can't be used to navigate through the ROM list....The Pi1541's LCD screen displays correctly. When I use the Pi1541 with RPi 3B+ the HDMI & the LCD both work at the same time & I can use a USB keyboard to navigate the ROM list. Is the HDMI & USB keyboard supposed to work on the RPizero with the Pi1541 hat installed?
Hi, Len! Thanks for the kind words.
On the Pi0 and Pi1 models Pi1541 has a reduced feature set, so the HDMI and USB control is not available and not possible. The reason for this is that anything that needs constantly unpredictable CPU cycles will make the emulation unstable. The single CPU core, already running at a high load on these Raspberry models, needs to be completely dedicated to the cycle exact emulation. So, the HDMI interface requires a Pi3 (which has 4 CPU cores that can coordinate the tasks without blocking the emulation thread).
@@TheLEEC ....Thanks for the explanation. Makes me sad that I won't be able to use those things, but I understand the reasoning ;-) ....it makes sense. I haven't got my Pi1541 Zero hat yet, but thought I'd try it out with my full-sized one while I wait. Your video was a really good guide to get the SD card set up correctly. Keep up the good work!
My pleasure! Good luck! Work is still being done to optimise the code and cram as many of the features as possible into the Zero, but the single core is a challenge. Maybe some day a new Zero version with multiple cores will come and solve that. All the best!
I found a PI B+ v1.2 from 2014, would it work for this project ? it have no heatsink, but i guess i have an option to mount a cooler if needed.
Hi Crazy! :P When it comes to the Pi1 models the results can be a bit unpredictable. The overclocking needed works on some boards, but it’s not guaranteed. Cooling helps sometimes but not always, so transmission line timings are probably part of the problem. It’s worth trying though! My attempts (2 B+ boards) have been successful and stable without cooling.
You know, you could just ZIP all the contents of the SD card for the zero so it would just need to download it and unzip it on an sdcard and it would be a breeze for people to use it.
ZIP? Who’s he? :P Well, sure, I see your point there... but that sort of defeats the purpose of doing an instructional video, doesn’t it?
“Hey teacher, I need help with this algebra stuff. I’ll just pop off to the pub while you do it...”.
Secondly, even if many people have a similar setup, a surprising amount of people have variants with different LCDs, rotary encoders, etc. You need to make decisions to get it running. Furthermore, the Pi firmware bits and the drive roms are not mine to redistribute and that’s why Steve White hasn’t included them in the Pi1541 package. But sure, some of the defaults in the config file could probably be updated to more common settings. Maybe Steve will work on that.
@@TheLEEC no, it does not. But nevermind.
Hi Kevin, didn't worked in my setup, I tried with the original pi model b revision 1, from 2011 (the audio jack is black, not blue). Can be done with this model?
I have replaced some pins, according to this diagram because my board have 26pins insted of 40, any clue? thanks in advance
elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29
Hi Tony,
Getting the Pi 1 running should be seen as a challenging entertainment more than a feasible solution at this point. The Pi 1 Plus model with the newer form factor has many improvements in its power rail circuitry and has a better potential for overclocking over the very original Pi 1, but even there it is a challenge and luck varies between boards. I would probably not see it as worth the effort given the 26-pin obstacle and that a supported Pi Zero can make the problem go away for less than $10. But... maybe I’d try it for the challenge with the lowest expectations. :) Good luck!
@@TheLEEC Thanks for the answer, George! (lol)
I used to have that board in my closet and I thought will be a good use for it! My 3 board is with retro pi...
Thanks for the advice, great video by the way!
Hehe ;) thanks. Glad you liked it.
Here are some info on how to connect the 26pin gpio (Not done by me by the way! ). It's implemented and supported in the original source code by Stephen White as well as far as I understand. Have been meaning to test this for some time now, but sadly I haven't had the time to test it myself. But will do that as soon as I can :)
github.com/Andreas-B1105/Pi1541-RPI-1B-26GPIO
Good stuff. Thanks Björn!
does the pizero lcd screen work on an option a with pi1541 zero,also does the sound for a pizero work on option b with pi1541 zero?
Hi there. The OLED/LCD works fine on Zero and it is not a part of the IEC circuit, uses its own pins and should be unaffected by the choice of Option A or B. Buzzer or speaker sound is not supported on Zero at all and that is honestly a relief.
thanks for the video
Will this work on an OrangePi zero ?
Currently, no. Pi1541 is developed to run bare metal on the Raspberry Pi 0 (or 3) without any operating system, so a lot of the code is hardware specific. I’m sure Steve White wouldn’t object if someone wants to contribute and port it to other platforms but I don’t think it’s on the roadmap.
@@TheLEEC I see, didn't knew it was running bare-metal. Thanks.
Does this also work on the Zero WH?
Hi there. The Zero W is practically identical the older Zero, apart from the additional radio chip, so Pi1541 will work fine. (For those who might read this and wonder why my answer doesn’t refer to the WH model, it is because there is no WH model. WH is just an order code to get the GPIO pin header factory soldered. Only models Zero and Zero W exists.)
What is that red addon board and where can I buy it?
It is one of many different Pi1541 hats available on the interwebs. This one is from ribit.se.
@@TheLEEC Thanks. :)
I've already got it running on a Pi3, but it would be nice to free that up and use the Pi1B+ that is just doing nothing. Thanks for the video! edit: I think the extra config settings were what I was missing. Will try it today and provide feedback.
My pleasure. FYI, the 1B+ will usually work fine with these overclocking settings, but they are quite far above the reliable speeds for both the RAM and SoC and results may vary. I’ve seen a few 1B+ that struggle to keep up, but I haven’t heard of any of them being damaged from it.
Good luck!
@@TheLEEC thanks. I've got some extra heatsinks
GnG arcade works fine on sd2iec, better example would be maniac mansion or dott
Thanks, Gavin, for the feedback. Good suggestion.
Very nice video tutorial. I'm actually using the Pi1541 cable version. It works fine but I'm wondering how can I use the browse mode on the RPI+USB keyboard+HDMI output to a monitor, in order to mount D64 images. In the official web page it says: "USING
Once set up, you can optionally connect the Pi to a screen via the HDMI port (also connect a USB keyboard).
You can then use the keyboard to navigate folders and select disk images.
PAGEUP/DOWN help move faster through the folders.
INSERT adds an image into the selected list.
ENTER adds an image into the selected list and enters emulation mode.
ESC exits a mounted image (and emulation mode) (and clears the selections).
BACKSPACE backs out of a folder (and clears the selections).
Whilst in emulation mode, the number keys are used to swap disk images (when multiple images are selected).
Whilst in browse mode, the number keys are used to swap ROM images.
Once an image is mounted you can use the Commodore computer as you would for a disk inserted into a real 1541."
How can I use this mode, i.e. browsing d64 images on the RPI with a keyboard and HDMI monitor instead of the FB64 browser? Many thanks.
Hi David, sorry for the slow answer.
Thanks for the kind words.
From the context of the video I assume you are using a Pi Zero or Pi1. In this case the HDMI and USB is not available and not possible. The reason for this is that they need constantly unpredictable CPU cycles and the single CPU core needs to be completely dedicated to the cycle exact emulation. So, the HDMI interface requires a Pi3 (which has 4 CPU cores).
So unfortunately your options to control Pi1541 are to use the FB64 file browser on the C64 or get a full LCD equipped Pi1541 hat.
@@TheLEEC Thank you very much, yes I am using an RPI 1 Model B+ w/ 512MB RAM and yes, your reply is exactly what I needed to know. So thank you for your explanation. I'll go with the FB64 file browser. At least until I get an RPI 3b+. :-)
I'm having problems where it won't let me insert a disc 2 like it doesn't recognize the pi1541 after that
In combination with many fast loaders or demos/games it is necessary to select all disks of the multi set before you mount the first one and swap between them WITHOUT unmounting and stopping the emulation. This is because you want the emulated drive to never “power off”. It nees to retain all the fast loader code that is injected on it. Unmounting the disk will exit emulation and pi1541 will be reset and almost all fast loaders will be confused. It is similar to power cycling a normal 1541 drive.
@@TheLEEC thank you
Should I use the same overclocking setting on a Pi1 B+ V1.2? And do I need cooling for that?
Hi! The overclocking for the Pi1 B+ is shown at 15:50 in the video and worked well for mine. The numbers are quite a bit over the comfortable levels for the Pi1 so success may vary from one Pi1 to another. We set the temp limit there also, so the Pi1 should be safe, but once it reaches the limit it’ll start to throttle down and that might give you emulation issues in Pi1541, so a heat sink is probably a good idea. I never needed one but I never ran the Pi1 more than a few minutes.
And maybe I should clarify: I was also using a Pi1 B+ V1.2 there in the last part of the video.
@@TheLEEC Great! Thanks!
@@TheLEEC I had to overclock mine even more to get everything to work. Here is my config.txt:
kernel_address=0x1f00000
arm_freq=1250
over_voltage=8
sdram_freq=550
sdram_over_voltage=2
core_freq=550
temp_limit=75
force_turbo=1
boot_delay=1
It's running with a home made copper heat sink and a fan.
Cool. Well done. Certainly proof that results may vary quite a bit with the Pi1. I found that SDRAM clock matters a bit more than the core to push that last margin. Thanks for sharing.
Hello. Fantastic video. Thanks for sharing! I booted my Pi and all I'm seeing is a logo for the Pi1541 V1.23 in the OLE screen. Pushing buttons 1-5 has no effect and the C64 can't find FB64. Any thoughts?
Hi Gary! Thanks for the kind words. Getting as far as the logo is promising, because that indicates the configuration can be read correctly. I would assume at that point Pi1541 attempts to access and list the contents of the 1541 folder. Make sure the file system on the SD card is healthy and proper FAT32. Also check to make sure there is no typo in the 1541 folder name. If I get the time later I will try to replicate that issue. I have never seen it lock up at the logo screen before.
@@TheLEEC Thank-you!
I followed the website for the original build as you've directed (for the files). I have some confusing about what version to use for the VICE emulator files. Also many people around the web are renaming the DRIVE file; some with extensions some without; example: dos1541 vs d1541. I amusing a program to format my sd card on my Mac. It's called SD Card Formatter. so many variations. However, i didn't get anything to happen until i followed your video. i really hope to get this working. I spend probably 8 hour yesterday trying everything.
Hi again! I managed to replicate your issue here before seeing your reply and what I found is actually related to that rom file.
The default drive firmware name should be exactly dos1541 without any extension. If this file is not found it will get stuck at the logo screen. This should be copied as is out of the DRIVES folder in any recent VICE version (identical file in all of them) and this is the one used when testing the releases. Also, it should be placed in the SD card root folder, not in the 1541 folder.
Additional roms can be specified in options.txt but the default rom is intended to be this exact one.
I hope this helps a bit.
@@TheLEEC Perfect. That makes sense as to why its not working!!!
I was renaming it. Thanks again. I'll let you know how it goes! Again thanks for your very helpful video tutorial!
@@TheLEEC Hello again! Well i tried a forth time. I followed your steps exactly without using the Pi0 files. I'm using a pi3B. I used all the other files exactly as directed. And even though I enabled quick boot option as you've directed, I am still seeing it on my OLE screen and the FB does not appear. It's still stuck. I'm lost again on what else to do. Can i send you a zipped file of my SD card contents? Thanks!
Does this work with the original Pi Zero (not W nor W2)? thanks
Probably works only in Old Zero (not 2 / W) but untill I get any operational Old zero - it's unknown..
For pi zero W not working 😢