From cff43102f8b21de1ae4b9ac04486fa4f6f8eb33c Mon Sep 17 00:00:00 2001 From: nretro Date: Thu, 9 May 2019 01:43:59 +0200 Subject: [PATCH 1/2] support upload of A1000 bootrom --- menu.cpp | 2 +- support/minimig/minimig_boot.h | 3 +++ support/minimig/minimig_config.cpp | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/menu.cpp b/menu.cpp index e9cf31b..a37b490 100644 --- a/menu.cpp +++ b/menu.cpp @@ -196,7 +196,7 @@ const char *helptexts[] = " Welcome to MiSTer! Use the cursor keys to navigate the menus. Use space bar or enter to select an item. Press Esc or F12 to exit the menus. Joystick emulation on the numeric keypad can be toggled with the numlock or scrlock key, while pressing Ctrl-Alt-0 (numeric keypad) toggles autofire mode.", " Minimig can emulate an A600/A1200 IDE harddisk interface. The emulation can make use of Minimig-style hardfiles (complete disk images) or UAE-style hardfiles (filesystem images with no partition table).", " Minimig's processor core can emulate a 68000 or 68020 processor (though the 68020 mode is still experimental.) If you're running software built for 68000, there's no advantage to using the 68020 mode, since the 68000 emulation runs just as fast.", - " Minimig can make use of up to 2 megabytes of Chip RAM, up to 1.5 megabytes of Slow RAM (A500 Trapdoor RAM), and up to 24 megabytes of true Fast RAM. To use the HRTmon feature you will need a file on the SD card named hrtmon.rom. HRTMon is not compatible with Fast RAM.", + " Minimig can make use of up to 2 megabytes of Chip RAM, up to 1.5 megabytes of Slow RAM (A500 Trapdoor RAM), and up to 24 megabytes of true Fast RAM. To use the HRTmon feature you will need a file on the SD card named hrtmon.rom.", " Minimig's video features include a blur filter, to simulate the poorer picture quality on older monitors, and also scanline generation to simulate the appearance of a screen with low vertical resolution.", 0 }; diff --git a/support/minimig/minimig_boot.h b/support/minimig/minimig_boot.h index e2ab0d9..b872a3c 100644 --- a/support/minimig/minimig_boot.h +++ b/support/minimig/minimig_boot.h @@ -39,6 +39,9 @@ void BootInit(); void BootPrintEx(const char * str); void BootHome(); + + + #define BootPrint(text) printf("%s\n", text) #endif // __BOOT_H__ diff --git a/support/minimig/minimig_config.cpp b/support/minimig/minimig_config.cpp index d572879..286d4bb 100644 --- a/support/minimig/minimig_config.cpp +++ b/support/minimig/minimig_config.cpp @@ -83,6 +83,7 @@ static void SendFileV2(fileTYPE* file, unsigned char* key, int keysize, int addr printf("]\n"); } + static char UploadKickstart(char *name) { @@ -115,6 +116,28 @@ static char UploadKickstart(char *name) FileClose(&file); return(1); } + else if (file.size == 8203) { + // Cloanto encrypted A1000 boot ROM + BootPrint("Uploading encrypted A1000 boot ROM"); + SendFileV2(&file, romkey, keysize, 0xf80000, file.size >> 9); + FileClose(&file); + //clear tag (write 0 to $fc0000) to force bootrom to load Kickstart from disk + //and not use one which was already there. + spi_osd_cmd32le_cont(OSD_CMD_WR, 0xfc0000); + spi8(0x00);spi8(0x00); + DisableOsd(); + return(1); + } + else if (file.size == 0x2000) { + // 8KB A1000 boot ROM + BootPrint("Uploading A1000 boot ROM"); + SendFileV2(&file, NULL, 0, 0xf80000, file.size >> 9); + FileClose(&file); + spi_osd_cmd32le_cont(OSD_CMD_WR, 0xfc0000); + spi8(0x00);spi8(0x00); + DisableOsd(); + return(1); + } else if (file.size == 0x80000) { // 512KB Kickstart ROM BootPrint("Uploading 512KB Kickstart ..."); From 68191fc1c5c204444321d2a1b1aaea6644738286 Mon Sep 17 00:00:00 2001 From: nretro Date: Thu, 9 May 2019 02:06:26 +0200 Subject: [PATCH 2/2] whitespaces --- support/minimig/minimig_boot.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/support/minimig/minimig_boot.h b/support/minimig/minimig_boot.h index b872a3c..e2ab0d9 100644 --- a/support/minimig/minimig_boot.h +++ b/support/minimig/minimig_boot.h @@ -39,9 +39,6 @@ void BootInit(); void BootPrintEx(const char * str); void BootHome(); - - - #define BootPrint(text) printf("%s\n", text) #endif // __BOOT_H__