Join us on Discord: discord.gg/jmf6M3z7XS Follow me on Twitter: twitter.com/WeirdBoyJim Support the channel on Patreon: www.patreon.com/JamesSharman
@m1geo Жыл бұрын
James is back! 😍
@weirdboyjim Жыл бұрын
I was never really gone, but I should be able to get more videos out over the next few months. I have the broad strokes of a plan for the rest of this year.
@WyrdieBeardie10 ай бұрын
A little late to the party, but each video is a treasure, James! Thank you for continuing with this excellent series!
@weirdboyjim10 ай бұрын
Glad you are enjoying them!
@itsJden_11 ай бұрын
Thank you so much for your efforts sir as an embedded systems beginner your videos are helping me a TON
@weirdboyjim11 ай бұрын
You are welcome! Glad you are finding them interesting.
@stupossibleify11 ай бұрын
Missed you, James! What a great video to return with, loved every moment. As a C64 boy, I can even forgive the use of the Spectrum! In reality I've become quite keen on the Z80. Love the UART application.
@weirdboyjim11 ай бұрын
Glad you enjoyed it! There will be more frequent videos over the the next couple of months.
@silvius789211 ай бұрын
Hello, I'm glad you back on Speccy Thema. Sorry I didn't respond earlier. You don't really need to distinguish between read and write if you dedicates a specific addresses for specific operations; like one address for write parameters, and another for read results. I mean if we(you) are still thinking about "coprocessor" expansion into ROM slot. To make expansion direct on edge connector from speccy will be easier for sure :-)
@weirdboyjim11 ай бұрын
Making the expansion the main port rather than the rom cartridge would of course be easier. I’m not the guy for the easy path.
@danmerillat2 күн бұрын
I know this is quite an old video by now, but for anyone watching in the future: flux will help with getting the solder to properly flow and not just bead up on the surface. There's a tiny amount in solder wire, but not enough to prepare those large surfaces.
@weirdboyjimКүн бұрын
Flux is sometimes a tradeoff between easier soldering and the mess!
@danmerillat15 сағат бұрын
@@weirdboyjim That's certainly true! I've spent plenty of time cleaning up leftover flux with alcohol and a close-cropped brush. Situational for sure, might help enough to be worth the mess on something like this edge connector. Love your videos, inspired me to implement a close analogue in verilog to run in simulations to really understand what's happening at the lowest level of CPUs.
@michaelboyd943411 ай бұрын
Thanks James! A fascinating video delving into the ‘Speccy’s’ mysterious edge connector. I grew up with the ‘Speccy’ and share your fascination with the innards of these revolutionary first generation 8 bit home computers. A recent search of my elderly parents attic confirmed my worst fears that my own beloved ZX Spectrum + had been given away many years ago! 😢
@weirdboyjim11 ай бұрын
I know how you feel. There is a bunch of old kit from my youth I’d love to look at again but I have no idea what happened to it.
@m1geo Жыл бұрын
You're brave adding a copper fill around the edge fingers. Lots of potential for shorts from resit wearing and alignment tolerances. 😂
@weirdboyjim Жыл бұрын
Well you're right, I didn't consider that. Doesn't really matter for a temporary breakout like this but I'll try to keep it in mind when I design something more permanent with an edge connector.
@m1geo11 ай бұрын
@@weirdboyjim Hehe! Just trying to save you a mistake I've made before!
@RobUttley5 ай бұрын
That was genuinely fascinating, thank you.
@weirdboyjim5 ай бұрын
You are welcome!
@theboot10011 ай бұрын
Another great video mate. Ive been hanging out for another video
@weirdboyjim11 ай бұрын
Thanks! Hope it satisfied, Next video won't be as long in the making.
@khatharrmalkavian330611 ай бұрын
I really like the idea of extending the functionality of old machines by changing what they interface with. A while back I was working on a project to make a SNES controller out of a block of wood by using some conductive ink for touch sensing and having a microcontroller translate it to SPI for the SNES. I think I still have it laying around half finished somewhere.
@weirdboyjim11 ай бұрын
Sounds interesting!
@joeysartain605611 ай бұрын
great to see another video
@weirdboyjim11 ай бұрын
Hope you enjoyed it!
@vruz11 ай бұрын
Great work James!
@weirdboyjim11 ай бұрын
Thanks!
@0xABADCAFE11 ай бұрын
I had this exact interface back in the day
@weirdboyjim11 ай бұрын
Did you have any carts for it or did you just use it as a joystick interface?
@benholroyd522111 ай бұрын
Ooo. I'm currently on episode 30 odd of the CPU build, after watching the VGA build. The computer now is much smaller, less blinkenlights, a keyboard... And a familiar sounding name..... I look forward to discovering how James makes this 'zx spectrum'
@weirdboyjim11 ай бұрын
You can always tell the stuff I made with by all the lights!
@AttilaAsztalos11 ай бұрын
Living in a broke-ass EE country at the time, I nonetheless somehow managed to pester my parents into getting me a local ZX clone (a CIP03) and managed to miraculously source a gorgeously red QuickShot II joystick (that thing had _autofire_ ffs!), but had no way to connect the two. There were precisely zero ways to buy an interface or at least the relevant edge connector. But the actual circuit of a Kempston adapter was a piece of cake for my TTL-savvy young self, and the logic ICs were actually available locally (with some effort). So I hand-sawed a bunch of long thin comb-like fingers (for individual flex) with the right spacing into two pieces of PCB, drilled two holes and soldered a short piece of stripped copper wire into each finger (as "the contact"), then bolted them to each other facing inwards with a third piece between them that spaced and keyed them to the key slit in the extension port. Needless to say, the pucker factor on the first test of this _very_ DIY interface was indescribable - I was intensely aware that if I short or hog the CPU bus in any way and damage the Z80 I'll NEVER get a second ZX... but it worked fine. For years and years. Good times...
@weirdboyjim11 ай бұрын
I’m equal parts impressed and terrified by that description. Cool that it worked!
@LeoBerardino11 ай бұрын
Good to see you again James I loved the video subject. This topic reminds me of me when I interface a robotic arm with a MSX via de LPT1 parallel port
@weirdboyjim11 ай бұрын
Interesting! I never had significant hands on with the msx.
@petesapwell11 ай бұрын
Welcome back James :)
@weirdboyjim11 ай бұрын
Thanks Pete, was never really gone but there should be more regular videos again.
@edgeeffect11 ай бұрын
Wow... I must have missed it last time... "top marks" to whoever put the Spectrum edge-connector stuff into the EasyEDA library! So nice to have fiddly jobs done for you by somebody else! I'd expect to see everyday stuff in there but Spectrum add-ons aren't exactly what you'd call "mainstream" - excellent work whoever you are. I'm also, finally, impressed with Sinclair BASIC... when you did `LEN a$`, I said "nope, you need parentheses on that function"... ... ... and you didn't. When you indexed into a string like it was an array, I was all "No way! This is the 1980s! That won't work!!!"... ... ... and it worked. As a long term Speccy detractor, I'm now like "oooh! That BASIC's actually quite good".
@weirdboyjim11 ай бұрын
Yeah! That was handy! The spectrum basic is an odd beast, the method of typing whole keywords seems weird at first but once you realize that's how it's tokenized in memory (rather than being stored as text) it makes much more sense.
@TomStorey9611 ай бұрын
They've spelt the "refresh" signal name incorrectly though - it should be RFSH not RFHS.
@weirdboyjim11 ай бұрын
@@TomStorey96 I’m prepared to overlook that.
@ecosta11 ай бұрын
Oh, I wish I had some old computer (and time) to try this kind of thing myself. That was so cool!
@weirdboyjim11 ай бұрын
Thanks! I like to think young me would be impressed by old me making this work!
@stevedonkers908711 ай бұрын
Your irritation while routing may have been alleviated by using the auto-router. It definitely would've been an easy design to check over after it completed. Just a thought. Great job, by the way. You have one of the best channels for learning about hardware around.
@weirdboyjim11 ай бұрын
Perhaps, but then I would be reading lots of comments about how I shouldn’t use the auto router 🤣. Glad you liked it.
@Stabby66611 ай бұрын
It would be cool to see some new spectrum games making use of cartridges, as the cartridge could do somethings the mappers did with the NES - like auto-cycling through graphic definition table every frame for parallax scrolling effects, per-scanline animation, DMA blitting etc :) Obviously it would have been prohibitively expensive back in the day (the speccy was my first computer) but now a custom "ROM" cartridge is obviously much cheaper :)
@weirdboyjim11 ай бұрын
Well the cartridge port isn't anything like as flexible as the snes one was, but part of my goal is to push the limits of what we can do with it.
@greenaum11 ай бұрын
The Spectrum has bitmapped memory in RAM. The NES used a tile table located in the cart, usually ROM. So that's how mappers could do tricks like that. For the Spectrum you can only alter the screen by reading and writing to the RAM. Even if you had some separate circuit, rather that doing it on the CPU with software, you're still limited by how quickly you can write to old RAM chips like that. So that idea would be difficult to get up and working, at least much more difficult than on the NES. The tiles in cart ROM meant the NES didn't need tile RAM, so was quite a lot cheaper to make. The downside was that each cart needed 2 separate ROM chips, CODE for the CPU, and CHAR for the PPU. They had their own bus each which is why the NES's cart connector was so enormous. Overall it was cheap, and made games at least twice as expensive as they had to be for other consoles. The Master System did it the usual way, and had much better graphics, so there was no advantage to the design other than money. "NES-expensive" is a term that should be in the lexicon as much as "Nintendo-hard" is! ALL 8-bit systems had difficult games, it's not a Nintendo thing. But as ever, it's how the Americans had things, and they're in charge of the language apparently, including slang. See also the "Videogame Crash" which only happened in North America, and only affected consoles.
@Stabby66611 ай бұрын
@@greenaum yep I’m aware of how the spectrum worked - I wrote enough software for it 🤣 I’ve also written an NES emulator along with others in my spare time… Although different there is the possibility of greatly increasing the potential using a custom cart: DMA transfers. By halting the Z80 and copying from ram in the cart to display ram which is much faster than the usual method of popping from the stack into registers then pushing into display RAM. Handling sprites and a tile map based display in the cartridge which will be pushed to the display ram without the need for the z80. Other effects such as pixel scrolling etc which again would be handled in the cartridge and then DMA’d to the display ram. Yep it’s different but there are. A lot of possibilities 🤣
@cygil111 ай бұрын
@14:30 Umm...the clock does stop, every time there's a CPU access to contended ram. That might explain both the unusual shape of the wave, and the clock rate discrepancy as well. However, I know very little about oscilliscopes. There is no crystal on the Spectrum, true, the clock generator is built out of gate array elements on the Ferranti Uncomitted Logic Array.
@weirdboyjim11 ай бұрын
Yeah, the clock is a basic 2 transistor oscillator. Looks like the ULA pulls it down when it wants to take over the bus.
@ahmedalshalchi10 ай бұрын
Thanks Mr. James Sharman ... You have returned me back to my old memories with ZX Spectrum 35 years ago ... Those were the golden days dealing with micro systems not now ... Can I ask if you have an academic degree of Electrical Engineering to start all from the beginning ?
@weirdboyjim9 ай бұрын
All my education was computer science. We didn't touch on any circuitry stuff but there was some logic / gate theory.
@ahmedalshalchi9 ай бұрын
@@weirdboyjimThat's great passion of you to work on H/W... I am admired ...
@johnbarleycorn_11 ай бұрын
The ULA does have control over the clock going to the Z80. What it does is to drop the clock signal whenever it needs to access the screen memory in the lower RAM to ensure that it rather than the Z80 has control over the bus going into the 4116 chips. Part of the consequences of this can be found in the custom loader software used to DRM protect later Spectrum games. The code for these loaders was always ran in the upper RAM because the process of interleaving memory access and instruction fetches with the ULA's fetches meant the timing of the lower RAM could not be guaranteed making a loader coded in this space less reliable.
@weirdboyjim11 ай бұрын
Yeah, I remember the lower ram was slower.
@AttilaAsztalos11 ай бұрын
It was with the ZX, messing with some game in MONS (as one does), that I encountered my first anti-debug feature ever... I was staring at the screen in disbelief at the code writing a constant into a register, then immediately reading it back and comparing it to another value - wtf, how can this ever succeed...? Then the little lightbulb went on above my head and I just laughed my ass off: the register in question was the R-register, which gets auto-stepped in hardware, and if you were step-by-step debugging you sure as hell didn't read the same value back as if the code was executing continuously. Trivial to bypass once one understood what was actually supposed to happen...
@johnbarleycorn_11 ай бұрын
@@AttilaAsztalos Ah, yes. That was the second version of something which I think was called "Speedlock". I wound writing a program that automated the process of modding the decoder to get to the loader. Ended up that I could crack those in a few minutes!
@pcuser8011 ай бұрын
There is a waste operation in the calculator, that writes to location 0. I noticed that because my old zx has 64K ram. At startup the orginal rom was copied in to lower 16K. At some math operations location 0 to 8 was changed. Changed this waste routine to dump somewhere else.
@weirdboyjim11 ай бұрын
Interesting, and a bit weird. Good to know I was seeing legitimate writes though thanks.
@Ghozer11 ай бұрын
I can see Spectrum networking and multiplayer games with this ;)
@weirdboyjim11 ай бұрын
When I was kid I had this crazy idea of using the audio cables you used to save / load to audio cassette to network two spectrum together. Possible but it would have taken up all the cpu's focus to either send of receive.
@damianbutterworth243410 ай бұрын
I wanted to use the interface when I was a kid. I had to wait for Arduino`s to come along. I would of built some crazy stuff.
@weirdboyjim9 ай бұрын
If only I knew the basics of digital electronics then!
@damianbutterworth24349 ай бұрын
@@weirdboyjimI`m sure I read in the ZX manual when I was a kid that the IN OUT functions were controlling the interface pins. I might have to have a utube search. Would of been nice to know what we know now. I was just playing with Triacs etc making disco lights with a 555 timer and old tape desks. I used a decade counter chip to switch between lights. Then add ZZTops lol.
@Wobblybob200411 ай бұрын
14:23 I think the ULA monkies around with the CPU clock to prevent video memory contention.
@weirdboyjim11 ай бұрын
That sounds very likely. I now have to choose between doing a web search or opening it up and getting the oscilloscope out to confirm ;-)
@TheDefpom11 ай бұрын
Interacting with the spectrum is a bit scary in some ways, I would be worried about something connected to the port potentially damaging the machine, maybe if you do a revision you could add some buffer ics to it to help isolate it a bit.
@weirdboyjim11 ай бұрын
That would probably be smart and safer, we do if course always do the smart and safer thing 😅
@andrewdunbar82811 ай бұрын
No renumber in 48K basic I'm afraid. Some of the variants had it though. Forget if it was the 128, the Timex 2068, or the Inves.
@weirdboyjim11 ай бұрын
Actually an interesting challenge when you stop and think about what is involved.
@andrewdunbar82811 ай бұрын
@@weirdboyjimSome of the Basic compilers for the Speccy had it too. Such a luxury! Many was the time when as a kid I had to manually go through changing all the line numbers (-:
@alexloktionoff683311 ай бұрын
Does ZX need a dedicated refresh? Probably continuous video card memory reads are enough to refresh the DRAM.
@weirdboyjim11 ай бұрын
I may look into that, someone posted a code sniper that implies it’s not enough
@DustinWatts11 ай бұрын
Just an idea: An easier way of soldering the connector might be going with a thicker PCB. 1.8mm of even 2.0mm? Question is off course, will it still fit in the connector.
@weirdboyjim11 ай бұрын
Unfortunately that would be a problem for the edge connector the other side. I wondering how think I can go, I have a similar problem to solve elsewhere that idea may be more suitable for.
@DustinWatts11 ай бұрын
@@weirdboyjim Just by watching the video I think you can get away with 1.8mm
@TheGunnarRoxen Жыл бұрын
Fun stuff! Are you thinking of using the Spectrum as the input interface to the JAM-1?
@weirdboyjim Жыл бұрын
Glad you liked! No, these are very distinct projects. I used the UART for this as it was just more interesting to connect something I built myself than show led’s lighting up!
@miege9011 ай бұрын
I think you got a cold joint on the power connector
@weirdboyjim11 ай бұрын
I’ll take a closer look next time I have it out.
@AJB2K311 ай бұрын
If you were adding connection points for every single pin then yes it would make sense to add every pin label but, as you haven't broken out every pin, I agree with not adding every label.
@weirdboyjim11 ай бұрын
I have to admit I was under time pressure when I made this board or I might have been a bit neater in a bunch of areas. If I had known how much of a pain it would be in both wiring and video editing I'd have put a bit more work into the PCB.
@TonyBrooks197911 ай бұрын
Babe... hurry up and get home. James has uploaded another video.... i know youve been waiting for this!!
@weirdboyjim11 ай бұрын
That appeared on my phone notifications as "Babe... hurry up and get home.", worrying for a second!
@TonyBrooks197911 ай бұрын
@@weirdboyjim 😬😬 oops. Sorry james.. didnt mean to worry you!!!
@FrankGevaerts Жыл бұрын
Nice! The sound board next? 🙂
@weirdboyjim Жыл бұрын
Working on it or interfacing it to the spectrum? That would be pretty much just a wire swap from here.
@FrankGevaerts Жыл бұрын
@@weirdboyjim both! 🙂
@weirdboyjim Жыл бұрын
@@FrankGevaerts Comet o think of it, interfacing it is the easy bit. Making some code to play music on the spectrum would be time consuming. Maybe I should just work on the Audio circuit.
@FrankGevaerts Жыл бұрын
@@weirdboyjim Maybe... I'll admit that my motivation is that I want to do this myself (although maybe on an RC2014 instead, or both, as I have an RC2014 backplane with Spectrum edge connector...), so you finishing the audio circuit far enough to publish everything would help :)
@FrankGevaerts11 ай бұрын
@@weirdboyjim I think getting the audio onto a PCB next would indeed be great!
@DAVIDGREGORYKERR11 ай бұрын
Could you not use 2x Data Latches for the Address Latch and output the ....... LD HL,(ADDRESS) LD DE,(PORTADDRESS) LD A,L OUT(DE),A INC DE LD A,H OUT(DE),A RET
@weirdboyjim11 ай бұрын
I'm using memory writes rather than I/O ports because at least some the lines I need are exposed in the cartridge. There is some really weird stuff in the IO range of the spectrum that was done to save cost that I didn't want to fight.
@erniecamhan11 ай бұрын
Could you use solder paste and hot air gun?
@weirdboyjim11 ай бұрын
You could definitely use that to tin the pcb but I’d be worried about taking hot air to the plastic of the connector.
@twobob11 ай бұрын
Awesome maybe sling a pullup on MREQ
@weirdboyjim11 ай бұрын
Why do you think that might be needed? The computer just worked without anything plugged into the expansion port.
@twobob11 ай бұрын
@@weirdboyjim because the computer didnt care about reading an osilloscope? I guess
@CollinBaillie11 ай бұрын
Hang on... you got rid of the pins because of routing hell. How did they end up back on the board?
@weirdboyjim11 ай бұрын
Perhaps my wording was poor. I always had a set of pins that had every output from the expansion port in the order they appear on the edge connector (That was easy to route). The bit I removed was an extra set of address and data lines that were reordered numericaly (That was would have been difficult to route as many lines swap over). In hindsight I wish I had spent the time to route the extra set, it would have made the testing step smoother.
@CollinBaillie11 ай бұрын
I went back. You installed pin headers in the through holes of the middle edge connector socket.
@CollinBaillie11 ай бұрын
V2 in the works? 😁
@peter.stimpel Жыл бұрын
Seems to me your life would have been easier if you would have tinned the bord first, before soldering that bottom connector in.
@weirdboyjim Жыл бұрын
I think you are right. I should have tinned the board and the connector. Maybe tried to shape them beforehand as well.
@Doug_in_NC11 ай бұрын
Yes, that’s the way I do it, it’s a lot more consistent than just putting the solder on the top.
@Fifury16111 ай бұрын
Only 40 years too late...
@weirdboyjim11 ай бұрын
I know some people don’t understand people playing with retro tech.
@Fifury16111 ай бұрын
@@weirdboyjim Back in the day I hooked my 48k up to a line printer and wrote a program to calculate Pi - outputting to the printer, it went through a box of tractor fed paper. I also made a UPS as I was forever forgetting to save my listing. The last project I made controlled the ignition of my Dads car and heated up the interior for a warm journey to school. I have moved on to the ESP32 range of boards now as they have a lot more power and versatility and a lower cost of entry!
@pcuser8011 ай бұрын
You can see the memory fading away with this little program: For example user definded graphics become distorted. ORG 29000 LD SP. 32767 XOR A LOOP: LD R,A JR LOOP END this keeps the the R register at 0 preventing the complete refreash cycle.
@weirdboyjim11 ай бұрын
I had no idea you could mess with it like that. I assume that's partially a by product of the way video memory is shared.
@pcuser8011 ай бұрын
@@weirdboyjim The lower 16K is refreshed by the ula, the upper 32K by the Z80. You can not run this trick in the upper 32K because the program is fading away.
@TomStorey9611 ай бұрын
@@weirdboyjim bit 7 of the R register can be used as a "general purpose output" - the Z80 auto increments R each instruction but it wraps back to 0 after 7F rather than FF. You can manually set/clear bit 7 and by decoding the refresh cycle you can then latch it into a flip flop or similar.