Skip to content

Commit 0646b50

Browse files
authored
Add files via upload
1 parent 37483b5 commit 0646b50

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

crt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ void readCRTFile( CLogger *logger, CRT_HEADER *crtHeader, const char *DRIVE, con
150150
if ( result != FR_OK )
151151
logger->Write( "RaspiFlash", LogPanic, "Cannot open file: %s", FILENAME );
152152

153-
if ( filesize > 1025 * 1024 )
154-
filesize = 1025 * 1024;
153+
if ( filesize > 1032 * 1024 )
154+
filesize = 1032 * 1024;
155155

156156
// read data in one big chunk
157157
u32 nBytesRead;
158-
u8 rawCRT[ 1025 * 1024 ];
158+
u8 rawCRT[ 1032 * 1024 ];
159159
result = f_read( &file, rawCRT, filesize, &nBytesRead );
160160

161161
if ( result != FR_OK )

kernel_ef.cpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ typedef struct
114114
static unsigned char kernalROM[ 8192 ] AAA;
115115

116116
// ... flash
117-
u8 flash_cacheoptimized_pool[ 1024 * 1024 + 1024 ] AAA;
117+
u8 flash_cacheoptimized_pool[ 1024 * 1024 + 8 * 1024 ] AAA;
118118

119119
static volatile EFSTATE ef AAA;
120120

@@ -315,7 +315,7 @@ void initEF()
315315
}
316316
if ( ef.bankswitchType == BS_MAGICDESK )
317317
{
318-
ef.reg2 = 4 + 2;
318+
ef.reg2 = 128 + 4 + 2;
319319
}
320320

321321
ef.flashBank = &ef.flash_cacheoptimized[ ef.reg0 * 8192 * 2 ];
@@ -1717,9 +1717,18 @@ void CKernelEF::FIQHandler (void *pParam)
17171717
} else
17181718
{
17191719
// Magic Desk
1720-
if ( ef.nBanks <= 64 )
1721-
ef.reg0 = (u8)( D & 63 ); else
1722-
ef.reg0 = (u8)( D & 127 );
1720+
if( GET_IO12_ADDRESS == 0 )
1721+
{
1722+
if ( !( D & 128 ) )
1723+
{
1724+
if ( ef.nBanks <= 64 )
1725+
ef.reg0 = (u8)( D & 63 ); else
1726+
ef.reg0 = (u8)( D & 127 );
1727+
ef.reg2 = 128 + 4 + 2;
1728+
} else
1729+
ef.reg2 = 4 + 0;
1730+
}
1731+
17231732
ef.flashBank = &ef.flash_cacheoptimized[ ef.reg0 * 8192 ];
17241733

17251734
// if the EF-ROM does not fit into the RPi's cache: stall the CPU with a DMA and prefetch the data
@@ -1731,18 +1740,14 @@ void CKernelEF::FIQHandler (void *pParam)
17311740
prefetchHeuristic();
17321741
}
17331742

1734-
if ( !(D & 128) )
1735-
ef.reg2 = 128 + 4 + 2; else
1736-
ef.reg2 = 4 + 0;
1737-
17381743
setGAMEEXROM();
17391744
}
17401745

17411746
setLatchFIQ( LED_IO1 );
17421747
goto cleanup;
17431748
}
17441749

1745-
if ( CPU_WRITES_TO_BUS && IO2_ACCESS )
1750+
if ( CPU_WRITES_TO_BUS && IO2_ACCESS && ef.bankswitchType == BS_EASYFLASH )
17461751
{
17471752
READ_D0to7_FROM_BUS( D )
17481753
ef.ram[ GET_IO12_ADDRESS ] = D;

lowlevel_arm64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern u32 hasSIDKick;
5252
extern u32 machine264;
5353

5454
// #cycles the C64 is delayed for prefetching data (a little bit less should be OK)
55-
#define NUM_DMA_CYCLES (2)
55+
#define NUM_DMA_CYCLES (10)
5656

5757

5858
#define PMCCFILTR_NSH_EN_BIT 27

0 commit comments

Comments
 (0)