Timing Tweak - VGA from Scratch - Part 15

  Переглядів 6,633

James Sharman

James Sharman

День тому

This video is about a timing issue in the vga circuit that I’ve been avoiding talking about with the assumption that a good time to discuss it would present itself. That didn’t happen so it’s getting it’s own video now before it becomes either a blocker or something I have to hand wave and I don’t like making circuit changes that I haven’t talked about.
I do have to talk about the sprite circuit a little in planning out the changes, I also manage to loosen some wires while adding a breadboard which I have to investigate for a while, a solid example of why I’m trying to get more stuff on pcb sooner rather than later.
While the circuit change is small it’s important and is part of the process of preparing for the final circuit additions.
0:00 Introduction
0:39 Build Review
1:55 Timing Overview
2:42 Timing Discussion
8:04 Circuit - Sprite Overlay Proxy
12:45 Circuit - Timing Change
16:06 Outro

КОМЕНТАРІ: 67
@weirdboyjim
@weirdboyjim 6 місяців тому
Join us on Discord: discord.gg/jmf6M3z7XS Follow me on Twitter: twitter.com/WeirdBoyJim Support the channel on Patreon: www.patreon.com/JamesSharman
@schrodingerscat1863
@schrodingerscat1863 6 місяців тому
This project is actually a very thorough introduction to the topic of microprocessors and digital systems design. Certainly far better than than the courses I took at university back in the 80's when the technology being used here was current. Great practical demonstrations of some fairly complex topics makes this a very good series for anyone just getting into digital electronics. Excellent content 👍
@TheDarkSide11891
@TheDarkSide11891 6 місяців тому
As someone currently studying electrical engineering at university with a digital systems module, I can say this series is still considerably better than the current curriculum even despite it being "outdated" technology.
@schrodingerscat1863
@schrodingerscat1863 6 місяців тому
@@TheDarkSide11891 The one thing that always drew me to digital electronics is the unchanging nature of it. Sure systems have become more complex over the years but the basic building blocks are exactly the same now as they were 30 years ago. If you really get to grips with all the topics covered in this series and read around the subjects raised it will stand you in good stead for a digital electronics module at undergraduate level. The real complexity comes into play with increased clock speeds and you probably will only just be touching on that at undergrad level if covering it at all.
@weirdboyjim
@weirdboyjim 6 місяців тому
Kind words! I'm not sure I'd want my stuff to be a substitute for any formal learning, but I've always found playing around and experimenting is a great way to learn.
@schrodingerscat1863
@schrodingerscat1863 6 місяців тому
@@weirdboyjim You are too harsh of your own efforts, your approach is structured and methodical and very well presented. You are covering some reasonably advanced topics in a way that makes sense and is entertaining. A far cry from the terrible efforts of some of my lecturers on this subject. You would be surprised how bad some professional educators are at covering these topics.
@Peter_S_
@Peter_S_ 6 місяців тому
@@weirdboyjim If you wished to, you could certainly film this series again from the standpoint of knowing your objective and the result would be better than any CPU design course I've seen. You should be congratulated.
@TroySchrapel
@TroySchrapel 6 місяців тому
Great work, James. I love your pragmatic approach to these issues. Really looking forward to seeing your sprite circuit come together.
@weirdboyjim
@weirdboyjim 6 місяців тому
Thanks Troy, I hope the sprite circuit doesn't disappoint. The design for it ha remained pretty much constant since the start of this project but I'm in the process of working out how to best break it down into videos.
@rauljvila
@rauljvila 6 місяців тому
It still amazes me what "built from scratch" really entails! Great explanations as usual, thanks!
@weirdboyjim
@weirdboyjim 5 місяців тому
Glad you liked it! There are people on the discord who would want to go deeper and start cooking custom silicon.
@neodimium
@neodimium 6 місяців тому
Man! This is like candy for my brain!
@weirdboyjim
@weirdboyjim 6 місяців тому
Glad you like it!
@tux1968
@tux1968 6 місяців тому
Hi James, always so happy to another step forward in your project! Thanks.
@weirdboyjim
@weirdboyjim 6 місяців тому
Thanks Tux! Glad you are enjoying it!
@m1geo
@m1geo 6 місяців тому
Excellent James! I loved the jam-1 scrolling end! 😁
@weirdboyjim
@weirdboyjim 6 місяців тому
Thanks George!
@Pippo.Langstrumpf
@Pippo.Langstrumpf 6 місяців тому
You are a crazy electronics freak!!! The content I was looking for!
@weirdboyjim
@weirdboyjim 6 місяців тому
Glad you are enjoying!
@ecosta
@ecosta 6 місяців тому
This project keeps amazing me! I wish I had time and patience to troubleshoot hardware issues like you do.
@weirdboyjim
@weirdboyjim 6 місяців тому
Glad you are still finding it interesting!
@TheRealBobHickman
@TheRealBobHickman 6 місяців тому
This was very educational, top content again!
@weirdboyjim
@weirdboyjim 5 місяців тому
Thanks Bob! Glad to hear you are still finding it interesting!
@OscarSommerbo
@OscarSommerbo 6 місяців тому
A perfect video for a lazy Saturday!
@weirdboyjim
@weirdboyjim 6 місяців тому
Hope you enjoyed it!
@Peter_S_
@Peter_S_ 6 місяців тому
Outstanding series. Extra points anytime a '574 is used as a delay line or a shift register as well.
@weirdboyjim
@weirdboyjim 5 місяців тому
Lol, Thanks! It's worth looking at alternatives like the 374 when you are doing things like delays or shifts, the pins may be more suitable.
@Peter_S_
@Peter_S_ 5 місяців тому
@@weirdboyjim The moment the 573/574 came onto the market I swore off ever using a 373/374 again. Too much PTSD from having to do bus layout with them.
@nahkamursu
@nahkamursu 6 місяців тому
Finally new video, i was getting worried mate :D
@weirdboyjim
@weirdboyjim 6 місяців тому
It's only been a couple of weeks! Hoping to get videos out with a more regular cadence for the next few weeks.
@ucmRich
@ucmRich 6 місяців тому
YOu and your work are extremely amazing pal, ty for doing this for us :-D
@weirdboyjim
@weirdboyjim 5 місяців тому
Good to hear you are finding it interesting!
@vasileceteras
@vasileceteras 6 місяців тому
Thank you for this series, this project is a gold mine for learning how to properly design a computer! I have a question: in theory, can the sprite overlay be extended to deal with extra one or more sources of data, without adding more delays?
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 6 місяців тому
Why do we care so much about delay? If this was a blitter, I would understand. Let’s wait for the overlay and sprite circuit first. PcEngine overlaid 16 sprites. C64 and Amiga can use sprites for the background (for parallaxe) . First thing first. I don’t actually want a second playfield like Amiga and genesis. Half of each field is wasted. Have both of them, but without overlap. Overlap is done by sprites.
@weirdboyjim
@weirdboyjim 6 місяців тому
The biggest bottleneck is memory. At full vga pixel clock I can just read a byte (per ram chip) per cycle. So that's a bigger restriction than the overlay circuit itself. I'm expecting the overlay circuit to be pure logic and around 10ns, so you could combine 3 of those circuits in a single clock to merge 4 data sources.
@cj09beira
@cj09beira 6 місяців тому
What a good surprise
@weirdboyjim
@weirdboyjim 6 місяців тому
Hope it lived up to expectations!
@LeeSmith-cf1vo
@LeeSmith-cf1vo 6 місяців тому
When you do this fix on pcb I think you should use 2 d-latches for it if you have space. That way you can cascade the delay up to 8 cycles, selectable by jumper. This will protect you against an unforseen future problem that may introduce additional delays without having to order new pcbs. Potentially you could leave the additional d-latch unpopulated until required.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 6 місяців тому
Does a CRT not need some time to react on hsync. So we have time for our pixel pipeline.
@GodmanchesterGoblin
@GodmanchesterGoblin 6 місяців тому
​@ArneChristianRosenfeldt Sync pulses have their own front-porch and back-porch timings to address the time that monitors require to process them (that goes back to CRT based displays). The purpose here was to keep everything in step rather than have timings shift further as the display pipeline became longer.
@weirdboyjim
@weirdboyjim 6 місяців тому
I'm comfortable I have the right number of steps accounted for here. The broad strokes of the design have held for a while now, I look forward to your comments when I'm forced to tweak it.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 6 місяців тому
Yeah, I also don't know how other chips do it. Like you cannot expose registers for border on EGA, smooth scroll on VIC-II, and tell the coder to add some magic values to make it fit. Though on the C64, where exactly is sprite position 0? Isn't it some arbitrary value? Smooth scroll=0 matches the border exactly. So I guess that you are right. @@GodmanchesterGoblin
@user-pl5oj1hr8n
@user-pl5oj1hr8n 6 місяців тому
Question, i would apreciate if someone would answer it. I have 16 ram chips 2048×8 (2048 adresses - each adress contains 8 bits). I need to use this specific chip, cant use bigger capacity. i want to connect all of them to make 32K RAM. Problem is that it requires external logic, and i just cant figure out how to implement it. Can you recommend some articles or books, where i could read about memory chip organisation?
@weirdboyjim
@weirdboyjim 6 місяців тому
Jump onto the discord and chat on the electronics channel. What you probably want though is a pair of 74xx138’s. The outputs from those go to the chip enable lines of the ram chips. The lower 11 address lines go to all the ram chips and the upper 4 address lines go to the 138’s
@user-pl5oj1hr8n
@user-pl5oj1hr8n 6 місяців тому
@@weirdboyjim yes! This is exactly what i needed, thanks. joined
@kriswillems5661
@kriswillems5661 6 місяців тому
Cool, you're going to do sprites too. I really would like to know how sprites work in hardware.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 6 місяців тому
Have you seen the die of the Vic-II. I think that is the cleanest. Is wired-or allowed? Each sprite has to signal all sprites below. So we need a lot of inverters. Actually, low or highZ. At the beginning of each pixel, precharge all lines .. it is a mess. How would you do it in CMOS? Can we have 4 groups with 4 sprites each? Then we resolve within the groups. Shadow bubbles up. We resolve the groups. Then back down. Now the elected sprites puts its color onto the bus. For this: why not load 1 bit transparency first, but 24 bit color only on demand? How big is the palette? 4 bit for sprite number. 4 for x and 4 for y?
@weirdboyjim
@weirdboyjim 6 місяців тому
I'm aiming for a very simple system.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 6 місяців тому
I was referring to the delay. If priority takes one or more cycles, indeed we need to delay another signal: the color. On a breadboard with cheap memory it is so tempting to just use more memory. The palette is just a texture approach I did steal from Saturn and PSX. I was using the number 4 because I found 4-input NAND parts. I think that I have seen 4 way multiplexers. CMOS in ICs uses 4 bit adder macros. 6502 has a 4 bit adder for PC. Ben Eater uses a 4 bit adder. 4 is the number. You seem to aim for the C64 way where sprites and background overlay is completely separated from the intra-sprite overlay. C64 has this behind background flag. It would be interesting to have 16 sprites and one of them refers to the background. So z order always makes sense. Though I would not want to route access to background data to each sprite-unit. @@weirdboyjim
@AJB2K3
@AJB2K3 6 місяців тому
I've spent have a day also chasing a display issue caused by bad jumpers.
@weirdboyjim
@weirdboyjim 6 місяців тому
After recording this I started thinking about ways to tidy the vga stuff up a bit before I add anything else extra. Might save me some trouble.
@ChristopheVerdonck
@ChristopheVerdonck 6 місяців тому
i found this interesting
@weirdboyjim
@weirdboyjim 6 місяців тому
Glad to hear it!
@GeomancerHT
@GeomancerHT 6 місяців тому
Looking forward to the day we can develop some games, would be great to code with limitations of a modern retro computer.
@weirdboyjim
@weirdboyjim 6 місяців тому
Yeah, starting to make a list of what I want to develop in a reasonable amount of time.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 6 місяців тому
So what is your interest? I used to be obsessed with scrolling, but then a lot of vintage games use fixed screens. I used to think about tricks to avoid color clash, but then 16 bit bitmap graphics got cheap. Parallax backgrounds look nice, but then a lot of games are top down or iso-metric even on genesis. Outrun looks so nice, but then only racing games seem to really utilize super scaler sprites. Those rail shooters are all so meeh. No classics. And while I can appreciate good graphic artwork, why do people always talk about the music .. in the title screen?? It is about the game. About the sound of the weapon, explosions, tire screech, and monster growling behind the corner.
@GeomancerHT
@GeomancerHT 5 місяців тому
@@weirdboyjim thank you for your reply, I hope you make some of the tools/sdk available because I was talking about myself coding haha, looking forward to your games too :D
@weirdboyjim
@weirdboyjim 5 місяців тому
@@GeomancerHT actually the emulator and assembler is available on the discord
@monad_tcp
@monad_tcp 6 місяців тому
5:00 so its pipelined !
@weirdboyjim
@weirdboyjim 5 місяців тому
Yep. For a while this video had a working title referencing that directly.
@PhilBoswell
@PhilBoswell 3 місяці тому
This episode isn't on the "VGA from Scratch" playlist, thought you might like to know…
@weirdboyjim
@weirdboyjim 3 місяці тому
Fixed!
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 6 місяців тому
27 MHz, 24 bit DAC is so AtariJaguar
@weirdboyjim
@weirdboyjim 6 місяців тому
Close, it's 25.175 mhz. I never got the chance to work on the Jaguar unfortunately It looked like fun.
@ucmRich
@ucmRich 6 місяців тому
If you ever make a VGA or a future HDMI kit, please sell them. I'll tell others about it for you +1
@weirdboyjim
@weirdboyjim 5 місяців тому
I'm unlikely to make a kit out of any of these deigns, but I'll think about kit possibilities for future projects.
Output PCB - VGA from Scratch - Part 18
1:22:14
James Sharman
Переглядів 9 тис.
Hardware SPI - IO from Scratch - Part 6
26:14
James Sharman
Переглядів 6 тис.
"Поховали поруч": у Луцьку попрощались із ДВОМА Героями 🕯🥀 #герої #втрати
00:15
Телеканал Конкурент TV - новини Луцька та Волині
Переглядів 310 тис.
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Переглядів 6 млн
Project:65 EEPROM debugging for a 6502 computer
14:29
CJ's Project Vlog
Переглядів 472
Signal Cleanup - VGA from Scratch - Part 17
13:34
James Sharman
Переглядів 7 тис.
Raspberry Pi 5 M.2 HatDrive!
15:48
ExplainingComputers
Переглядів 224 тис.
Installing the world’s worst video card
25:12
Ben Eater
Переглядів 946 тис.
Interim Backplane - VGA from Scratch - Part 16
30:37
James Sharman
Переглядів 6 тис.
Hardware SPI Continued - IO from Scratch - Part 7
31:13
James Sharman
Переглядів 4,5 тис.
SPI (Bit Banging)- IO from Scratch - Part 4
30:04
James Sharman
Переглядів 9 тис.
Apple Event - May 7
38:22
Apple
Переглядів 6 млн
Creepy Samsung Alarm cannot be turned off 😱🤣 #shorts
0:14
Adani Family
Переглядів 1 млн
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
Игровой ноутбук за 100тр в МВИДЕО
0:58
KOLBIN REVIEW
Переглядів 361 тис.