Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Breaking the 64k barrier - Spectrum Memory Banking

Автор: NCOT Technology

Загружено: 2022-07-24

Просмотров: 7572

Описание:

How do you get more than 64K of RAM in an 8 bit computer? Let's look at how memory banking works!

So as explained in the previous video, our little Z80 CPU only has 16 bit address lines, and that means the maximum memory it can address is 64K. In this video let's take a look at how memory banking on the 128K Spectrum and the Spectrum Next works, allowing those machines to break through the 64k barrier!

This video is mostly aimed at people trying to program the Spectrum, but how and why this works is sufficiently technical that I hope it's interesting to more than the five people out there who seem to be programming like this!

The Spectrum +3 has a whole 128K of RAM. At the time this was amazing. They and all other Spectrums are based off a Zilog Z80 CPU. There's 16 address lines, and 8 data lines. The 8 data lines are what makes this an 8 bit CPU. Inside the CPU those 8 lines go to the registers, each of which are 8 bits wide.

Since there's 16 address lines, the CPU can address up to 65,536 different locations. And each of those locations can store a single 8 bit number. So 65,536 different locations, each of which stores a single byte gives our CPU 64K of addressable memory. That's it. 64K is loads, surely we don't need much more?

So on the 128K Spectrums, how's the 128K of RAM and 32K of ROM fit inside the 64K of addressable memory the Z80 can see? Magic! No, really, this stuff is proper magic all the magic is inside a chip which on my +3 is a gate array.

You know the ULA on the Spectrum? That all purpose chip that makes the computer a Spectrum? The Gate Array on the +3 is that with extra bits added.

The gate array on the Speccy +3 contains all the logic that was in the ULA, plus a bunch of other logic for bank switching and so on, also defined using logic equations. It's the same as a bunch of hardware logic gates, just in one cost-reduced package.

It's sort of the great grandfather of the FPGA in the Next. Except the FPGA on the Next is that plus the CPU and everything else to create the whole machine, described using logic equations.

I know you can describe any logic circuit using an FPGA, but is the reverse true? Can you describe every FPGA circuit using real hardware?

You know, with appropriate tools you can totally reprogram the Next's hardware to be something different.

The idea is to partition memory up into banks of a certain size, and then let the programmer attach those banks to parts of the CPU's address space when needed. On the original Spectrums, this was done using 16K banks. On the Spectrum +3 it's a bit different - they updated the design to allow a bit more flexibility so CP/M could be run...

The Next can do all of that, plus its own much more flexible memory paging. On the Next, you use 8K blocks and can switch in and out of any 8K area of the address space.

We'll have to be "careful" to the best of our ability to avoid our code growing into the stack if we write too much, or the stack growing down into our code if we use too many function calls at once.

Doing this is left as an exercise for the reader, have fun! I have no idea how to cope with this, and no doubt future me will encounter a stack overflow at some point.

Uses Red arrow animation pointing on a green screen Stock Videos by Vecteezy.

Social Media
============
Twitter:   / ncot_tech  
Ko-Fi: https://ko-fi.com/ncot_tech
Web version: https://ncot.uk/spectrum-next/Breakin...

Chapters
========
00:00 - Start
00:46 - RAM in the Spectrum
03:46 - ULAs, Gate Arrays and FPGAs
05:15 - What is Bank Switching
09:42 - About Memory Mapping
18:00 - MMUs and how to use them
20:29 - Ideas for extra ram
22:24 - Outro - Subscribe!


#Programming
#ZX Spectrum Next
#Memory Banking

Video Title: Breaking the 64k barrier - Spectrum Memory Banking

Breaking the 64k barrier - Spectrum Memory Banking

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Clever engineering on a budget - ZX Spectrum Interrupts

Clever engineering on a budget - ZX Spectrum Interrupts

The Madness of Z80 I/O

The Madness of Z80 I/O

Добавляем 1 МБ к 8-битному компьютеру!

Добавляем 1 МБ к 8-битному компьютеру!

Многозадачность на процессоре Z80

Многозадачность на процессоре Z80

Сборка ZX81 со всеми новыми деталями в 2022 году | Часть 1 | #sinclair

Сборка ZX81 со всеми новыми деталями в 2022 году | Часть 1 | #sinclair

Z80 Retro #7 - 512K Bank Selected Memory

Z80 Retro #7 - 512K Bank Selected Memory

Turn your Pico into a 400MHz 24 Channel Logic Analyser

Turn your Pico into a 400MHz 24 Channel Logic Analyser

Отняли память! Что дальше? | Будущее рынка ОЗУ и SSD

Отняли память! Что дальше? | Будущее рынка ОЗУ и SSD

Подключение накопителя Z80 PATA с FAT32

Подключение накопителя Z80 PATA с FAT32

ZX Spectrum Hardware Description

ZX Spectrum Hardware Description

SID: Классический 8-битный звук

SID: Классический 8-битный звук

Zilog Z80 Deep Dive - How does it work?

Zilog Z80 Deep Dive - How does it work?

VGA ZX Spectrum — без ULA, без ПЛИС

VGA ZX Spectrum — без ULA, без ПЛИС

Modern Z80 Computer RAM/ROM Options

Modern Z80 Computer RAM/ROM Options

Объяснение таймингов DRAM в ZX Spectrum.

Объяснение таймингов DRAM в ZX Spectrum.

Designing a Card Slot Modular Z80 Computer

Designing a Card Slot Modular Z80 Computer

The History of Zilog & Z80

The History of Zilog & Z80

Как Сделать Настольный ЭЛЕКТРОЭРОЗИОННЫЙ Станок?

Как Сделать Настольный ЭЛЕКТРОЭРОЗИОННЫЙ Станок?

Линус Торвальдс в ярости из-за предложения RISC-V

Линус Торвальдс в ярости из-за предложения RISC-V

Катастрофа, которая нас (возможно) ждёт [Veritasium]

Катастрофа, которая нас (возможно) ждёт [Veritasium]

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]