From: <sba...@us...> - 2023-07-19 17:46:28
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch patches-142-currah-uspeech in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/327688086c344d382dec20c8a96c7da3f9e852ad/ commit 327688086c344d382dec20c8a96c7da3f9e852ad Author: Vic Chwe <ch...@us...> AuthorDate: Wed Jul 19 18:52:13 2023 +0200 Enhanced Currah uSpeech paging logic: - Memory read/write at 0x38 should page the ROM in/out - ROM is mapped to the first 4 Kb only Thanks to Tim Busse tests tape. Now Booty launches the hidden "diving" game. --- memory_pages.c | 12 +++++++++--- peripherals/sound/uspeech.c | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/memory_pages.c b/memory_pages.c index c2f51c20..e1e638aa 100644 --- a/memory_pages.c +++ b/memory_pages.c @@ -406,8 +406,12 @@ readbyte( libspectrum_word address ) if( ttx2000s_paged && address >= 0x2000 ) return ttx2000s_sram_read( address ); - if( uspeech_available && address == 0x1000 ) - return uspeech_busy(); + if( uspeech_available ) { + if( address == 0x0038 ) + uspeech_toggle(); /* and return whatever is the "normal" value later */ + else if( uspeech_active && ( address == 0x1000 ) ) + return uspeech_busy(); + } } return mapping->page[ address & MEMORY_PAGE_SIZE_MASK ]; @@ -521,7 +525,9 @@ writebyte_internal( libspectrum_word address, libspectrum_byte b ) memory[ offset ] = b; } else if( uspeech_available ) { - if( address == 0x1000 || ( address & 0xfffe ) == 0x3000 ) { + if( address == 0x0038 ) + uspeech_toggle(); + else if( uspeech_active && ( address == 0x1000 || ( address & 0xfffe ) == 0x3000 ) ) { uspeech_write( address, b ); } } diff --git a/peripherals/sound/uspeech.c b/peripherals/sound/uspeech.c index f10b26f1..9f334487 100644 --- a/peripherals/sound/uspeech.c +++ b/peripherals/sound/uspeech.c @@ -224,14 +224,19 @@ uspeech_memory_map( void ) { if( !uspeech_active ) return; + /* https://maziac.github.io/currah_uspeech_tests/ + says only the lower 4k should be mapped + "mem holes test" yields strange results, though */ memory_map_romcs_2k( 0x0000, uspeech_memory_map_romcs ); memory_map_romcs_2k( 0x0800, uspeech_memory_map_romcs ); + /* memory_map_romcs_2k( 0x1000, uspeech_memory_map_romcs ); memory_map_romcs_2k( 0x1800, uspeech_memory_map_romcs ); memory_map_romcs_2k( 0x2000, uspeech_memory_map_romcs ); memory_map_romcs_2k( 0x2800, uspeech_memory_map_romcs ); memory_map_romcs_2k( 0x3000, uspeech_memory_map_romcs ); memory_map_romcs_2k( 0x3800, uspeech_memory_map_romcs ); + */ } static libspectrum_byte |