kopia lustrzana https://github.com/Jean-MarcHarvengt/MCUME
headless zx working
rodzic
464a0e5d3a
commit
b96f70bfa0
|
@ -0,0 +1,4 @@
|
|||
build
|
||||
pico-sdk*
|
||||
spectrum-roms*
|
||||
*.inl
|
|
@ -311,7 +311,7 @@ set(TESTPSRAM_SOURCES
|
|||
add_executable(mcume
|
||||
# ${GFXENGINE_SOURCES}
|
||||
# ${PICO20_SOURCES}
|
||||
${PICO64_SOURCES}
|
||||
# ${PICO64_SOURCES}
|
||||
# ${PICO81_SOURCES}
|
||||
# ${PICO800_SOURCES}
|
||||
# ${PICO5200_SOURCES}
|
||||
|
@ -319,7 +319,7 @@ add_executable(mcume
|
|||
# ${PICOCOLEM_SOURCES}
|
||||
# ${PICOO2EM_SOURCES}
|
||||
# ${PICOVCS_SOURCES}
|
||||
# ${PICOSPECCY_SOURCES}
|
||||
${PICOSPECCY_SOURCES}
|
||||
# ${PICONOFRENDO_SOURCES}
|
||||
# ${PICOSND_SOURCES}
|
||||
# ${TESTIO_SOURCES}
|
||||
|
@ -329,7 +329,7 @@ add_executable(mcume
|
|||
# ${PICOVALIDATION_SOURCES}
|
||||
# ${PSRAM_SOURCES}
|
||||
# ${VGA_T4_SOURCES}
|
||||
${PICOVGA_T4_SOURCES}
|
||||
# ${PICOVGA_T4_SOURCES}
|
||||
${TFT_T_SOURCES}
|
||||
)
|
||||
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
// PICOMPUTER has support for TFT+keymatrix+Sound
|
||||
|
||||
|
||||
//#define PICOMPUTER 1
|
||||
#define PICOMPUTER 1
|
||||
//#define PICOMPUTERMAX 1
|
||||
//#define PICORETROVGA 1
|
||||
//#define MCUME_REV1 1
|
||||
#define MCUME_REV2 1
|
||||
//#define MCUME_REV2 1
|
||||
|
||||
#ifdef PICOMPUTER
|
||||
//#define SWAP_ALT_DEL 1
|
||||
#define ST7789 1
|
||||
#define LOHRES 1
|
||||
//#define LOHRES 1
|
||||
#define FLIP_SCREEN 1
|
||||
#define INVX 1
|
||||
#define HAS_SND 1
|
||||
|
|
|
@ -54,6 +54,16 @@ int main(void) {
|
|||
tft.begin();
|
||||
#endif
|
||||
emu_init();
|
||||
|
||||
// in adbsence of keyboard/sd card load the default rom
|
||||
toggleMenu(false);
|
||||
emu_start();
|
||||
emu_Init(nullptr);
|
||||
tft.fillScreenNoDma( RGBVAL16(0x00,0x00,0x00) );
|
||||
tft.startDMA();
|
||||
struct repeating_timer timer;
|
||||
add_repeating_timer_ms(5, repeating_timer_callback, NULL, &timer);
|
||||
|
||||
while (true) {
|
||||
if (menuActive()) {
|
||||
uint16_t bClick = emu_DebounceLocalKeys();
|
||||
|
|
|
@ -245,6 +245,12 @@ void emu_KeyboardOnUp(int keymodifer, int key) {
|
|||
}
|
||||
|
||||
void spec_Start(char * filename) {
|
||||
|
||||
if (!filename) {
|
||||
#include "zxspectrum48rom.inl" // defines
|
||||
ZX_ReadFromFlash_Z80(&myCPU, zxspectrum48rom, sizeof(zxspectrum48_rom) / sizeof(unsigned char));
|
||||
}
|
||||
|
||||
memset(Z80_RAM, 0, 0xC000);
|
||||
if ( (endsWith(filename, "SNA")) || (endsWith(filename, "sna")) ) {
|
||||
ZX_ReadFromFlash_SNA(&myCPU, filename);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# loads a zx rom and dumps it into a C array
|
||||
|
||||
rom_file = "spectrum-roms/48.rom"
|
||||
name = "zxspectrum48rom"
|
||||
code_file = f"MCUME_pico/picospeccy/{name}.inl"
|
||||
|
||||
with open(rom_file, "rb") as ifd, open(code_file, "w") as ofd:
|
||||
rom = [str(b) for b in ifd.read()]
|
||||
#print(int.from_bytes(rom[0], "little"))
|
||||
ofd.write(f"unsigned char {name}[] = {{{','.join(rom)}}};\n")
|
Ładowanie…
Reference in New Issue