This commit is contained in:
Polprzewodnikowy 2022-01-02 09:46:57 +01:00
parent 0d86cea760
commit cbe31306f7
5 changed files with 99 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
**/.DS_Store **/.DS_Store
**/.vscode **/.vscode/settings.json
**/*.bak **/*.bak
**/*.zip **/*.zip

58
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,58 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Build SW and Update",
"type": "python",
"request": "launch",
"program": "sw/pc/sc64.py",
"preLaunchTask": "build",
"args": [
"-u", "fw/output_files/SC64_update.bin",
]
},
{
"name": "Build FW & SW and Update",
"type": "python",
"request": "launch",
"program": "sw/pc/sc64.py",
"preLaunchTask": "build_full",
"args": [
"-u", "fw/output_files/SC64_update.bin",
]
},
{
"name": "Run menu from SD with debug output",
"type": "python",
"request": "launch",
"program": "sw/pc/sc64.py",
"args": [
"-b", "0",
"-q",
]
},
{
"name": "Run menu from USB with debug output",
"type": "python",
"request": "launch",
"program": "sw/pc/sc64.py",
"console": "integratedTerminal",
"linux": {
"args": [
"-f", "/dev/ttyUSB0",
"-b", "3",
"-q",
"sw/n64/build/n64boot.bin",
]
},
"windows": {
"args": [
"-f", "\\\\.\\D:",
"-b", "3",
"-q",
"sw/n64/build/n64boot.bin",
]
}
},
]
}

35
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,35 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "./docker_build.sh update -s -c -d",
"windows":{
"command": "wsl -- ./docker_build.sh update -s -c -d"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "build_full",
"type": "shell",
"command": "./docker_build.sh release -c -d",
"windows": {
"command": "wsl -- ./docker_build.sh update -c -d"
},
"group": "build"
},
{
"label": "build_n64_bootloader",
"type": "shell",
"command": "./docker_build.sh n64 -d",
"windows": {
"command": "wsl -- ./docker_build.sh n64 -d"
},
"group": "build"
}
]
}

View File

@ -30,7 +30,7 @@ void main (void) {
break; break;
case BOOT_MODE_DIRECT: case BOOT_MODE_DIRECT:
LOG_I("Running bootloader from SDRAM - running menu from FSD\r\n"); LOG_I("Running menu from USB\r\n");
storage_run_menu(STORAGE_BACKEND_USB, &boot_info, &sc64_info); storage_run_menu(STORAGE_BACKEND_USB, &boot_info, &sc64_info);
break; break;

View File

@ -590,7 +590,7 @@ class SC64:
if (self.__disk_file): if (self.__disk_file):
self.__disk_file.seek(disk_file_offset) self.__disk_file.seek(disk_file_offset)
if (transfer_mode): if (transfer_mode):
time.sleep(0.01) # Fixes weird bug in Mario Artist Paint Studio minigame time.sleep(0.016) # Fixes weird bug in Mario Artist Paint Studio minigame
self.__write_cmd("S", sdram_offset, block_length) self.__write_cmd("S", sdram_offset, block_length)
self.__write(self.__disk_file.read(block_length)) self.__write(self.__disk_file.read(block_length))
else: else:
@ -821,6 +821,9 @@ if __name__ == "__main__":
sc64.upload_save(save_file) sc64.upload_save(save_file)
if (debug_server): if (debug_server):
sc64.debug_init(sd_file, disk_file, is_viewer_enabled)
if (is_viewer_enabled):
print(f"Setting IS-Viewer 64 emulation to [Enabled]")
if (sd_file): if (sd_file):
print(f"Using fake SD emulation file [{sd_file}]") print(f"Using fake SD emulation file [{sd_file}]")
if (disk_file): if (disk_file):
@ -828,9 +831,6 @@ if __name__ == "__main__":
sc64.set_dd_configuration_for_disk(disk_file) sc64.set_dd_configuration_for_disk(disk_file)
print(f"Setting 64DD disk state to [Changed]") print(f"Setting 64DD disk state to [Changed]")
sc64.set_dd_disk_state("changed" if disk_file else "ejected") sc64.set_dd_disk_state("changed" if disk_file else "ejected")
if (is_viewer_enabled):
print(f"Setting IS-Viewer 64 emulation to [Enabled]")
sc64.debug_init(sd_file, disk_file, is_viewer_enabled)
sc64.debug_loop() sc64.debug_loop()
except SC64Exception as e: except SC64Exception as e: