ZX Spectrum, Rom Cartridge Research

  Переглядів 10,601

James Sharman

James Sharman

День тому

I continue to reminisce about my first computer by start to explore the expansion facilities. In this video I look at the subset of expansion port lines exposed through the rom cartridge port added by the interface 2. I build a breakout board and use it to interface a game rom image into the spectrum .
0:00 Introduction
0:38 Discussion
2:15 PCB Design
7:53 Unbox and solder
10:08 Testing
16:16 Troubleshooting
17:30 Success!
19:03 Future Plans
21:09 Outro
22:00 Post credits scene

КОМЕНТАРІ: 172
@weirdboyjim
@weirdboyjim Рік тому
Join us on Discord: discord.gg/jmf6M3z7XS Follow me on Twitter: twitter.com/WeirdBoyJim Support the channel on Patreon: www.patreon.com/JamesSharman
@maesse
@maesse 8 місяців тому
I wrote a ZX Spectrum emulator some years ago when I was trying to learn more about how CPUs work, and I gained a big appreciation for these older types of hardware that can actually be understood by mortal beings. Love your content, very inspiring and insightful!
@weirdboyjim
@weirdboyjim 8 місяців тому
Developing emulators are great learning experiences if there is enough data around to do it well!
@BillySugger1965
@BillySugger1965 Рік тому
Hey James, if you make any more PCBs (like with a longer piece for the cartridge connector), you may like to try a gold over nickel finish. Not only does that look drop-dead gorgeous (especially on a green, black or blue board) but it will improve the life and reliability of the finger connector over a tinned finish.
@weirdboyjim
@weirdboyjim Рік тому
I won't argue, the gold finish looks amazing and for a board I was keeping (and needed contacts to stay good) would be awesome! But for a board this size it adds $16.50 to the order and this board won't see much use. Definitely worth it for the keeper one at the end though!
@BillySugger1965
@BillySugger1965 Рік тому
@@weirdboyjim Yeah, I guess JLCPCB doesn’t major on gold over nickel finish, hence the absolutely silly price. Most of the boards I design are for machine placement SMT and that gives a much more consistent surface than HASL, and mass-assemblers use PCB suppliers who use gold finish much more commonly. My brother and I are in our 50s and both work in electronics, and are enjoying retro revivals if our own (we began in the 70s). Thoroughly enjoying your videos 😊
@colinstu
@colinstu Рік тому
Look forward to seeing v2 of this board.
@weirdboyjim
@weirdboyjim Рік тому
I'm going to do a breakout of the entire expansion port next so I can compare the signals and plan next steps.
@GORF_EMPIRE
@GORF_EMPIRE Рік тому
It's always cool to see capability expansion on the old retros. Looking forward to see what you come up with.
@weirdboyjim
@weirdboyjim Рік тому
It's nice to play around, just looking at the circuit and reading up on it I can see there were some interesting tricks used.
@mogwaay
@mogwaay Рік тому
Really nice video, I find you content very relaxing, thanks for sharing! It's cool to see you working on a spectrum, one of my favourite machines, and I love the idea of your project idea, good luck!
@weirdboyjim
@weirdboyjim Рік тому
Thanks! Good to hear you are enjoying the videos!
@REVERIT.
@REVERIT. Рік тому
This is the exact Spectrum setup I had as a child. I always wondered what the flap next to the joystick ports was for. Now i know! Great stuff.
@weirdboyjim
@weirdboyjim Рік тому
I never even had the joystick port! I actually have an original game cartridge for it now, I'll show it in a future video!
@stompreaper
@stompreaper Рік тому
Hi James! I’ve only recently discovered your channel and am working through the CPU videos. I found you through the VGA peripheral series. It’s been hard not commenting on those older videos, I wanted to wait for a newer one that was active. I love this personal journey you are taking. It resonates with me in so many ways. I share a similar childhood computing background and am also a software engineer that took a liking to electronics and recently CPU and advanced chip design. It’s like being a hobby twin! I really like this trip into the ZX spectrum world. It’s easy to take for granted the powerful tools and electronics we have today and “dismiss” retro tech but the truth is the engineering that went into these is phenomenal and done by intellectual giants. Getting to the stage of understanding fully the design and implementation of these as a hobbyist rather than an EE graduate is no small feat and very rewarding. This was state of the art thinking using the tools of the day. I love what you are doing and can’t thank you enough for sharing.
@weirdboyjim
@weirdboyjim Рік тому
Kind words, thanks and welcome! I do reply to comments on old videos as much as new videos though.
@sashaburrow6186
@sashaburrow6186 Рік тому
Even though I lived in New Zealand, I was fortunate enough as a kid for My first computer to be a 48K ZX spectrum with Interface 2 joystick port - and the only ROM I ever had for it was Jetpac (Came in a very nice glossy box too with a custom plastic inlay that held the ROM cartridge)
@weirdboyjim
@weirdboyjim Рік тому
Nice! Rare Rom as well, I'd love to get an original!
@andymouse
@andymouse Рік тому
Great fun ! that looked like Joust with a bit of Defender thrown in !....cheers.
@weirdboyjim
@weirdboyjim Рік тому
Loved that game as a kid! Maybe because it was one of the first I had.
@AJB2K3
@AJB2K3 Рік тому
Well done getting it working
@weirdboyjim
@weirdboyjim Рік тому
Thanks!
@Salfke
@Salfke Рік тому
Nice video very interesting, in Holland we had the MSX system also everything from tape. Your video gives me a idea to create something like this for the MSX
@weirdboyjim
@weirdboyjim Рік тому
Nice, I used to hear about the MSX but never had chance to play with one.
@TheGunnarRoxen
@TheGunnarRoxen Рік тому
That was fun! Jetpack brings back lots of good memories
@weirdboyjim
@weirdboyjim Рік тому
Indeed! Glad you liked it!
@gb7767
@gb7767 Рік тому
I remember playing this while listening to the saoundtrack from Airwolf ... I remember one day being so in the zone that I managed to complete something ridiculous like 20 levels, unfortunately it cycles back round to the beginning after the space shuttle level, but fond memories indeed
@weirdboyjim
@weirdboyjim Рік тому
@@gb7767 I remember that cycle back to the start, not the completion you would get these days! But did you ever play the Airwolf game? I remember being wowed by it's scrolling between levels at the time.
@gb7767
@gb7767 Рік тому
@@weirdboyjim Indeed I did James, but I remember Airwolf being marginally impossible ... I recently tried it again in an emulator and it was still frustratingly difficult but just as wonderful
@hoggif
@hoggif Рік тому
If I remember correctly, Spectrum expansion was quite clever: expansion device had a rom that could be "swapped" instead of the normal ROM. When you type or run a command that ROM does not support, it triggers an interrupt. At that point expansion port device switches different ROM to be used. Now execution continues from the other ROM at same address. That can handle all the new commands weather they are typed or run. Of course, after running the extra command for the device, it either returned from the interrupt or triggered another interrupt that triggered switching back the normal internal ROM and after returning from the interrupt, the code continued from the next point as if nothing had happened. I used to have a book with full ROM disassembly (explained) and full schematics. Some tricks like interrupt triggering on invalid command (to switch ROM) were quite clever I think.
@weirdboyjim
@weirdboyjim Рік тому
You might be thinking of one of the later models, the original spectrum just had the basic rom disable option.
@hoggif
@hoggif Рік тому
@@weirdboyjim I only had ZX Spectrum (the one with rubber keys) and ZX Spectrum+ (the first one with hard keys), I'm not talking about later 128k models or models like 2 or 3 that I'm very unllikely to have any deeper knowledge because I never had those. I'm talking about ROM exchange exactly, that was triggered by an invalid command making a software interrupt that invoked the ROM swap (where interrupt was detectable from the connertor, not sure if there was int-pin available OR if it was detected by knowing that int leads to read from perticular address of ROM and address lines were available) Anyway, I always found it quite neat that syntax error (eg errors with command parameters or whateve) triggers an interrupt that triggers the ROM swap for extra support.
@rlbjr898
@rlbjr898 Рік тому
YAY! I Love your videos! I noticed that you didn't show the full contents of the box!!!! I bet there's more in there!!! ... if so, pretty sneaky of you!
@weirdboyjim
@weirdboyjim Рік тому
If you look closely at the eda portion you'll see it was designed pretty soon after that spectrum unboxing, it just waited around in the shopping cart to latch itself onto the next order once there was enough ti justify postage.
@drgusman
@drgusman Рік тому
Nice to see you with a speccy :D I have something that may be useful for you, it's the ZXShield, it allows you to connect an Arduino to the speccy and virtualize any kind of peripheral or memory. It is published in my github (you can find the link in my profile) and there are examples on creating a wifi card with telnet software, a remote program loader, a poke search system, virtual roms, midi sound card, etc etc. Even if you don't use it the content of the repo may give you some ideas about things to add to the speccy ;)
@weirdboyjim
@weirdboyjim Рік тому
That does sound like an interesting project!
@baghdadiabdellatif1581
@baghdadiabdellatif1581 Рік тому
Great work 👌
@weirdboyjim
@weirdboyjim Рік тому
Thank you so much 😀
@1kreature
@1kreature Рік тому
Is it doable? Memory request would be to tell the system to put data onto bus right? With the ROMCS asserted I assume the system addresses the rom, otherwise it may be reading from it's memory or even writing to it. Since there is no more available signals to discern a write to the expansion/coprocessor you'd have to assume writes to some address in memory/system is writes to the coprocessor then?
@weirdboyjim
@weirdboyjim Рік тому
Yes it is doable, but it will not be easy. Several people have told me point blank that what I propose is impossible which is of course strong motivation to prove them wrong. You seem to have some understanding of the problem space but don't forget the dram refresh which can't be easily differentiated as well, there are some shortcuts that I could take easily if it wasn't for the refresh!
@TanjoGalbi
@TanjoGalbi Рік тому
I had the Interface 2 plus one game cartridge with my Spectrum. Yep, JetPac! I never did find any other cartridges in shops. I got mine with the Spectrum that I bought second hand with saved up paper round money. I never knew where the previous owner got the game cartridge.
@weirdboyjim
@weirdboyjim Рік тому
Nice, did you keep it? I've been watching eBay for cartridges and they often go for crazy prices!
@TheTurnipKing
@TheTurnipKing 5 місяців тому
it's because the interface 2 slot was specifically for connecting rom cartridges: mainly, for swapping out the base 16k of memory which is where the sinclair ROM is usually mapped. The full expansion expansion port on the back of the computer is more akin to the cartridge connector you'd find on a console, giving full access to the various CPU buses. It's a strange thing that the Interface 2 was probably intended to work with the 16k Spectrum and once the 48k became the dominant standard a 16k ROM cart simply didn't make sense anymore.
@weirdboyjim
@weirdboyjim 5 місяців тому
Oh absolutely. The idea here is to take on a challenge, if it's easy / obvious then it's not as interesting. The Rom socket is almost nothing beyond just the pins to connect a rom chip.
@stupossibleify
@stupossibleify Рік тому
Got to love the UKposts algorithm for recommending this to me: right up my street!
@weirdboyjim
@weirdboyjim Рік тому
Welcome!
@marianaldenhoevel7240
@marianaldenhoevel7240 Рік тому
I remember the manual for my Spectrum 48K described the expansion connector as "you can do almost anything here that you can do with a Z80. Sometimes the Spectrum hardware might be in the way." That says a lot about the home computers of the era. I still have my Speccy although I don't know if it works. It is just so much more convenient to use emulation whenever I feel the need.
@weirdboyjim
@weirdboyjim Рік тому
You should fire it up! Emulation is great but nothing beats for the nostalgia of firing up the hardware!
@peter.stimpel
@peter.stimpel Рік тому
This reminds me of my KC85/4 (former GDR tech, U880 based), I still have one. And I have lots of modules for it. The whole thing still works. I was lucky enough to find some stuff on ebay, 20 ys ago. if I would have bought all the stuff back in the GDR, others could have bought cars from that money, easily. The community interested in this stuff is fading away ...
@weirdboyjim
@weirdboyjim Рік тому
Ahh yeah, the KC85 is interesting, didn't really have a following here in the uk though.
@peter.stimpel
@peter.stimpel Рік тому
@@weirdboyjim I need to find a monitor so I could plug it in again. I was used to load games from cassette as well, and lost "half my youth" waiting for the loading procedure to finish. Then I received a floppy drive for it (5,25", 64k),and oh boy: 5 seconds to load a BoulderDash clone, which occupied almost all memory my KC had to offer, final block count was F8 or so, out of FF...
@weirdboyjim
@weirdboyjim Рік тому
@@peter.stimpel What was the monitor requirement? Something common or is it going to be difficult?
@peter.stimpel
@peter.stimpel Рік тому
@@weirdboyjim Just basic antenna in. But I doublechecked all my TVs, just one has the proper input :) There is a second option using scart. Some fine guy was creating a scart cable that works using one expansion port. Cannot remember where I put that cable ...
@weirdboyjim
@weirdboyjim Рік тому
@@peter.stimpel You might find a composite mod like I did on the spectrum isn't too difficult.
@teknifix
@teknifix Рік тому
James, I was wondering what brand/model of analog oscilloscope you have in the background. I have a Tektronix 422 myself and it looks similar but I think yours may be newer.
@weirdboyjim
@weirdboyjim Рік тому
Well spotted! that is a Crotech 3132, I bought it a while back to do some experiments with xy graphics. I should get around to that.
@kyleeames8229
@kyleeames8229 Рік тому
Very ambitious! Are you going to expand the functionality by mapping the co-processor to the top of the ROM address space? Also, what kind of co-processor? Maybe a crazy fast piece of modern silicon that can complete complex operations within the space of single ZX clock cycles? A transfer triggered architecture (TTA) that implements floating-point or some kind of SIMD functionality? I’m mainly here for the CPU build but I look forward to seeing what you do with this.
@weirdboyjim
@weirdboyjim Рік тому
That will be shaped a lot by whatever communications channels I can get working. Using some modern silicon as the co-processor would be sensible. The main problems are how to give it commands and read data back.
@wallyhall
@wallyhall Рік тому
@@weirdboyjim Another option may reveal itself as you investigate those channels - but an immediate option springs to my mind… If you dedicate a Spectrum memory address (single byte) to being a flag/“software interrupt trigger” … provided you’re able to respond to a change in its state within a Spectrum clock cycle (is the clock edge available to the cartridge?), you’d be able to detect a “call” to your own hardware. Make that a resettable flip-flop, and you can clear it when you’re complete (for longer running tasks). At least as a PoC. If you wanted to really push the boat out - you could JMP on the spectrum to some memory location emulated by your coprocessor, which houses an idle loop until your coprocessor finishes what it’s doing, and jumps back (or returns) when done?
@wallyhall
@wallyhall Рік тому
@@weirdboyjim and as always - thank you for the hard work of producing such a great video, really really enjoyed it! It’s the sort of stuff I’d love to have the time to fiddle with myself - but #life. Doing it via proxy with you is - well - a very close second place!
@moshly64
@moshly64 Рік тому
@@weirdboyjim For co-processor communication you could use a 1K dual port SRAM, because you have no R/W line, set up the 16K memory map so 14K is ROM, 1K read only DPRAM & 1K write only DPRAM (address range sets R/W). You could also use the DPRAMs interrupt line on the co-processor side but you would have to poll from the ZX side.
@charlesanthony3248
@charlesanthony3248 Рік тому
Bit slice multiplier?
@GeomancerHT
@GeomancerHT Рік тому
Amazing project. Do you plan to do some kind of "SNES Super-FX Chip" enhancement? something that would be called from the original Spectrum CPU? Or a new CPU that would take control of everything, including the OG Spectrum CPU? Both ways would be amazing, but I don't know what is easier and/or doable :D Thanks for the videos, loving the series!
@weirdboyjim
@weirdboyjim Рік тому
What I'd like to do is closer to Super-FX, ideas will have to be shaped by the communication channels we get get working though. Glad you are Enjoying!
@GeomancerHT
@GeomancerHT Рік тому
@@weirdboyjim Amazing, that's the way I would prefer it so it doesn't lose the Spectrum soul, looking forward to it :D
@vincei4252
@vincei4252 Рік тому
I had 3 Spectrums over time back in the day. When I moved to the US back in the mid nineties I left them all behind. I do miss it, however, I did signup for the Spectrum Next Kickstarter and really looking forward to getting the reimagined device. FPGA shortages not withstanding.
@weirdboyjim
@weirdboyjim Рік тому
I wish I kept my old Sinclair stuff!
@ecosta
@ecosta Рік тому
Now I'm curious if all (old) video game cartridges are like that - just passing wires directly to ROM chips. That was really cool.
@weirdboyjim
@weirdboyjim Рік тому
I think this one is the most restrictive, the SNES one is more like a full expansion port so as well as these kinds of lines you have access to all the other control lines that make interfacing a more complicated circuit much easier.
@m1geo
@m1geo Рік тому
Pro tip: start any PCB design by marking the outline, physical constraints (like keepouts, etc.), as well as adding mounting holes if needed... Saves a lot of heart ache later!
@weirdboyjim
@weirdboyjim Рік тому
It would be fine if I soldered the rom direct to the pcb!
@m1geo
@m1geo Рік тому
@@weirdboyjim oh, absolutely. I just always forget mounting holes! 🤷 Hahaha
@peterfielden-weston7560
@peterfielden-weston7560 Рік тому
Doesn't the Speccy edge connector carry all of the CPU lines? If you do replace the current PCB how about making one with a larger ROM and having a switch to chose between the banks?
@weirdboyjim
@weirdboyjim Рік тому
I'm connecting to the cartridge port which has an extremely limited subset of the times. doing what I I'm planning on the main expansion port would be easy and not really a challenge. That kind of switched rom cartridge would be very easy, people have done that before and sell them pretty cheaply (I saw them a few times when watching out for "real" carts).
@rich_in_paradise
@rich_in_paradise Рік тому
Not sure if I misunderstood what you were saying at the end there, but while the cartridge slot in the Interface 2 isn't much use for anything but ROMs, the Spectrum's expansion slot has the connections to allow you to do pretty much anything.
@weirdboyjim
@weirdboyjim Рік тому
That's right, the challenge is to do the interfacing with just the cartridge port. It would be easy from the expansion port. I am not known for setting myself easy challenges.
@khatharrmalkavian3306
@khatharrmalkavian3306 Рік тому
I love retro tinkering like this. I never got to use a Spectrum myself, but I really hope to mess with some early Nintendo stuff myself someday.
@weirdboyjim
@weirdboyjim Рік тому
Nice! I have a NES I bought recently for doing some tinkering with as well.
@phirenz
@phirenz Рік тому
I notice the expansion port exposes Y, U and V outputs from the ULA. I wonder what happens if you treat those pins as inputs, and try to feed replacement color data directly into the video modulator? Is there a risk of damaging the ULA?
@weirdboyjim
@weirdboyjim Рік тому
Interesting idea, you would need to trace the circuit. The Sinclair designers did implement some lines via resistors to allow other devices to overwrite the values but no idea for these. I want my cartridge to be a pure cartridge rather than a full expansion port device though.
@phirenz
@phirenz Рік тому
Yeah, restricting yourself to just the pins exposed on the cartridge slot is probably a good idea. No resistors in the schematics. Just connected straight to the ULA's outputs, and also to inputs on the video modulator. It was clearly intended to support an alternative video out accessory (composite or SCART). So if you did want to exprement with driving it, you would be at the mercy of the ULA's output drivers. Maybe they are weak enough in one direction that you can display a fixed color and then pull them in the other direction without causing damage. Not sure it's worth risking a real ULA to exprements. There is also the issue that those pins weren't standardized across all zx spectrum models, just the 16k/48k and plus models.
@stompreaper
@stompreaper Рік тому
This might be a crazy thought but we know the following is true if you have a sufficiently powerful co-processor: You can detect memory read addresses You can supply data in response to a memory read You can modify the data to be read from memory by the co-processor asynchronously You could theoretically have code ran by the Z80 that performs memory reads be interpreted by the co-processor as “writes” by looking at the bottom 8 bits of the address of some 256 byte address space and treating it as a data byte that you then write into co-processor memory space to be acted on. You have the ability to write back new strings of Z80 code into the Z80 ROM space by the coprocessor in response to whatever data you read in, including jumping the Z80 wherever you like in ROM space. That’s almost like having infinite memory if you can modify the data coming out of the ROM faster than the Z80 can execute. If you need the Z80 to “wait till something is done” you would just have the code it’s currently executing by a busy loop till you overwrite the byte that jumps back to the loop label. I’m not sure I articulated this thought super well. An RP2040 dual core should be able to do a lot in between the Z80 ticks and obviously can shame the Z80 on all levels but the concept of giving the spectrum “more” and not just trying to replace parts sounds like such an interesting thing to do.
@weirdboyjim
@weirdboyjim Рік тому
Thinking about clever tricks like is where it gets interesting. You should note though that the cartridge socket doesn't have read or write lines to differentiate between those operations, the z80 will also do dram refreshes and we don't have anyway to differentiate those from a memory operation. There is a whole layer of problems to solve before we move to deciding on a response to specific operations.
@stompreaper
@stompreaper Рік тому
Boo. I was thinking you wouldn’t need to differentiate read/from write if you considered reading specific memory addresses to be a “write to a FIFO” but the DRAM refresh blows that up.
@TEBLify
@TEBLify Рік тому
When working on the ZX Interface 2.021, the lack of signals on the cartridge port soon became a problem - my conclusion was that they probably never intended for the format to be anything other than an intermediary product. There's significantly more that can be done from the expansion port and that is probably your best guess, doing regular port read/write as a first step - just ensure that you don't blow up the ULA by using one of its ports (all even numbers at the very least).
@weirdboyjim
@weirdboyjim Рік тому
My plan is to do it all from the cartridge port, it would be too easy from the expansion port. This project is about taking on a crazy challenge rather than the easy path.
@keithbeard7133
@keithbeard7133 Рік тому
I have to admit, I am a little excited as to what coprocessor you end up choosing =) Will it be a faster z80? Perhaps a later ez80 @ 25Mhz or a RPI-Pico. Maybe a 6502 for the trolls, lol's and fans ;) I really appreciate your channel James, got me back into Z80 assembly after quite a hiatus, and I look forward to just more of it =)
@weirdboyjim
@weirdboyjim Рік тому
Solving the interfacing challenges is what this effort is about, so I'd like to add something that makes it very clear we are doing something you couldn't possibly do on a regular spectrum. The Pico or an ESP-32 are good candidates but I'll think about that more after I've done bit more investigation into the signals.
@mikafoxx2717
@mikafoxx2717 3 місяці тому
​@@weirdboyjimConnect your pipelined CPU. :^) even that would be a lot faster
@andygozzo72
@andygozzo72 Рік тому
i made a little rom board to go in an interface 2(or ram turbo) only really need 2 diodes and a resistor for the eprom/eeprom rom select..and yes the original cartridges can fetch stupidly high prices, they were expensive at the time, from what i remember ... there was a design in an ETI magazine many years ago for a z80 spectrum coprocessor board, which could also run as a 'standalone' computer ..
@weirdboyjim
@weirdboyjim Рік тому
Yes, you can implement the OR gate with a couple of diodes but this was more research than just trying to get the rom interfaced.
@andygozzo72
@andygozzo72 Рік тому
@@weirdboyjim i didnt actually think it'd work as i wondered if it'd pull down fast and hard enough, but seems ok, i used 2 diodes with pulldown plus a transistor 'booster' with fairly low resistance pulldown emitter load in a diagnostic board, because of this... diodes + resistor alone may not work so well with older non cmos eproms , ones without the C in the name..?
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Рік тому
Was waiting for WeirdBoyJim to get a plug. ;-)
@weirdboyjim
@weirdboyjim Рік тому
Not actually sure what you are referring to. Something irregular in the video I didn't spot?
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Рік тому
@@weirdboyjim Take a look at the “Drawn by name” on your schematic bottom right hand corner. 🙂
@mrkosmos9421
@mrkosmos9421 Рік тому
There seems to be a modern-made cartridge for the Spectrum, called the Dandanator. It holds 512KB, and there are a couple games that use it too.
@weirdboyjim
@weirdboyjim Рік тому
That's an interesting project although it plugs into the main expansion port rather than the rom cartridge socket.
@mrkosmos9421
@mrkosmos9421 Рік тому
I actually have a few ideas about the Spectrum. First one is an external extension of the ULA to allow for use of sprites, using the Composite out for Sync and the RGB from the cartridge port and switching in our sprite data when needed. This could read the RAM address being accessed by the ULA when displaying and place the sprite in the right pixel position, though it might need a little timing to get it below 8 horizontal bits. Instead of the Speccy's limited 2-bit colour per attribute square, I'd go for 4 bits of colour to allow for a transparent layer. Using the standard Speccy pallete of course, but one of the black colours can serve as transparent. Oh dear this has become too long, let me comment further below
@mrkosmos9421
@mrkosmos9421 Рік тому
Different 8×8 sprites can be bankable to allow for wider sprites, since taller sprites could probably be loaded after one hblank (might be a stretch though, who knows)
@mrkosmos9421
@mrkosmos9421 Рік тому
This would require just 16 bytes per sprite tile, since it would be 2 bytes per each row of 8 pixels
@mrkosmos9421
@mrkosmos9421 Рік тому
Best way to access might really be IO ports, since the ULA blocks any memory access while displaying
@mrkosmos9421
@mrkosmos9421 Рік тому
Oh, and I forgot the two colour bytes that would be needed for the sprite colour, of course
@mrkosmos9421
@mrkosmos9421 Рік тому
You know what? Nemermind the "writing to sprite memory when the display is on". 227 (4096÷18) sprites! That should be more than enough, and not too hard to implement either really.
@mrkosmos9421
@mrkosmos9421 Рік тому
When you said the cartridge replaces the internal ROM, one of the first things I thought was in fact CP/M-80, given that one of the requirements is "16k of RAM starting at address 0"; to run it, should be almost as easy as replacing the ROM with a 16K RAM chip, figuring out some way to set the RAM RW for writing to it despite the limited cartridge, writing a bootloader, rewriting the display drivers, and somehow connecting to some sort of disk for loading programs. Should even work on a 16k Spectrum I think The tough part really is setting the RAM RW signal though...
@weirdboyjim
@weirdboyjim Рік тому
Interesting project, you would probably do that with the main expansion port to make interfacing the ram easier but you could add a banking mechanism to allow you to load some code from a rom at startup and then swap the ram in later.
@azayles
@azayles Рік тому
It's interesting one of the roms failed cause it was actually a tape image, I wonder what the difference is between the two, and if tape images can be converted to rom images? I have a C64 I've been meaning to do something with for a while. It wasn't my childhood computer, that was an Amstrad CPC464, but the C64 has a simpler processor instruction set, so I'm hoping it'll be easier to hack/mod/play about with. I want to pick apart the data on on one of the many tape games it came with and see if I can extract out the code and convert that to something that'll run on a rom. I'll be sure to stick that on the discord when I start though :D
@weirdboyjim
@weirdboyjim Рік тому
Well the files contain a lot of the same stuff, they data sections are probably close to identical but the tape file has a basic program on the front to facilitate loading. The the tape version while I suspect the code is almost identical will have been design to run out of ram, so I expect some hardwired addresses will be different.
@Zadster
@Zadster Рік тому
An interesting project! It was certainly possible to add 2nd processors via the standard connector, this is effectively how development systems squirted the data into the Speccy memory, but this did need the full bus. My first thought was to split the 16K chunk into 2, with the lower half being (as it must be) the Speccy Boot ROM, and the upper being 8kB of static RAM for the external processor to dump data into. Sadly, there is no R/W line to allow the Speccy to write data back. I guess you can fake this by using the low 8 address bits as data bits (plus possibly a clock/latch bit) and maybe having 1 or 2 byte-wide latches instead of SRAM. A boggo Rasp Pi would probably be overkill as a slave CPU, but interfacing would be easy, and the development environment would be faster than a headless RP2040 or whatever. Shame there is no interrupt pin available.
@weirdboyjim
@weirdboyjim Рік тому
It's worse than you think, there are no lines to differentiate between a read, a write OR a memory refresh. I do like a challenge.
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR 10 місяців тому
I am wondering if you were to get a whole MEMOTECH MTX512 plus the MEMOTECH HDX512 or the MEMOTECH FDX512 you might be able to do more with it than the SPECTRUM could ever do and using a special adapter called the SPECULATOR would let you play SINCLAIR SPECTRUM Software on the MEMOTECH.
@weirdboyjim
@weirdboyjim 8 місяців тому
Didn't they start out doing expansion port add ons for the spectrum? I wondered how close their computer was to a spectrum (minus the sinclear rom) with their add-ons in built.
@johandenhertog6878
@johandenhertog6878 Рік тому
Have a ZX Interface 2 with the original Sinclair box in nice complete condition. But no ROM cartridges for it such as Jetpac. Would be great to have the original Jetpac ROM cartridge. To use it on my ZX Spectrum 16K.
@weirdboyjim
@weirdboyjim Рік тому
Very nice! I've actually managed to get hold of an original rom cartridge now, I'll show it in a future video.
@edgeeffect
@edgeeffect Рік тому
I've been "having a crisis" recently about obtaining Lead/Tin solder... I was trying to zoom in on your reel in this video to see what you had but couldn't quite get there... the "long-term, health hazard" warning symbol looks promising. ;) Love the video-overlay / x-ray cam effect. There's a history project... "Why don't the power and ground rails match the other breadboard holes?" There must be some reason for the cluster of five arrangement! Well, maybe. I wonder if it's even possible to find out.. Yeah... I was wondering if there were any logic chips that just pull down any floating pins. Having two pins called "ROMCS" and "ROM_CS" is... erm... not helpful.
@weirdboyjim
@weirdboyjim Рік тому
That's still the good stuff! Maybe I should stock up if it's not too late!
@edgeeffect
@edgeeffect Рік тому
@@weirdboyjim there's a chap on E. Bay called "fizzyvimto" who's got a load second hand and "aimtools" seem to have quite a good stock.
@SkigBiggler
@SkigBiggler Рік тому
Is it difficult to obtain leaded solder in the UK? In New Zealand it’s still readily available from hobby shops.
@M0UAW_IO83
@M0UAW_IO83 Рік тому
Can't see in the video (ageing eyes) but you might want to chamfer the edge connector, straight cut card edges can bend the fingers in the edge connector.
@weirdboyjim
@weirdboyjim Рік тому
Interesting. I'm not to worried about this test board but I final cartridge would warrant it.
@mrkosmos9421
@mrkosmos9421 Рік тому
I wonder if it would be possible to connect a Spectrum to the internet with a 48k modem. Transmit could be the beeper pin, and receive could be a pin in the joystick port. After that, a modem to USB adapter or old router should be easy to get, and some stuff like the Twitter API can be accessed pretty easily I think. But perhaps a humble serial port would be more realistic with this bit-banging setup. Sorry if these many comments are annoying...
@weirdboyjim
@weirdboyjim Рік тому
You could probably do some kind of Acoustic coupler communication without any extra hardware, remember the spectrum used sound on audio tape for data storage.
@mrkosmos9421
@mrkosmos9421 Рік тому
Oh! I think Usagi Electric has one for the TI 99, is it the module that takes the handset from a landline phone?
@rimmersbryggeri
@rimmersbryggeri Рік тому
What about putting a smd rom on the board and using your own cpu to make a rom programming routine? That could be cool.
@weirdboyjim
@weirdboyjim Рік тому
Would be fun, but keeping these projects separate. It's useful to have something you can work on when the main project is waiting on something.
@rimmersbryggeri
@rimmersbryggeri Рік тому
@@weirdboyjim Yeah that's true. I'm just getting into rom programming myself as a way to save bricked laptops but am waiting on tools since the sop8 in critcuit clip on "socket" worked once. I guess that's what you get for buying too cheap things. Same goes for breadboards.
@ZacCrawforth
@ZacCrawforth Рік тому
It's like proto-Subnautica! ;)
@weirdboyjim
@weirdboyjim Рік тому
Ok, I don't get the reference.
@ZacCrawforth
@ZacCrawforth Рік тому
@@weirdboyjim Subnautica "plot" is basically that you crash on a planet and have to gather resources to build yourself a rocket to get home. I mean... It's waaaay more than that, but that's the gist. :)
@silvius7892
@silvius7892 Рік тому
You set you will like to create some coprocessor. I'm looking forward what kind of coprocessor you are planing to implement. Anyhow; you have plenty place in original ROM to add your own routine and use write into ROM space positions for communication with your cartridge. you can in say mode 0 react just on specific address range with your routine, in mode 1 implement your own ROM all 16KB with bank switching and use in ROM address space 4KB for transfer buffer to load into upper 48KB. you can even listen on bus and make backup from standard upper memory space to by able to restore original content. In any case I'm waiting what for coprocessor you would like to create. From me 👍
@weirdboyjim
@weirdboyjim Рік тому
The SNES had the SuperFX but designing something like that would be overkill since we are really interested in the spectrum side and the interfacing. I'll probably use an off the shelf micro controller to do something similar.
@silvius7892
@silvius7892 Рік тому
@@weirdboyjim Generally it is a Math coprocessor, you already showed solution with sin table in ROM. At 0x386E you have 490B space in ROM for routines, you can even improve original BASIC command for SIN,... You have no n_WAIT signal but you can make routing setting input parameters in input "in memory registers" like C64; set Z flag zero and next will by JZ on the same address back in never ending loop. This cold be your trigger for your coprocessor, make operation you want, write result in your "in memory output register" and then just change JZ into JNZ what will release CPU from never ending loop. Don't forget after CPU executes JNZ (continuing on to next instruction instead of jumping) put JZ back 🙂. I like more low level solution and a bit Z80 assembler and not like some modern MPU, and if than CPLD or FPGA. I'm sure you will come with some other original solution and I'm excited a bit, sorry.
@c0d3w4rri0r
@c0d3w4rri0r Рік тому
Respectfully adding an FPU isn’t the obvious choice. You’ll need to write an single instruction + data to the memory then read the data out. That’s slow on an instruction by instruction basis. What would be better is a GPU. Upload a block of code once and read / write buffers as needed. The bottle neck of writing in and out of memory isn’t as big a deal then.
@weirdboyjim
@weirdboyjim Рік тому
Respectfully, you just assumed what I’m going to do and then told me it’s wrong. My plan is to add a coprocessor but that will be more gpu than fpu but don’t get hung up on the specifics, the interesting part here is solving the interfacing challenges. Success however will need to show something qualitatively better than can be achieved by a spectrum alone or there isn’t really a point.
@c0d3w4rri0r
@c0d3w4rri0r Рік тому
@@weirdboyjim that's fair. I've not heard the term coprocessor used to describe GPUs. I understood it to mean chips that were effectively expanding the instruction set of the main cpu. Not independent processors in their own rights.
@weirdboyjim
@weirdboyjim Рік тому
@@c0d3w4rri0r I'm equating this effort to the SuperFX chip added to some SNES carts which was always called a co-processor.
@MadsonOnTheWeb
@MadsonOnTheWeb Рік тому
For a moment I thought the interface was a modern zx spectrum
@weirdboyjim
@weirdboyjim Рік тому
Not seen one in person, are they that small?
@MadsonOnTheWeb
@MadsonOnTheWeb Рік тому
​@@weirdboyjim I just pulled that out of my imagination. But wouldn't be bad if it existed
@aldob5681
@aldob5681 Рік тому
a memory mapped device will do just fine.
@weirdboyjim
@weirdboyjim Рік тому
Yeah, I'll have to do all my IO via memory but there is no obvious way to differentiate between a read and a write on the cartridge.
@aldob5681
@aldob5681 Рік тому
@@weirdboyjim without the r/w lines you can only invent a "read only" protocol. reading from address 2000 to 20ff should be interpreted as a write 00 to ff by the card. but does it worth the effort?
@weirdboyjim
@weirdboyjim Рік тому
@@aldob5681 Unfortunately that would not work easily as you would detect a bunch of false writes from the dram refresh hardware. This is a very tricky problem to solve, but I can see a few ways to attack it but it's of interest precisely because it's going to be very difficult.
@aldob5681
@aldob5681 Рік тому
@@weirdboyjim you are right. refresh uses mreq also. well the last option is a write command to ram. no mreq involved. R register is only 7 bit so there should be 1 bit always 0 or 1. don't know. anyway it all seems very tricky
@weirdboyjim
@weirdboyjim Рік тому
@@aldob5681 Wouldn't bother if it was easy. anyway, I don't want to preempt the next couple of videos content in the comments.
@digitalarchaeologist5102
@digitalarchaeologist5102 Місяць тому
Maybe the PCB isn't going to be published, so might just be a moot point but perhaps through hole caps may have been easier for the average joe bloggs.
@weirdboyjim
@weirdboyjim 26 днів тому
Yeah, I wasn't expecting anyone to try and do this, so I'm mostly just doing whatever is easiest for me at the time.
@digitalarchaeologist5102
@digitalarchaeologist5102 25 днів тому
@@weirdboyjim Which does makes sense tbh. I know it's much easier to be an armchair critic than a content creator so thank you for what you do!
@your_utube
@your_utube Рік тому
I went back to my hometown recently, contacted an old friend and he gave back my old Zx Spectrum 48k he borrowed over 30 years ago. Membrane busted though.
@weirdboyjim
@weirdboyjim Рік тому
Nice! You can get new Membranes pretty easily on ebay now.
@your_utube
@your_utube Рік тому
@@weirdboyjim I will try to see how it works from South Africa the way the world is now. Hopefully it will be fine.
@jyvben1520
@jyvben1520 Рік тому
maybe add a rpi pico with sd card reader to emulate roms ...
@weirdboyjim
@weirdboyjim Рік тому
There are things around like that already, I've seen something that replaces the old micro drive with an SD card that may actually be better.
@TomStorey96
@TomStorey96 Рік тому
When electronics design also includes mechanical design.
@weirdboyjim
@weirdboyjim Рік тому
"Mechanical Design" is a nice way of saying "Doesn't fit in hole!"
@TomStorey96
@TomStorey96 Рік тому
@@weirdboyjim I was watching you lay out the board and wondering if you were going to hit this exact issue. But only because I recently designed an ISA prototype board which is being manufactured right now. I've put a D-sub connector on the outward edge that is meant to suit a particular bracket. I'm freaking out about whether I got the dimensions and positioning of everything right because it won't be a cheap mistake if I didn't... So mechanical design is kind of top of mind for me at the moment. They'll still be usable, but not as nice without the bracket to hold them securely in their slot. :-)
@weirdboyjim
@weirdboyjim Рік тому
@@TomStorey96 Good luck with that, it's a nice looking board you designed (Assuming it's the one you posted on discord).
@TomStorey96
@TomStorey96 Рік тому
@@weirdboyjim yep, that one! Fingers crossed!
@LaserFur
@LaserFur Рік тому
You could be really silly and put a FPGA in a cartage. then have spectrum code that reads the FPGA and displays the graphics. then during the vertical refresh the keyboard and joystick would be read. At that point it's just a display and keyboard to connect to an external device to do all the more modern stuff. But this would kinda be like the guy that displays video on a PET.
@weirdboyjim
@weirdboyjim Рік тому
Well I need the code running on the spectrum to come from the cart. Because the cart spec is so limited the challenge is in working out the communications.
@StefanRink
@StefanRink Рік тому
There is enough room in all the ROM space for thousands of flip flops, you just can't read them back that easy.
@weirdboyjim
@weirdboyjim Рік тому
I'm not sure what you are asking. Ignoring the specific ROM implementation with regard to programming we normally think about them as being static and not flip flops.
@StefanRink
@StefanRink Рік тому
​@@weirdboyjim The write signal isn't on the ROM socket but it's probably on the big socket of the spectrum and I you could use writes to some of the current known ROM addresses to 'configure' stuff. Flip flop was a bad name for adding write only registers. You could then also have a small spot in memory where you bank those registers for reading back values. Ps. isn't a ~CE without a ~MREQ a write?
@wizardnotknown
@wizardnotknown Рік тому
I hate that these cool machines are just niche and a hobby today.
@weirdboyjim
@weirdboyjim Рік тому
I know!
@Andrew-dp5kf
@Andrew-dp5kf 3 місяці тому
Booo! AutoRouter 😊
@weirdboyjim
@weirdboyjim 3 місяці тому
Whenever I push that button I brace myself for the comments! I had route all the important stuff now!
@Senux-Video
@Senux-Video Рік тому
thanks for job. but this is pain in ass. better put sd card.
@weirdboyjim
@weirdboyjim Рік тому
This is just a stepping stone to something else. I believe you can buy sd card microdrive emulators if you just want convenient loading.
ZX Spectrum, Expansion Port Research
40:45
James Sharman
Переглядів 9 тис.
Fixing a special ZX Spectrum
36:05
Mr Lurch's Things
Переглядів 12 тис.
Піхотинець - про рутину на фронті
00:46
Суспільне Новини
Переглядів 521 тис.
"Поховали поруч": у Луцьку попрощались із ДВОМА Героями 🕯🥀 #герої #втрати
00:15
Телеканал Конкурент TV - новини Луцька та Волині
Переглядів 310 тис.
Timex Sinclair 2068 - The American ZX Spectrum
17:22
The 8-Bit Guy
Переглядів 558 тис.
ZX Spectrum 48K - How to replace the ROM with an EPROM
29:25
IanScottJohnston
Переглядів 39 тис.
Tile Data - VGA from Scratch - Part 13
1:00:34
James Sharman
Переглядів 15 тис.
Bad RAM - ZX Spectrum repair
26:20
More Fun Making It
Переглядів 9 тис.
16 бит тому назад - ZX Spectrum
8:58
GamesBusters
Переглядів 201 тис.
A multi-purpose expansion cartridge for the ZX Spectrum - the ZX Dandanator MTD
22:49
Switching a ZX Spectrum’s RF output for Composite Video. Is it worth it?
16:28
Issue 6a ZX Spectrum 48K Repair - From Knackered to New
17:32
Happy Little Diodes
Переглядів 8 тис.
Fixing Bad Video Quality on the Sinclair ZX Spectrum
14:50
Noel's Retro Lab
Переглядів 17 тис.
Start from 0 at any point on the T1 Digital Tape Measure
0:14
REEKON Tools
Переглядів 35 млн
Главная проблема iPad Pro M4 OLED!
13:04
THE ROCO
Переглядів 35 тис.
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
Creepy Samsung Alarm cannot be turned off 😱🤣 #shorts
0:14
Adani Family
Переглядів 1 млн