Closed gabrielsroka closed 1 month ago
using the p5.js console to edit FLASH
to switch y and z and fix other ones worked :)
EDIT: needs Y and Z in additon to y and z :)
or you can add them to function setup()
// added
FLASH[0x1a1a] = 'z'.charCodeAt()
FLASH[0x1a35] = 'y'.charCodeAt()
FLASH[0x1a1e + 0x80] = '@'.charCodeAt()
FLASH[0x1a26 + 0x80] = '#'.charCodeAt()
FLASH[0x1a36 + 0x80] = '^'.charCodeAt()
FLASH[0x1a3d + 0x80] = '&'.charCodeAt()
FLASH[0x1a3e + 0x80] = '*'.charCodeAt()
FLASH[0x1a41 + 0x80] = '<'.charCodeAt()
FLASH[0x1a45 + 0x80] = ')'.charCodeAt()
FLASH[0x1a46 + 0x80] = '('.charCodeAt()
FLASH[0x1a49 + 0x80] = '>'.charCodeAt()
FLASH[0x1a4c] = ';'.charCodeAt()
FLASH[0x1a4c + 0x80] = ':'.charCodeAt()
FLASH[0x1a4e] = '/'.charCodeAt()
FLASH[0x1a4e + 0x80] = '?'.charCodeAt()
FLASH[0x1a52] = "'".charCodeAt()
FLASH[0x1a52 + 0x80] = '"'.charCodeAt()
FLASH[0x1a54] = '['.charCodeAt()
FLASH[0x1a54 + 0x80] = '{'.charCodeAt()
FLASH[0x1a55] = '='.charCodeAt()
FLASH[0x1a55 + 0x80] = '+'.charCodeAt()
FLASH[0x1a5b] = ']'.charCodeAt()
FLASH[0x1a5b + 0x80] = '}'.charCodeAt()
FLASH[0x1a5d] = '\\'.charCodeAt()
FLASH[0x1a5d + 0x80] = '|'.charCodeAt()
i also modified keyPressed
if (keyCode == 113) { // F2: uart.txt as serial input
loadBytes("uart.txt?" + Math.random(), uartbin => {
uartBuffer = Array.from(uartbin.bytes);
});
}
u can modify uart.txt, save it, then press F2 to send the latest version. random
is for cache busting.
online emulator -> main.js ->
ps2ScanCodes
on US keyboard,i had to make a few changes (i think i got most of it working).
how are you mapping keyCodes (from German) into ASCII?
i'm using https://techdocs.altium.com/display/FPGA/PS2+Keyboard+Scan+Codes but i'm not sure it's right.
i guess it's difference between https://github.com/slu4coder/Minimal-64x4-Home-Computer/blob/main/Programs/asm/keyboard_de.asm and https://github.com/slu4coder/Minimal-64x4-Home-Computer/blob/main/Programs/asm/keyboard_us.asm