1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-04-26 04:17:40 +00:00

Merge Amiga Forever ROM key with the sector buffer

This commit is contained in:
Gyorgy Szombathelyi
2021-08-24 23:32:58 +02:00
parent 9193f06134
commit 77b4d41ee4
4 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,6 @@
#include "errors.h"
#include "hardware.h"
#include "mmc.h"
#include "boot.h"
#include "fat_compat.h"
#include "ini_parser.h"
@@ -25,7 +24,7 @@ static configTYPE tmpconf;
extern char s[FF_LFN_BUF + 1];
static char configfilename[13];
char DebugMode=0;
static unsigned char romkey[3072];
static unsigned char *romkey = (sector_buffer + 512);
static const ini_section_t config_ini_sections[] = {
{1, "MINIMIG"}
@@ -105,7 +104,7 @@ char UploadKickstart(char *name)
BootPrint("Checking for Amiga Forever key file:");
if(FileOpenCompat(&keyfile,"ROM KEY", FA_READ) == FR_OK) {
keysize=f_size(&keyfile);
if(keysize<sizeof(romkey)) {
if(keysize<(SECTOR_BUFFER_SIZE-512)) {
f_read(&keyfile, romkey, keysize, &br);
BootPrint("Loaded Amiga Forever key file");
} else {

View File

@@ -74,7 +74,7 @@ static void data_io_file_tx_send(FIL *file) {
while(bytes2send) {
iprintf(".");
unsigned short c, chunk = (bytes2send>2048)?2048:bytes2send;
unsigned short c, chunk = (bytes2send>(SECTOR_BUFFER_SIZE/512))?(SECTOR_BUFFER_SIZE/512):bytes2send;
char *p;
if (rom_direct_upload) {

View File

@@ -6,7 +6,6 @@
#include "FatFs/ff.h"
#define MAXDIRENTRIES 8
#define SECTOR_BUFFER_SIZE 2352
struct PartitionEntry
{

View File

@@ -83,6 +83,8 @@
#define VIDEO_SD_DISABLE_VAR (*(uint8_t*)0x0020FF15)
#define VIDEO_YPBPR_VAR (*(uint8_t*)0x0020FF16)
#define SECTOR_BUFFER_SIZE 4096
char mmc_inserted(void);
void USART_Init(unsigned long baudrate);
void USART_Write(unsigned char c);