![Trevor Makes](/img/default-banner.jpg)
- 19
- 199 025
Trevor Makes
United States
Registrace 22. 08. 2022
Making electrical and computer engineering projects.
Designing a full PCB project with KiCad for 8-bit computer
Building an 8-bit 2364 ROM to 28C64 EPROM adapter for Commodore 64 and VIC-20. Full KiCad PCB design tutorial.
Links
github.com/trevor-makes/kicad-2364-rom-adapter
www.kicad.org/
ist.uwaterloo.ca/~schepers/sockets.html
Chapters
00:00 - Intro
01:33 - Symbol editor
06:00 - Schematic editor
11:29 - Fixing a mistake in the symbol editor
13:34 - Footprint editor
18:05 - PCB editor
19:26 - Fixing a mistake in the footprint editor
21:28 - PCB editor continued
26:19 - Plotting and viewing gerbers
Links
github.com/trevor-makes/kicad-2364-rom-adapter
www.kicad.org/
ist.uwaterloo.ca/~schepers/sockets.html
Chapters
00:00 - Intro
01:33 - Symbol editor
06:00 - Schematic editor
11:29 - Fixing a mistake in the symbol editor
13:34 - Footprint editor
18:05 - PCB editor
19:26 - Fixing a mistake in the footprint editor
21:28 - PCB editor continued
26:19 - Plotting and viewing gerbers
zhlédnutí: 2 057
Video
Building a C64 automatic EXROM reset circuit with an Arduino
zhlédnutí 281Před 2 měsíci
Building a better EXROM reset circuit for the Commodore 64 using an Arduino microcontroller. Links github.com/trevor-makes/c64_reset_hook tech.guitarsite.de/cbm80.html www.c64-wiki.com/wiki/Reset_Button ist.uwaterloo.ca/~schepers/MJK/hard_reset.html Chapters 00:00 - Intro 01:25 - Capturing a trace 03:37 - Analyzing the trace 07:26 - Writing the Arduino code 12:03 - Assembling the circuit 14:34 ...
How did 5 bytes make my Commodore 64 sick?
zhlédnutí 20KPřed 3 měsíci
There’s a sequence of 5 bytes that can prevent a Commodore 64 from being reset or restored, forcing the computer to be switched off while the memory discharges. I’ll show you how this works by explaining the memory map, demonstrating with example code, and building a circuit called The Unstoppable Reset. Links github.com/trevor-makes/c64_reset_hook tech.guitarsite.de/cbm80.html www.c64-wiki.com...
How a 555 timer broke early C64 boards
zhlédnutí 36KPřed 4 měsíci
The early Commodore 64 326298 boards have a flaw that prevents cartridges from using the reset line, which causes problems with the Final Cartridge, EasyFlash, Fung Fu Flash, and BackBit among others. I’ll show you how the 555 timer reset circuit works, why it causes the problem, and a simple mod to fix it. Links www.lemon64.com/forum/viewtopic.php?t=74222 www.lemon64.com/forum/viewtopic.php?t=...
What's wrong with this Commodore 64?
zhlédnutí 642Před 5 měsíci
Restoration of a 1982 Rev A breadbin Commodore 64 that I found at a garage sale. Most of the keyboard keys don't work, so what can I do to fix it? 00:00 - Introduction 00:38 - Examining the outside 02:13 - Booting it up 04:58 - Examining the inside 09:20 - Testing keypress resistance 12:33 - Repairing the keyboard 15:38 - What about Shift Lock? 19:50 - Cleaning the outside 21:50 - Does it work?
Expanding an aging solar array
zhlédnutí 424Před 6 měsíci
DIY adding more panels to a solar grid. Extending a strut channel frame with straight brackets. Mounting panels with end-clamps and mid-clamps. Rewiring series and parallel panel strings to match inverter max voltage ratings. Chapters 00:00 - Introduction 00:35 - Extending the frame 02:01 - Mounting the panels 03:21 - Series vs parallel wiring 05:35 - Did it work?
What can this inexpensive ESP32 touchscreen do?
zhlédnutí 4,3KPřed 9 měsíci
Unboxing and programming the Elecrow ESP32 WiFi Bluetooth touch screen display compatible with LVGL, Arduino, PlatformIO, and MicroPython. Find it here: www.elecrow.com/esp32-display-5-inch-hmi-display-rgb-tft-lcd-touch-screen-support-lvgl.html?idd=3 Chapters 00:00 - Introduction 01:10 - Unboxing and Assembly 03:43 - Built-in Demo 04:56 - Arduino Setup 08:07 - Interlude 08:45 - Hello World 09:5...
Arduino R4 hidden easter egg!
zhlédnutí 70KPřed rokem
The new Arduino R4 Minima and WiFi have a secret and I'll show you how to make use of it in your own sketch! You can find the Renesas RA4M1 hardware manual here: www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra4m1-32-bit-microcontrollers-48mhz-arm-cortex-m4-and-lcd-controller-and-cap-touch-hmi
Can this Commodore 64 be saved?
zhlédnutí 811Před rokem
Restoration of the breadbin C64 retro computer that I learned BASIC programming with. Are my Arduino EEPROM programmer and DRAM tester projects up to the task? Will Jaffar be defeated? Let's find out! Music by StreamBeats Chapters 00:00 - Introduction 01:36 - Let's get started! 04:10 - Boss fight: DRAM PLA 06:48 - The ROM is kinda sus 09:10 - It boots! But the keyboard... 13:02 - The Prince of ...
Teaching a Z80 to share (memory)
zhlédnutí 2,4KPřed rokem
It's true, I made a huge mistake in my breadboard computer. I'll show you three different ways to implement DMA (direct memory access) for shared memory between a Z80 CPU and an Arduino. Find the code at github.com/trevor-makes/avr-z80-part1 retrocomputing.stackexchange.com/questions/25962/z80-bus-control-by-external-device-busrq-or-reset Music by StreamBeats Chapters 00:00 - Introduction 00:28...
Testing DRAM the RIGHT way
zhlédnutí 2,8KPřed rokem
Let me show you how to build a DIY 4164 DRAM tester using the march C- algorithm and row access time measurement. Find the open source code at github.com/trevor-makes/avr-dram-tester Parts used in this project: Arduino Nano ZIF socket SPST switch Red and green LEDs 2x 330 Ω resistors 100 nF capacitor Visual Studio Code: code.visualstudio.com/ PlatformIO IDE: platformio.org/platformio-ide Chapte...
Build an 8-bit Z80 breadboard computer
zhlédnutí 10KPřed rokem
Build and program an 8-bit computer in Z80 assembly language! The computer bus circuit continues from my last video on EEPROM programming using an Arduino Nano. Program an ROT13 cipher and decode a secret message! Find the code at github.com/trevor-makes/avr-z80-part1 Parts used in this project: Arduino Nano 2x 74HC573 latches AS6C62256 SRAM Z84C0010PEG CPU 5x 1 kΩ resistors 100 nF capacitor Vi...
Build an Arduino project with PlatformIO IDE for VSCode
zhlédnutí 14KPřed rokem
How to install PlatformIO extension in Visual Studio Code, an alternative to Arduino IDE. Download my EEPROM programmer from GitHub and upload to Arduino Nano. Visual Studio Code: code.visualstudio.com/ PlatformIO IDE: platformio.org/platformio-ide github.com/trevor-makes/avr-eeprom-programmer Chapters 00:00 - Introduction 00:30 - Install VSCode and PlatformIO 01:09 - Download project from GitH...
Burn an EEPROM with an 8-bit computer bus
zhlédnutí 12KPřed rokem
Build a DIY programmer for 28C parallel EEPROM with an Arduino Nano and use it to burn an 8-bit Commodore 64 cartridge ROM Download free open source EEPROM programmer HERE: github.com/trevor-makes/avr-eeprom-programmer github.com/trevor-makes/core View the assembly code with Compiler Explorer: godbolt.org/z/rW3x3navM Visual Studio Code: code.visualstudio.com/ PlatformIO IDE: platformio.org/plat...
Control 6 RGB LED strips with 1 Arduino
zhlédnutí 10KPřed rokem
Control 6 RGB LED strips with 1 Arduino
The back of the case just shattered like glass. It is plastic but for some reason when it ages it acts more like plexi-glass. Or glass.
Video and sound are slightly out of sync. Very disturbing, makes it sound like a voice-over.
Thank you for this great project. I am diagnosing a non-booting Kaypro IV and this has helped me diagnose few bad chips.
Do they make one with more GPIO connections? That's my main reservation about this sort of display with integrated CPU - there's barely any connections to the outside world. Also, can it use a standard Arduino graphics library, like the Adafruit one? The one being used for the demo is really slow.
DO NOT try to open the phone with a pick unless you have the heat gel thing. "IFix it" . Mine just "Popped!" and plastic shards went everywhere. You HAVE to make sure that seal melts enough. to get the picks under. again, DO NOT open it without heating first.
Nice! Wow! You are well versed in KiCAD. I'm still learning, got a ways to go for sure! I plan on watching this several times and possibly going through all the steps you take, pausing and rewinding and building one of these simple adaptors. Liked and subscribed.
Project files can be found at github.com/trevor-makes/kicad-2364-rom-adapter
I think your videos are very well done, even if some of it slightly over my head. Could you include a KiCad circuit diagram in the related GitHub repo for each video? Also, I have no understanding of how to use PlatformIO.. I like the encryption program you made.. I made one in php that takes over 3600 iterations to get back to the original sequence. pVHMNllMhNBwMe2yywiMNyiMgNllMehVHtMVgMthwMalVHFMVgMrVi3
I have a problem I wonder if you can help me solve? I have a TDL Xitan S100 bus Z80 computer with NO OS system.. When I turn it on, all I get is a screen full of simi-random characters... I was wondering what would be the best way to test if the hardware is functional? One thought was to possibly make an interface to use a C64 running hesmon to scan/read every address on the bus, and see if I could poke some life back into S100 bus.... Eventually I want to add every bell and whistle modern computers have: USB, WiFi, Ethernet, i2c, M.2, SIMM, uSD, (2.5 inch HD or M.2 SSD) Currently the S100 bus has 2 (8 bit data busses).. (8 input) and (8 output).. I have no clue why they did this. I made a KiCad symbol/footprint for the S100 edge connector with a full size blank board to put anything on... (The sky is the limit) The pinout matches the TDL Xitan bus...
In an earlier video I made an Arduino project that interfaces with a simple Z80 computer bus and gives you a HESMON-like monitor over the serial port. See czcams.com/video/A0VpPRWrqHc/video.html I'd recommend figuring out how to adapt that project to the S100 bus signals: in particular how the Arduino takes control of the bus using BUSRQ, how the Arduino synchronizes with the S100 PHI clock, and maybe extending the monitor commands to include reading/writing I/O ports. Build that into a circuit board for an S100 card and then proceed to poke around on the address bus; dump memory where the ROMs should be and verify they're not corrupted, and see if you can talk directly to any of the other S100 cards given any documentation you can find. You might also look into building an adapter board from your S100 bus to an RC2014 module as you might be able to find some existing modules to do some of the stuff you want or at least give you a starting point for designing your own S100 cards.
Nice. I just learned a bunch of new tricks in KiCad.
Thank you. Really helped me. I also used the iFixit Replacement Battery and Tools.
If you're a P3 owner, DO NOT save important data on it. My P3 just randomly died, and I later learnt that it is a known issue (EDL mode). Google used a cheap storage chip that dies after a few years. Take out all the important out of your phone before it suddenly dies without any way to recover your files.
I wanted to internally attach a FT3001MPX to the Restore key and then use dual n-MOSFET with an R/C (1K+0.1uF) delay on the gate that controls exprom. So you would need to hold down Restore for 3 seconds, shorter and it acts as normal.
I think it would be cheaper/simpler to use an ATtiny instead of a timer and discrete parts. There are several KERNAL switcher mods that use a timer on the restore key like that. Adrian's Digital Basement has a video doing this with an Arduino, and Sven Petersen and bwack adapted this to PIC/ATtiny chips. Ah, I also found a project that works like you suggest and does a reset when you hold restore down: GitHub.com/alexkazik/restore-reset
How long are the led strips you used
Doesnt arduino nano have 21 Digital io pins
Thank you very much for taking the time to make this video and answering my question in detail. I think I have some SOIC ATTiny85 somewhere, they would still be somewhat overkill but at least they are small enough to fit anywhere. I will adopt your code to ATTiny pins and test this.
I'm glad you found it helpful! Let me know how it works out.
C64 virus/malware? What a load of clickbaity rubbish.
Dragging my tip on the screen over this thumbnail
*WAS THAT THE BYTE OF 87?!*
"Made my computer sick" is a really cute way to refer to getting a virus, I love that 🥺
Great video. Thx
As a kid i has a c64 and i caṉ’t for the life of me remember *ever* using the restore key
bro the commodore 64 looks breedable in that thumbnail
Can this work on THEC64 MAXI?
I think those use VICE for emulation, which should work, but I'm not sure if there are buttons mapped for reset and restore. Give it a try!
Nice video! Hope i will make it the same. :))
"Can a Commodore64 keyboard vomit?" From - a computer master that doesn't know about computers
How do I find a similar battery and install it if the original battery is not available, and what is the closest battery for this device?
I got mine from iFixit and would recommend that. You can also just look up the battery model number on iFixit and use that to search on other sites.
@@TrevorMakeshello. I recently got a used pixel 3a because I so love the design. Just want to ask if Ifixit replacement batteries are worth it? I’m planning to ask my friend from the us to buy me one but not yet decided because I haven’t found much review of their batteries.
The battery from iFixit that I showed in this video is still working great. There are cheaper options, but I think it was worth it. The only thing I didn't like was that the only two options were battery-only and battery + adhesive + tools. You need the adhesive to reattach the back cover of the phone, so they kind of push you to get the tools even if you don't need them.
When you can still type statements at the BASIC prompt you can issue a poke command to change one of the bytes in the 5 byte sequence instead of powering down the machine for some period of time.
Was having flashbacks to popup ads on early internet browsers !😖😂 Interesting and well-done video! Really nice to see people enjoying the older machines and the freedom / responsibility / control they provide for the programmer! 🤓
/kill
nice virus. it's a shame that commodore 64 has unique viruses like this
There wasnt a bluching face on the keyboard 0/10
bro im never recovering from that thumbnail
fr 💀
thumbnail bouta make me act up
A bunch of games used to do this as well to prevent reset with using the power switch to turn off and on (and some demos too). One of the quick and dirty ways to add a reset (and I done this and have a C64 with it on still!) was to basically put a push button between pins 1 and 3 - so between ground and the reset line. Some games as per the 5 bytes in RAM did stop that though - didn't actually test how long to hold it in for to see if it would reset because if at first you don't succeed, use the power switch. So yeah, still got a C64 with a 40 year bit of twisted wire, push switch with blu-tac stuck to the stop of this C64!
Your video is so laggy
Cuz your Wi-Fi is bad 😂
POKE 32770,0, press reset, hack circumvented, given that the hack doesn't restore the cartridge signature periodically...
Good idea about periodically refreshing the signature and other vectors-would be pretty annoying to have both the IRQ and NMI going and patching up each other's vectors and timer flags. I suppose you could also add a BASIC wedge that would silently block POKEs to just those address ranges.
@@TrevorMakesI'm not sure about what should be achieved here... given these computers' mostly isolated nature, real viruses are hard to write, as they need to propagate, and that's nontrivial in this case. Any hacks, even like this in the video can be classified as intended behavior, hard to catch this as infection..
@chipetke this is a completely contrived example meant for nothing more than displaying an interesting animation. The Codebase64 site does have a page about C64 viruses if you'd be interested in reading further.
My first computer was a Texas Instruments TI-99/4a. You had to write every line, everytime. Wish I still had it, actually. In 1981 I was 13. It was an interesting time. Internet wasn't even squealing yet! Kids from today, would be asking if we could take them to see dinosaurs! Sit them down, and give them a 64, without a cassette player!
Great video! Subscribed
Same
I wonder if this will mess up an emulator. Hmmmm
In VICE at least it does work. "Reset machine CPU" will keep the signature in tact, while "Power cycle machine" will clear it out. Doesn't really cause any harm
@@TrevorMakes Well, of course "no harm", but it's good to know that VICE is so accurate that it can get borked like a real C64
18:30 Never thought I'd see a Commodore 64 get Last Measure'd
Try PRINT"5"+-5
Get Bill Gates on the line, there's a critical bug in his BASIC code
:(]
He corrected it on the C128.
7:24: wait, what? You push the button, the lines will get pulled low and the caps will slowly charge until the resistor dividers made of the line's pull-ups and your resistors settle. You release the button, the lines will get pulled high immediately, as the capacitors' circuits are open. So, basically, the only working parts here are the button and the diode ;) Connect the caps between the ground and the button (one through a 50 Ohm resistor, the other through a 50 Ohm resistor and the diode you already have to remove sparking, though I'd use a BAT54C and a single resistor because less parts), connect your 10 and 12k resistors between the caps and Vcc - and two more diodes to pull RESET and EXROM low without unnecessarily loading the on-board logic with the caps.
You're correct, the lines start climbing back up while the button is held down, not when it's released. I didn't design this circuit; it's an old one that had been shared in a few places, but I agree there's room for improvement. Ray Carlsen's circuit portcommodore.com/rcarlsen/cbm/c64/RESET%20CIRCUITS/c64%20cold%20reset.jpg looks like an improvement, but would need to be done internally rather than on the cartridge port lines. I'm already working on a follow up using a single microcontroller which will watch the ROML line for when to release EXROM, rather than relying on a capacitor for crude timing.
Back in the good old days I had at least one game that was really hard to wipe out of the memory. You would need to turn the computer off for a good 5 minutes at worst to restart normally. 007 Licence To kill was one of those. On my 1988 C model I don't remember this being the issue, but on the late production phase ca. 1991 units bro and I got from a campaign sale, this was. And now, I think I know one possible reason. I have understood that some of the late models were built with static ram. So it would not need refreshing to retain data - and it could retain data for a considerable time without power.
I thought this was pretty interesting! I could see it potentially be used as copy protection in some games to defeat the reset switch.. To your knowledge was this ever used in commercial software or games as a method of tamper or copy protection? I know a lot of freezer carts used for pirating games had reset buttons on them. Not sure how the reset circuit was used in this context, but I am sure others must know?
The link in the description to Sven's Techsite mentions Gyruss using this, but otherwise I never found a specific list of games. My impression from forum posts and other articles was that this was mainly used for copy protection in games as you suggest. I do think a more practical use for this type of reset circuit would be for cracking copy protected code which would otherwise be cleared from RAM if you switch the power off.
The C64 doesn't have a reset button, so switching it off and on again was always the only option.
After market reset switch mods seem to have been pretty popular. The C64 I showed in the video had one installed at a repair shop in 1983 according to the receipt in the box.
Ive just been rewatching IT crowd, so thanks Roy!
I used a metallic paperclip to short GND and RESET on the user port. Later on I rigged a switchable short connected to pins on the SID chip directly on the board. It worked to install POKES in many older games. More recent games, not so much. Some used the CBM80 trick (Krakout did this) to prevent the user from resetting. Moreover, the cold start routine destroys some of the contents of the RAM, like bits of the stack and BASIC/KERNEL variables below $400, as well as the screen memory at $400-$7ff. Larger games liked to store data or code in there. So I bought an Action Replay cartridge in 1989. It also had freeze functionality.
Maybe using the PIO of the pi pico the DRAM CAS latency could be measured in a standalone tester device. Would be nice if the device could also test SRAM ICs
Good idea! Yeah, I've been thinking about doing exactly that when I pick this project up again
This has NOTHING to do with the CPU. What's insanely stupid about this exploit is why address 8000 is even looked at in the first place. It's not like the CPU starts executing at 8000, it's got two 16bit vectors before the signature, so where is the code that understands this layout?
The CPU starts executing the code at FCE2 (vector from FFFC), shown in the last part of the video. The subroutine at FD02 is where it checks the signature. I suppose they could have put the signature in the other cartridge ROM at A000, which defaults to BASIC ROM instead of RAM.
Right.. It's not the CPU, but the kernal ROM that checks for the cartridge signature in the memory map at 8000, so it's not that insanely stupid. It's needed so the cartridge can run automatically when inserted and the machine is powered on, otherwise you would have to type something like SYS 49152 or SYS 32768 to start the cartridge. This is the reason SYS 32768 (8000), SYS 49152 (C000) or SYS 64738 (soft reset) were often used to start games that were dumped from cartridge to disk. This, along with bank switching to RAM for almost the entire memory map is also what made it possible to dump cartridge games to disk and have it work with little or no modification (unless there was copy protection in the cartridge ROM)
@@seansretroverse9082 The point is, I'm not a C64 user. I was a BBC Micro user and wrote a fair amount of commercial games, so I knew a lot about how the 6502/6510 initialized itself before starting to execute instructions. The BBC didn't have all the extra memory layout of the C64, just had 0000 - FFFF with everything above 8000 being paged in ROMs and other hardware registers at FE00. Now the MOS will initialise through the reset vector at FFFC, which is actually a CPU requirement and then start to initialize the ROMs, offering services to each in terms of grabbing its own workspace etc. The fact that the MOS looks at 8000 before starting the ROM servicing is a little insane. I can get why they did it, but if the cartridge slot had been interfaced correctly, it could have been the first one offered the services rather than some crazy memory hack to make it happen. Like I said, I don't know the C64 well, since I never had one, but one of the things that made BBC stand out was the bonkers attention to detail in the MOS. Even to the point that it had values for colours for up to 24bit depth, but obviously that never came, but it was still an amazing bit of programming. Then the BBC Master with it's paged RAM, and ROM initialization was another piece of coding wizardry. It's just mental having something so hacky in a machine like the C64 that I love watching demos on.
What's insanely stupid is that the reset code doesn't check it's actually ROM that is checked for the signature before going there on reset. I suppose by having the ROM cartridge itself switch out the RAM it made it harder to get a ROM image into that RAM to be able to modify it in any way - an early form of DRM?
I’m tempted to create a custom kernal rom that pokes 00 into the first of those 5 bytes before checking for CBM80. If it is a cartridge it will have no effect and run the cartridge. If it’s ram, the “infection” will be gone. … just a wild thought ;). Thanks for the video.
Check the link to Sven's Techsite - he did exactly that. I think a better solution could be to do the normal memory test first and only check the signature if ROM is detected there (MEMTOP set to 8000)
wow 64K is 32 times more than an Arduino UNO, which is MASSIVE for recreational assembly programming
The UNO does have 32K Flash for just code which is pretty comfortable, but the 2K RAM is definitely easy to use up.
@@TrevorMakes yeah, I've never had problems with ROM size, but those 2K of RAM are apain sometimes hahah
They finally implemented ASM there? Good to know, I never used Arduinos TBH, as I only like coding in ASM for those AVRs (both for fun and work, as I hate micro-optimizing the C code there), and it only takes a somewhat $5 programmer for the job :)
@@TheBypasser In the end it's an Atmega 328P, you can program any microcontroller in ASM :) You can access the registers in the Arduino IDE tho, gotta have a very good reason to spend the extra time writing directly in Assembly imo.
@@orti1283 I thought they have implemented it in the IDE. Never tried it tho, as IMO the best IDE for AVRASM is the older AVRStudio 4 (the pre-VS-one), as the debugging is just awesome there. And yes, there are numerous reasons to use ASM for those cores (which is not that long to code, and takes way less time compared to micro-optimizing the C code), especially for the industrial devices: no "code chaos" (e.g. changing one line will not affect the whole Flash - the address constants only, and that is it), clock-accurate routines, overlapping interrupt code, fast port control by pre-loading the port states on the registers and keeping them static throughout the whole process etc.
I've had tons of 64s and I've never seen a dram that could hold its contents more that maybe 10 to 15 seconds after power off. 15 mins is a very unfounded claim. (I currently own 12 or so 64s)
It does sound quite extreme, perhaps an urban legend. In the link to Sven's Techsite, he shows a series of memory dumps where it took several times switching the power off, up to 60 seconds, before the CBM80 signature cleared out (though you can see corrupted bytes here and there even after 5 seconds).
@@TrevorMakes maybe the commodore shouldve had a routine in rom to clear (and test)all the ram addresses before everything else, like in most sinclair machines ?😉
@andygozzo72 There is a non-destructive memory test, but it just sets the top of free BASIC RAM to wherever it fails first, usually either cartridge or BASIC ROM. Not really a proper diagnostic. (but I do think that the memory test should have been done first and skipped the signature check if RAM had been found there) I think there is some benefit to not clearing the RAM though, since it does allow you to recover what was there previously... Commodore just goofed by making the old contents of RAM able to influence the startup and NMI procedures.
It would strongly depend on temperature