-add USB keyboard for no more key timeout (but as joystick run... it's not important yet)
=== Minimal Amstrad Architecture : Build your own Z80 Amstrad Computer ===
I explain here my first great experiment, for having Amstrad saying hello :)
==== First schematic : Z80+RAM+ROM ====
Z80 can address from 0x0000 to 0xFFFF
RAM is from 0x0000 to 0xFFFF
You have lower and upper ROM, so starting at address 0x0000 you put OS464.ROM, and at address xC000 you put BASIC1-0.ROM
When Z80 do READ MEMORY, you read ROM
When Z80 do WRITE MEMORY, you write RAM
When Z80 do WRITE IO, you do nothing
When Z80 do READ IO, you response it DATA=0x00
If you run this schematics on FPGA, RAM change !
==== Second schematic RAM+VGA ====
With JavaCPC, when you do a snapshoot, and edit result file, you see that RAM content starting at a certain address.
Do "paper 2", "cls" on JavaCPC, the screen became RED, and then save a snapshoot, you can see that last part (from 0xC000 to 0xFFFF) had change from a lot of 0x00 into a lot of 0xFF
So last part of RAM is used for video (it's shown on Quasar [[http://quasar.cpcscene.com/doku.php]] and other legend website...)
For making my VGA module, I take a look at unix "modeline" command that give you all timing for VGA signals, and it run :)
After having a VGA module displaying a RED screen (yeah !), I made it scanning last part of RAM (from 0xC000 to 0xFFFF), and solved puzzle (RAM contain in fact line of 0xFF, finished by 0x00)
Line are not in great order, and scroll crash, but it says hello x)
==== Third schematic Z80+ROM+RAM+VGA ====
So the game is : RAM is empty at startup, if I turn on it display something.
So you put the two last schematic together and tadam... got a problem.
The problem is that two component are accessing RAM in the same time : the Z80 and the VGA, so you had to make a sequencer. A sequencer is simply a counter fed by a clock : 00, 01, 10, 11. And you manage work task like this :
00 RAM WRITE start from Z80
01 RAM WRITE end from Z80
10 RAM READ start from VGA
11 RAM READ end from VGA
You plug sequencer(1) on z80 clock and sequencer(0) on VGA... put another problem : VGA use 25MHz speed for scanning RAM. so Z80 have to use same speed yeah.
To solve this problem you can use a special RAM done for this problem, a RAM that you can WRITE at a certain speed, and READ at another speed, this magic component is called '''ramb16_s16_s16'''. Note that they have no problem to write simultaneously on two RAM component, so that you can dump video RAM contain using starter kit RAM, and you can display VGA using FPGA internal ramb16_s16_s16 RAM.
=== Bootloader ===