Massive commit with bunch of random junk..
Added windows driver package, just have to run InstallDriver.exe to get drivers installed on windows 10 (and others I believe) Created dictionaries for all remaining cart connectors. Nothing useful there yet, just wanted to get the files created and dictionaries working. Added bunch of notes to shared_dictionaries to explain how to go about creating new dictionaries and some opcode details. Have STM8 cic communications working "CICCOM" to change between H/V mirroring on new discrete boards. Currently these operations are handled entirely from the host scripts and opcode/operands are mostly hard coded. Need to move these to more generic functions in the ciccom dictionary which will also speed things up moving to the firmware which will speed things up. Some changes to mapper 30 script to eat the ines header, and test CHR-RAM banking. Some updates to snes flashing operations, still a work in progress to fully support prior SNES board designs.
This commit is contained in:
parent
9c57f1bdb3
commit
88a2d30858
|
|
@ -0,0 +1,4 @@
|
||||||
|
Paul's list of needed code updates and cleanups:
|
||||||
|
|
||||||
|
- Create generic host/scripts/app/dict.lua function that new dictionaries
|
||||||
|
can use until the point where they need custom transfer functions
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,6 @@
|
||||||
|
;!@Install@!UTF-8!
|
||||||
|
RunProgram="dpscat.exe"
|
||||||
|
RunProgram="x86:dpinst32.exe"
|
||||||
|
RunProgram="x64:dpinst64.exe"
|
||||||
|
GUIMode="2"
|
||||||
|
;!@InstallEnd@!
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,64 @@
|
||||||
|
/* Auto-generated By libusbK InfWizard
|
||||||
|
*
|
||||||
|
* DEVICE DRIVER CLIENT INSTALLER By Travis Lee Robinson (libusbdotnet@gmail.com)
|
||||||
|
*
|
||||||
|
* Summary:
|
||||||
|
* - libusbK client installers combine proven LZMA sfx technology with a professional driver installation tool
|
||||||
|
* creating a tightly packed and feature rich solution for end-user driver installations.
|
||||||
|
*
|
||||||
|
* FACTS:
|
||||||
|
* - Packaged in a modified LZMA sfx module. See: http://7zsfx.info/en. This module is highly configurable
|
||||||
|
* with installer-like options.
|
||||||
|
* - Uses dpinst.exe, by Microsoft. Dpinst.exe is a robust multi-language driver installation utility. This
|
||||||
|
* utility has a set of configurable wizard screens to ease end-user installations. Features also include:
|
||||||
|
* - Install multiple .inf files at once, each can contain multiple devices with multiple hardware
|
||||||
|
* identifiers.
|
||||||
|
* - Uninstall via add/remove programs. (removes from driver-store)
|
||||||
|
* - Silent/wizardless operation modes.
|
||||||
|
* - Simplistic xml-based configuration. (dpinst.xml)
|
||||||
|
* - Customizable EULA.
|
||||||
|
* - For a complete list of dpinst.exe features see:
|
||||||
|
* http://msdn.microsoft.com/en-us/library/windows/hardware/ff553383%28v=vs.85%29.aspx
|
||||||
|
*
|
||||||
|
* ORDER OF OPERATIONS (InstallDriver.exe - default config):
|
||||||
|
* -# End-user launches InstallDriver.exe. If not already running with elevated permssions, the user will
|
||||||
|
* immediately be prompted with a UAC warning:
|
||||||
|
* http://msdn.microsoft.com/en-us/library/windows/desktop/aa511445.aspx If you do not sign
|
||||||
|
* InstallDriver.exe with a code signing certificate, the UAC prompt will display "Unknown Name" and
|
||||||
|
* "Unknown Publisher" in the message box. Purchasing a cheap code signing certificate will allow you to
|
||||||
|
* set these values.
|
||||||
|
* -# SFX module:Extracts driver setup files to a temporary folder.
|
||||||
|
* -# SFX module:Runs dpscat.exe. This utility creates self signed catalog files from .inf files and the
|
||||||
|
* binaries they reference. These signed catalog files prevent windows from prompting the user with an
|
||||||
|
* unverified publisher warning: http://www.codeproject.com/KB/system/wiisensor/wiisensor10.png
|
||||||
|
* -# SFX module:Runs dpinst.exe. Device drivers are pre-installed. If the device has not been connected it
|
||||||
|
* will be available for use upon first connection. All devices known to windows matching your hardware IDs
|
||||||
|
* will be flagged for re-install. If the device is currently connected, drivers are immediately installed,
|
||||||
|
* the device is retarted and available immediately.
|
||||||
|
* -# SFX module:On wizard exit, removes the temporary extraction folder.
|
||||||
|
*
|
||||||
|
* ORDER OF OPERATIONS (re-pack-files.cmd - default config):
|
||||||
|
* -# The following files are compressed into a normal LZMA .7z file.
|
||||||
|
* - All ".inf" files in the current folder
|
||||||
|
* - All files and folders starting with "dpinst" in the current folder.
|
||||||
|
* - All files matching "dpscat.*" in the current folder.
|
||||||
|
* - All files and folders in the x86, amd64, and data sub-folders. (recursive)
|
||||||
|
* -# The SFX module, SFX config file and .7z file are merged together using a binary copy.
|
||||||
|
* eg: COPY /B sfx_module+sfx_config+files.7z installer.exe
|
||||||
|
*
|
||||||
|
* \note Run the "re-pack-files.cmd" batch file after modifying any part of the package.
|
||||||
|
*
|
||||||
|
* CUSTOMIZATION:
|
||||||
|
* - Customizing the SFX Module:
|
||||||
|
* - SFX customization is done in the "7zDP_LZMA.cfg" file.
|
||||||
|
* - See http://7zsfx.info/en/
|
||||||
|
* - Customizing the driver installation:
|
||||||
|
* - dpinst.exe customization is done in the "dpinst.xml" file.
|
||||||
|
* - See http://msdn.microsoft.com/en-us/library/windows/hardware/ff553383%28v=vs.85%29.aspx
|
||||||
|
* - Other customization:
|
||||||
|
* - .inf file can be hand modified as needed.
|
||||||
|
* - Files can be added or removed as needed.
|
||||||
|
* - Icon and resource text can be changed with a standard resource editor such as ResourcHacker:
|
||||||
|
* http://www.angusj.com/resourcehacker/
|
||||||
|
*
|
||||||
|
*/
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!--
|
||||||
|
Summary of the DPInst XML Elements:
|
||||||
|
http://msdn.microsoft.com/en-us/library/windows/hardware/ff553383%28v=vs.85%29.aspx
|
||||||
|
|
||||||
|
Enabling Language Customization:
|
||||||
|
http://msdn.microsoft.com/en-us/library/windows/hardware/ff544886%28v=vs.85%29.aspx
|
||||||
|
|
||||||
|
Customizing the Items That Appear on the Wizard Pages:
|
||||||
|
http://msdn.microsoft.com/en-us/library/windows/hardware/ff540265%28v=vs.85%29.aspx
|
||||||
|
|
||||||
|
Dpinst.xml Example:
|
||||||
|
http://msdn.microsoft.com/en-us/library/windows/hardware/ff544778%28v=vs.85%29.aspx
|
||||||
|
-->
|
||||||
|
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<dpinst>
|
||||||
|
<forceIfDriverIsNotBetter>1</forceIfDriverIsNotBetter>
|
||||||
|
<installAllOrNone>1</installAllOrNone>
|
||||||
|
</dpinst>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,67 @@
|
||||||
|
@ECHO OFF
|
||||||
|
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
|
SET FILES_TO_PACK=*.inf dpinst* dpscat.* .\data* .\x86* .\amd64*
|
||||||
|
SET SFX_MODULE=7zDP_LZMA.sfx
|
||||||
|
SET SFX_MODULE_CFG=7zDP_LZMA.cfg
|
||||||
|
SET INSTALL_DRIVER_EXE=InstallDriver.exe
|
||||||
|
SET DRIVER_FILES_7Z=_DriverFiles.7z
|
||||||
|
SET 7Z_SWITCHES=-air0 -mx
|
||||||
|
|
||||||
|
SET CMD_EXIT_CODE=0
|
||||||
|
|
||||||
|
IF EXIST "!7ZA_EXE!" (SET 7Z_RUN="!7ZA_EXE!") ELSE CALL :Find7Zip 7z.exe 7za.exe 7zan.exe
|
||||||
|
IF !7Z_RUN! EQU "" (
|
||||||
|
ECHO 7Zip is required to re-pack this installer.
|
||||||
|
ECHO 1] Download and install 7Zip. http://www.7-zip.org/
|
||||||
|
ECHO 2] Add the bin folder to the PATH environment variable.
|
||||||
|
ECHO "Control Panel->System->Advanced->Environment Variables..."
|
||||||
|
SET CMD_EXIT_CODE=1
|
||||||
|
GOTO Error
|
||||||
|
)
|
||||||
|
|
||||||
|
IF EXIST "!INSTALL_DRIVER_EXE!" DEL /Q "!INSTALL_DRIVER_EXE!"
|
||||||
|
IF NOT "!ERRORLEVEL!" EQU "0" (
|
||||||
|
ECHO Access denied or file in-use "!INSTALL_DRIVER_EXE!"
|
||||||
|
SET CMD_EXIT_CODE=2
|
||||||
|
GOTO Error
|
||||||
|
)
|
||||||
|
|
||||||
|
IF EXIST "!DRIVER_FILES_7Z!" DEL /Q "!DRIVER_FILES_7Z!"
|
||||||
|
IF NOT "!ERRORLEVEL!" EQU "0" (
|
||||||
|
ECHO Access denied or file in-use "!DRIVER_FILES_7Z!"
|
||||||
|
SET CMD_EXIT_CODE=3
|
||||||
|
GOTO Error
|
||||||
|
)
|
||||||
|
|
||||||
|
!7Z_RUN! a "!DRIVER_FILES_7Z!" !FILES_TO_PACK! !7Z_SWITCHES!
|
||||||
|
IF NOT "!ERRORLEVEL!" EQU "0" (
|
||||||
|
ECHO Failed re-packing. Check your 7Zip installation at
|
||||||
|
ECHO !7Z_RUN!
|
||||||
|
SET CMD_EXIT_CODE=4
|
||||||
|
GOTO Error
|
||||||
|
)
|
||||||
|
|
||||||
|
COPY /B "!SFX_MODULE!"+"!SFX_MODULE_CFG!"+"!DRIVER_FILES_7Z!" "!INSTALL_DRIVER_EXE!"
|
||||||
|
|
||||||
|
ECHO.
|
||||||
|
ECHO Done.
|
||||||
|
ECHO "!INSTALL_DRIVER_EXE!" re-packed!
|
||||||
|
GOTO :EOF
|
||||||
|
|
||||||
|
:Find7Zip
|
||||||
|
SET 7Z_RUN="%~$PATH:1"
|
||||||
|
IF NOT !7Z_RUN! EQU "" (
|
||||||
|
ECHO 7Zip found at: !7Z_RUN!
|
||||||
|
SET 7Z_RUN="%~1"
|
||||||
|
GOTO :EOF
|
||||||
|
)
|
||||||
|
SHIFT /1
|
||||||
|
IF "%~1" EQU "" GOTO :EOF
|
||||||
|
GOTO Find7Zip
|
||||||
|
GOTO :EOF
|
||||||
|
|
||||||
|
:Error
|
||||||
|
IF NOT DEFINED NO_REPACK_ERROR_WAIT PAUSE
|
||||||
|
EXIT %CMD_EXIT_CODE%
|
||||||
|
GOTO :EOF
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
||||||
Archive member included to satisfy reference by file (symbol)
|
Archive member included to satisfy reference by file (symbol)
|
||||||
|
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
||||||
C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o (__aeabi_unwind_cpp_pr0)
|
C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o (__aeabi_unwind_cpp_pr0)
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(libunwind.o)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(libunwind.o)
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o) (restore_core_regs)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o) (restore_core_regs)
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
||||||
|
|
@ -51,11 +51,11 @@ c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o) (_exit)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o) (_exit)
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
|
||||||
C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o (__gnu_thumb1_case_uqi)
|
C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o (__gnu_thumb1_case_uqi)
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_shi.o)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_shi.o)
|
||||||
C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o (__gnu_thumb1_case_shi)
|
C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o (__gnu_thumb1_case_shi)
|
||||||
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
|
c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
|
||||||
C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o (__gnu_thumb1_case_uhi)
|
C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o (__gnu_thumb1_case_uhi)
|
||||||
|
|
||||||
Allocating common symbols
|
Allocating common symbols
|
||||||
Common symbol size file
|
Common symbol size file
|
||||||
|
|
@ -65,6 +65,7 @@ __lock___atexit_recursive_mutex
|
||||||
__lock___arc4random_mutex
|
__lock___arc4random_mutex
|
||||||
0x1 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-lock.o)
|
0x1 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-lock.o)
|
||||||
errno 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
|
errno 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
|
||||||
|
addrh 0x4 source/bootload.o (symbol from plugin)
|
||||||
incoming_bytes_remain
|
incoming_bytes_remain
|
||||||
0x1 source/buffer.o (symbol from plugin)
|
0x1 source/buffer.o (symbol from plugin)
|
||||||
__lock___env_recursive_mutex
|
__lock___env_recursive_mutex
|
||||||
|
|
@ -107,39 +108,48 @@ Discarded input sections
|
||||||
.ARM.exidx 0x00000000 0x8 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
|
.ARM.exidx 0x00000000 0x8 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000000 0x1b c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
|
0x00000000 0x1b c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
|
||||||
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
.text 0x00000000 0x0 source/buffer.o (symbol from plugin)
|
.text 0x00000000 0x0 source/bootload.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.rodata.oper_info
|
.rodata.oper_info
|
||||||
0x00000000 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x00000000 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.text 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
|
.text 0x00000000 0x0 source/buffer.o (symbol from plugin)
|
||||||
|
.text 0x00000000 0x0 source/ciccom.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/dump.o (symbol from plugin)
|
.text 0x00000000 0x0 source/dump.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/flash.o (symbol from plugin)
|
.text 0x00000000 0x0 source/flash.o (symbol from plugin)
|
||||||
|
.text 0x00000000 0x0 source/gameboy.o (symbol from plugin)
|
||||||
|
.text 0x00000000 0x0 source/gba.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/io.o (symbol from plugin)
|
.text 0x00000000 0x0 source/io.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/jtag.o (symbol from plugin)
|
.text 0x00000000 0x0 source/jtag.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/main.o (symbol from plugin)
|
.text 0x00000000 0x0 source/main.o (symbol from plugin)
|
||||||
|
.text 0x00000000 0x0 source/n64.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/nes.o (symbol from plugin)
|
.text 0x00000000 0x0 source/nes.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/operation.o (symbol from plugin)
|
.text 0x00000000 0x0 source/operation.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/pinport.o (symbol from plugin)
|
.text 0x00000000 0x0 source/pinport.o (symbol from plugin)
|
||||||
|
.text 0x00000000 0x0 source/sega.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/snes.o (symbol from plugin)
|
.text 0x00000000 0x0 source/snes.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/swim.o (symbol from plugin)
|
.text 0x00000000 0x0 source/swim.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source/usb.o (symbol from plugin)
|
.text 0x00000000 0x0 source/usb.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source_stm_only/stm_init.o (symbol from plugin)
|
.text 0x00000000 0x0 source_stm_only/stm_init.o (symbol from plugin)
|
||||||
.text 0x00000000 0x0 source_stm_only/usbstm.o (symbol from plugin)
|
.text 0x00000000 0x0 source_stm_only/usbstm.o (symbol from plugin)
|
||||||
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
.ARM.extab 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
.ARM.extab 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
|
.data 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
|
.bss 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
|
.ARM.extab 0x00000000 0x0 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
||||||
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
||||||
.debug_frame 0x00000000 0x2c4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
.debug_frame 0x00000000 0x2c4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
||||||
|
|
@ -405,26 +415,33 @@ Linker script and memory map
|
||||||
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
||||||
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
||||||
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
|
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
|
||||||
LOAD C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
LOAD C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
|
LOAD source/bootload.o
|
||||||
|
LOAD C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
|
LOAD C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
|
LOAD C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
|
LOAD C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
LOAD source/buffer.o
|
LOAD source/buffer.o
|
||||||
LOAD C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
LOAD source/ciccom.o
|
||||||
LOAD C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
|
||||||
LOAD C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
|
||||||
LOAD C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
|
||||||
LOAD source/dump.o
|
LOAD source/dump.o
|
||||||
LOAD source/flash.o
|
LOAD source/flash.o
|
||||||
|
LOAD source/gameboy.o
|
||||||
|
LOAD source/gba.o
|
||||||
LOAD source/io.o
|
LOAD source/io.o
|
||||||
LOAD source/jtag.o
|
LOAD source/jtag.o
|
||||||
LOAD source/main.o
|
LOAD source/main.o
|
||||||
|
LOAD source/n64.o
|
||||||
LOAD source/nes.o
|
LOAD source/nes.o
|
||||||
LOAD source/operation.o
|
LOAD source/operation.o
|
||||||
LOAD source/pinport.o
|
LOAD source/pinport.o
|
||||||
|
LOAD source/sega.o
|
||||||
LOAD source/snes.o
|
LOAD source/snes.o
|
||||||
LOAD source/swim.o
|
LOAD source/swim.o
|
||||||
LOAD source/usb.o
|
LOAD source/usb.o
|
||||||
LOAD source_stm_only/stm_init.o
|
LOAD source_stm_only/stm_init.o
|
||||||
LOAD source_stm_only/usbstm.o
|
LOAD source_stm_only/usbstm.o
|
||||||
LOAD C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
LOAD C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
|
LOAD C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
START GROUP
|
START GROUP
|
||||||
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a
|
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a
|
||||||
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a
|
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a
|
||||||
|
|
@ -438,12 +455,12 @@ END GROUP
|
||||||
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtend.o
|
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtend.o
|
||||||
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtn.o
|
LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtn.o
|
||||||
|
|
||||||
.text 0x08000000 0x462c
|
.text 0x08000000 0x477c
|
||||||
*(.isr_vector)
|
*(.isr_vector)
|
||||||
.isr_vector 0x08000000 0xc0 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.isr_vector 0x08000000 0xc0 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
0x08000000 __isr_vector
|
0x08000000 __isr_vector
|
||||||
*(.text*)
|
*(.text*)
|
||||||
.text 0x080000c0 0x40 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.text 0x080000c0 0x40 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
0x080000c0 Reset_Handler
|
0x080000c0 Reset_Handler
|
||||||
0x080000fc TSC_IRQHandler
|
0x080000fc TSC_IRQHandler
|
||||||
0x080000fc ADC1_COMP_IRQHandler
|
0x080000fc ADC1_COMP_IRQHandler
|
||||||
|
|
@ -483,164 +500,172 @@ LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eab
|
||||||
0x080000fc USART1_IRQHandler
|
0x080000fc USART1_IRQHandler
|
||||||
0x080000fc TIM1_BRK_UP_TRG_COM_IRQHandler
|
0x080000fc TIM1_BRK_UP_TRG_COM_IRQHandler
|
||||||
.text.USB_IRQHandler
|
.text.USB_IRQHandler
|
||||||
0x08000100 0x18bc C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x08000100 0x1970 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x08000100 USB_IRQHandler
|
0x08000100 USB_IRQHandler
|
||||||
.text.pbje_scan
|
.text.pbje_scan
|
||||||
0x080019bc 0x12c C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x08001a70 0x12c C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.text.pbje_state_change
|
.text.pbje_state_change
|
||||||
0x08001ae8 0x98 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x08001b9c 0x98 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.text.get_next_buff
|
.text.get_next_buff
|
||||||
0x08001b80 0x54 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x08001c34 0x54 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.text.jtag_init_pbje
|
.text.jtag_init_pbje
|
||||||
0x08001bd4 0xe0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x08001c88 0xe0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
0x08001bd4 jtag_init_pbje
|
0x08001c88 jtag_init_pbje
|
||||||
.text.jtag_run_pbje.part.0
|
.text.jtag_run_pbje.part.0
|
||||||
0x08001cb4 0xd8 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x08001d68 0xd8 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
0x08001cb4 jtag_run_pbje.part.0
|
0x08001d68 jtag_run_pbje.part.0
|
||||||
.text.io_reset
|
.text.io_reset
|
||||||
0x08001d8c 0x148 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x08001e40 0x148 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
0x08001d8c io_reset
|
0x08001e40 io_reset
|
||||||
.text.startup.main
|
.text.startup.main
|
||||||
0x08001ed4 0xe14 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x08001f88 0xda8 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
0x08001ed4 main
|
0x08001f88 main
|
||||||
.text.append_pairity
|
.text.append_pairity
|
||||||
0x08002ce8 0x1e C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08002d30 0x1e C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
*fill* 0x08002d06 0x2
|
*fill* 0x08002d4e 0x2
|
||||||
.text.nes_cpu_wr
|
.text.nes_cpu_wr
|
||||||
0x08002d08 0x6c C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08002d50 0x6c C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08002d08 nes_cpu_wr
|
0x08002d50 nes_cpu_wr
|
||||||
.text.nes_cpu_rd
|
.text.nes_cpu_rd
|
||||||
0x08002d74 0x40 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08002dbc 0x40 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08002d74 nes_cpu_rd
|
0x08002dbc nes_cpu_rd
|
||||||
|
.text.disc_push_exp0_prgrom_wr
|
||||||
|
0x08002dfc 0x48 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
|
0x08002dfc disc_push_exp0_prgrom_wr
|
||||||
.text.discrete_exp0_prgrom_wr
|
.text.discrete_exp0_prgrom_wr
|
||||||
0x08002db4 0x58 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08002e44 0x58 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08002db4 discrete_exp0_prgrom_wr
|
0x08002e44 discrete_exp0_prgrom_wr
|
||||||
.text.control_xfr_in.lto_priv.33
|
.text.control_xfr_in.lto_priv.39
|
||||||
0x08002e0c 0xbc C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08002e9c 0xbc C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08002e0c control_xfr_in.lto_priv.33
|
0x08002e9c control_xfr_in.lto_priv.39
|
||||||
.text.HardFault_Handler
|
.text.HardFault_Handler
|
||||||
0x08002ec8 0x2 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08002f58 0x2 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08002ec8 HardFault_Handler
|
0x08002f58 HardFault_Handler
|
||||||
*fill* 0x08002eca 0x2
|
*fill* 0x08002f5a 0x2
|
||||||
.text.swim_wotf
|
.text.swim_wotf
|
||||||
0x08002ecc 0xb4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08002f5c 0xb4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08002ecc swim_wotf
|
0x08002f5c swim_wotf
|
||||||
.text.swim_rotf
|
.text.swim_rotf
|
||||||
0x08002f80 0xac C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08003010 0xac C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08002f80 swim_rotf
|
0x08003010 swim_rotf
|
||||||
.text.delay_us
|
.text.delay_us
|
||||||
0x0800302c 0x16 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x080030bc 0x16 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x0800302c delay_us
|
0x080030bc delay_us
|
||||||
*fill* 0x08003042 0x2
|
*fill* 0x080030d2 0x2
|
||||||
.text.snes_rom_wr
|
.text.snes_rom_wr
|
||||||
0x08003044 0x4c C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x080030d4 0x4c C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08003044 snes_rom_wr
|
0x080030d4 snes_rom_wr
|
||||||
.text.snes_rom_rd
|
.text.snes_rom_rd
|
||||||
0x08003090 0x40 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08003120 0x40 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08003090 snes_rom_rd
|
0x08003120 snes_rom_rd
|
||||||
.text.mmc1_wr 0x080030d0 0x38 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.text.mmc1_wr 0x08003160 0x38 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x080030d0 mmc1_wr
|
0x08003160 mmc1_wr
|
||||||
.text.nes_dualport_wr
|
.text.nes_dualport_wr
|
||||||
0x08003108 0x50 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08003198 0x50 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08003108 nes_dualport_wr
|
0x08003198 nes_dualport_wr
|
||||||
.text.nes_dualport_rd
|
.text.nes_dualport_rd
|
||||||
0x08003158 0x38 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x080031e8 0x38 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08003158 nes_dualport_rd
|
0x080031e8 nes_dualport_rd
|
||||||
.text.nes_ppu_wr
|
.text.nes_ppu_wr
|
||||||
0x08003190 0x50 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08003220 0x50 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x08003190 nes_ppu_wr
|
0x08003220 nes_ppu_wr
|
||||||
.text.nes_ppu_rd
|
.text.nes_ppu_rd
|
||||||
0x080031e0 0x38 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x08003270 0x38 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x080031e0 nes_ppu_rd
|
0x08003270 nes_ppu_rd
|
||||||
.text.write_page.constprop.23
|
.text.write_page.constprop.28
|
||||||
0x08003218 0x68 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
0x080032a8 0x68 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
0x08003218 write_page.constprop.23
|
0x080032a8 write_page.constprop.28
|
||||||
.text.nes_cpu_page_rd_poll.constprop.17
|
.text.write_page_bank.constprop.26
|
||||||
0x08003280 0x6c C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
0x08003310 0xbc C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
0x08003280 nes_cpu_page_rd_poll.constprop.17
|
0x08003310 write_page_bank.constprop.26
|
||||||
.text.nes_ppu_page_rd_poll.constprop.16
|
.text.nes_cpu_page_rd_poll.constprop.22
|
||||||
0x080032ec 0x68 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
0x080033cc 0x6c C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
0x080032ec nes_ppu_page_rd_poll.constprop.16
|
0x080033cc nes_cpu_page_rd_poll.constprop.22
|
||||||
*fill* 0x08003354 0xc
|
.text.nes_ppu_page_rd_poll.constprop.21
|
||||||
.text 0x08003360 0x154 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
0x08003438 0x68 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
0x08003360 swim_xfr
|
0x08003438 nes_ppu_page_rd_poll.constprop.21
|
||||||
.text 0x080034b4 0xa38 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
.text 0x080034a0 0x4 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
0x08003784 _Unwind_GetCFA
|
0x080034a0 jump2addr
|
||||||
0x08003788 __gnu_Unwind_RaiseException
|
*fill* 0x080034a4 0xc
|
||||||
0x080037dc __gnu_Unwind_ForcedUnwind
|
.text 0x080034b0 0x154 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
0x080037f0 __gnu_Unwind_Resume
|
0x080034b0 swim_xfr
|
||||||
0x08003838 __gnu_Unwind_Resume_or_Rethrow
|
.text 0x08003604 0xa38 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
||||||
0x08003854 _Unwind_Complete
|
0x080038d4 _Unwind_GetCFA
|
||||||
0x08003858 _Unwind_DeleteException
|
0x080038d8 __gnu_Unwind_RaiseException
|
||||||
0x08003868 _Unwind_VRS_Get
|
0x0800392c __gnu_Unwind_ForcedUnwind
|
||||||
0x080038b4 _Unwind_VRS_Set
|
0x08003940 __gnu_Unwind_Resume
|
||||||
0x08003900 __gnu_Unwind_Backtrace
|
0x08003988 __gnu_Unwind_Resume_or_Rethrow
|
||||||
0x08003c60 __aeabi_unwind_cpp_pr0
|
0x080039a4 _Unwind_Complete
|
||||||
0x08003c6c __aeabi_unwind_cpp_pr1
|
0x080039a8 _Unwind_DeleteException
|
||||||
0x08003c78 __aeabi_unwind_cpp_pr2
|
0x080039b8 _Unwind_VRS_Get
|
||||||
0x08003c84 _Unwind_VRS_Pop
|
0x08003a04 _Unwind_VRS_Set
|
||||||
.text 0x08003eec 0x144 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(libunwind.o)
|
0x08003a50 __gnu_Unwind_Backtrace
|
||||||
0x08003eec __restore_core_regs
|
0x08003db0 __aeabi_unwind_cpp_pr0
|
||||||
0x08003eec restore_core_regs
|
0x08003dbc __aeabi_unwind_cpp_pr1
|
||||||
0x08003f18 __gnu_Unwind_Restore_VFP
|
0x08003dc8 __aeabi_unwind_cpp_pr2
|
||||||
0x08003f1c __gnu_Unwind_Save_VFP
|
0x08003dd4 _Unwind_VRS_Pop
|
||||||
0x08003f20 __gnu_Unwind_Restore_VFP_D
|
.text 0x0800403c 0x144 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(libunwind.o)
|
||||||
0x08003f24 __gnu_Unwind_Save_VFP_D
|
0x0800403c __restore_core_regs
|
||||||
0x08003f28 __gnu_Unwind_Restore_VFP_D_16_to_31
|
0x0800403c restore_core_regs
|
||||||
0x08003f2c __gnu_Unwind_Save_VFP_D_16_to_31
|
0x08004068 __gnu_Unwind_Restore_VFP
|
||||||
0x08003f30 __gnu_Unwind_Restore_WMMXD
|
0x0800406c __gnu_Unwind_Save_VFP
|
||||||
0x08003f34 __gnu_Unwind_Save_WMMXD
|
0x08004070 __gnu_Unwind_Restore_VFP_D
|
||||||
0x08003f38 __gnu_Unwind_Restore_WMMXC
|
0x08004074 __gnu_Unwind_Save_VFP_D
|
||||||
0x08003f3c __gnu_Unwind_Save_WMMXC
|
0x08004078 __gnu_Unwind_Restore_VFP_D_16_to_31
|
||||||
0x08003f40 ___Unwind_RaiseException
|
0x0800407c __gnu_Unwind_Save_VFP_D_16_to_31
|
||||||
0x08003f40 _Unwind_RaiseException
|
0x08004080 __gnu_Unwind_Restore_WMMXD
|
||||||
0x08003f70 _Unwind_Resume
|
0x08004084 __gnu_Unwind_Save_WMMXD
|
||||||
0x08003f70 ___Unwind_Resume
|
0x08004088 __gnu_Unwind_Restore_WMMXC
|
||||||
0x08003fa0 _Unwind_Resume_or_Rethrow
|
0x0800408c __gnu_Unwind_Save_WMMXC
|
||||||
0x08003fa0 ___Unwind_Resume_or_Rethrow
|
0x08004090 ___Unwind_RaiseException
|
||||||
0x08003fd0 _Unwind_ForcedUnwind
|
0x08004090 _Unwind_RaiseException
|
||||||
0x08003fd0 ___Unwind_ForcedUnwind
|
0x080040c0 _Unwind_Resume
|
||||||
0x08004000 ___Unwind_Backtrace
|
0x080040c0 ___Unwind_Resume
|
||||||
0x08004000 _Unwind_Backtrace
|
0x080040f0 _Unwind_Resume_or_Rethrow
|
||||||
.text 0x08004030 0x3a8 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
0x080040f0 ___Unwind_Resume_or_Rethrow
|
||||||
0x08004084 __gnu_unwind_execute
|
0x08004120 _Unwind_ForcedUnwind
|
||||||
0x08004380 __gnu_unwind_frame
|
0x08004120 ___Unwind_ForcedUnwind
|
||||||
0x080043a8 _Unwind_GetRegionStart
|
0x08004150 ___Unwind_Backtrace
|
||||||
0x080043b4 _Unwind_GetLanguageSpecificData
|
0x08004150 _Unwind_Backtrace
|
||||||
0x080043c8 _Unwind_GetTextRelBase
|
.text 0x08004180 0x3a8 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
||||||
0x080043d0 _Unwind_GetDataRelBase
|
0x080041d4 __gnu_unwind_execute
|
||||||
.text.abort 0x080043d8 0x10 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
|
0x080044d0 __gnu_unwind_frame
|
||||||
0x080043d8 abort
|
0x080044f8 _Unwind_GetRegionStart
|
||||||
.text.memcpy 0x080043e8 0x84 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
|
0x08004504 _Unwind_GetLanguageSpecificData
|
||||||
0x080043e8 memcpy
|
0x08004518 _Unwind_GetTextRelBase
|
||||||
|
0x08004520 _Unwind_GetDataRelBase
|
||||||
|
.text.abort 0x08004528 0x10 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
|
||||||
|
0x08004528 abort
|
||||||
|
.text.memcpy 0x08004538 0x84 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
|
||||||
|
0x08004538 memcpy
|
||||||
.text._raise_r
|
.text._raise_r
|
||||||
0x0800446c 0x5c c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
|
0x080045bc 0x5c c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
|
||||||
0x0800446c _raise_r
|
0x080045bc _raise_r
|
||||||
.text.raise 0x080044c8 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
|
.text.raise 0x08004618 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
|
||||||
0x080044c8 raise
|
0x08004618 raise
|
||||||
.text._kill_r 0x080044dc 0x28 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
|
.text._kill_r 0x0800462c 0x28 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
|
||||||
0x080044dc _kill_r
|
0x0800462c _kill_r
|
||||||
.text._getpid_r
|
.text._getpid_r
|
||||||
0x08004504 0x8 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
|
0x08004654 0x8 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
|
||||||
0x08004504 _getpid_r
|
0x08004654 _getpid_r
|
||||||
.text._getpid 0x0800450c 0x10 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
|
.text._getpid 0x0800465c 0x10 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
|
||||||
0x0800450c _getpid
|
0x0800465c _getpid
|
||||||
.text._kill 0x0800451c 0x10 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
|
.text._kill 0x0800466c 0x10 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
|
||||||
0x0800451c _kill
|
0x0800466c _kill
|
||||||
.text._exit 0x0800452c 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
|
.text._exit 0x0800467c 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
|
||||||
0x0800452c _exit
|
0x0800467c _exit
|
||||||
.text 0x08004530 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
|
.text 0x08004680 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
|
||||||
0x08004530 __gnu_thumb1_case_uqi
|
0x08004680 __gnu_thumb1_case_uqi
|
||||||
.text 0x08004544 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_shi.o)
|
.text 0x08004694 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_shi.o)
|
||||||
0x08004544 __gnu_thumb1_case_shi
|
0x08004694 __gnu_thumb1_case_shi
|
||||||
.text 0x08004558 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
|
.text 0x080046a8 0x14 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
|
||||||
0x08004558 __gnu_thumb1_case_uhi
|
0x080046a8 __gnu_thumb1_case_uhi
|
||||||
*(.init)
|
*(.init)
|
||||||
.init 0x0800456c 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
.init 0x080046bc 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
||||||
0x0800456c _init
|
0x080046bc _init
|
||||||
*(.fini)
|
*(.fini)
|
||||||
.fini 0x08004570 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
.fini 0x080046c0 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
||||||
0x08004570 _fini
|
0x080046c0 _fini
|
||||||
*crtbegin.o(.ctors)
|
*crtbegin.o(.ctors)
|
||||||
*crtbegin?.o(.ctors)
|
*crtbegin?.o(.ctors)
|
||||||
*(EXCLUDE_FILE(*crtend.o *crtend?.o) .ctors)
|
*(EXCLUDE_FILE(*crtend.o *crtend?.o) .ctors)
|
||||||
|
|
@ -653,53 +678,54 @@ LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eab
|
||||||
*(.dtors)
|
*(.dtors)
|
||||||
*(.rodata*)
|
*(.rodata*)
|
||||||
.rodata.config_desc
|
.rodata.config_desc
|
||||||
0x08004574 0x12 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x080046c4 0x12 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.rodata.device_desc
|
.rodata.device_desc
|
||||||
0x08004586 0x12 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x080046d6 0x12 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.rodata.string0_desc
|
.rodata.string0_desc
|
||||||
0x08004598 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x080046e8 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.rodata.string1_desc
|
.rodata.string1_desc
|
||||||
0x0800459c 0x54 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x080046ec 0x54 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.rodata.string2_desc
|
.rodata.string2_desc
|
||||||
0x080045f0 0x3c C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x08004740 0x3c C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
*(.eh_frame*)
|
*(.eh_frame*)
|
||||||
|
|
||||||
.glue_7 0x0800462c 0x0
|
.glue_7 0x0800477c 0x0
|
||||||
.glue_7 0x0800462c 0x0 linker stubs
|
.glue_7 0x0800477c 0x0 linker stubs
|
||||||
|
|
||||||
.glue_7t 0x0800462c 0x0
|
.glue_7t 0x0800477c 0x0
|
||||||
.glue_7t 0x0800462c 0x0 linker stubs
|
.glue_7t 0x0800477c 0x0 linker stubs
|
||||||
|
|
||||||
.vfp11_veneer 0x0800462c 0x0
|
.vfp11_veneer 0x0800477c 0x0
|
||||||
.vfp11_veneer 0x0800462c 0x0 linker stubs
|
.vfp11_veneer 0x0800477c 0x0 linker stubs
|
||||||
|
|
||||||
.v4_bx 0x0800462c 0x0
|
.v4_bx 0x0800477c 0x0
|
||||||
.v4_bx 0x0800462c 0x0 linker stubs
|
.v4_bx 0x0800477c 0x0 linker stubs
|
||||||
|
|
||||||
.iplt 0x0800462c 0x0
|
.iplt 0x0800477c 0x0
|
||||||
.iplt 0x0800462c 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
.iplt 0x0800477c 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
||||||
|
|
||||||
.ARM.extab 0x0800462c 0x30
|
.ARM.extab 0x0800477c 0x30
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
.ARM.extab 0x0800462c 0x24 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
.ARM.extab 0x0800477c 0x24 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
||||||
.ARM.extab 0x08004650 0xc c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
.ARM.extab 0x080047a0 0xc c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
||||||
0x0800465c __exidx_start = .
|
0x080047ac __exidx_start = .
|
||||||
|
|
||||||
.ARM.exidx 0x0800465c 0xd0
|
.ARM.exidx 0x080047ac 0xd0
|
||||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
.ARM.exidx 0x0800465c 0x8 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
.ARM.exidx 0x080047ac 0x8 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
|
.ARM.exidx 0x080047b4 0x0 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
0x10 (size before relaxing)
|
0x10 (size before relaxing)
|
||||||
.ARM.exidx 0x08004664 0x98 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
.ARM.exidx 0x080047b4 0x98 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(unwind-arm.o)
|
||||||
0xd8 (size before relaxing)
|
0xd8 (size before relaxing)
|
||||||
.ARM.exidx 0x080046fc 0x30 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
.ARM.exidx 0x0800484c 0x30 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(pr-support.o)
|
||||||
0x48 (size before relaxing)
|
0x48 (size before relaxing)
|
||||||
0x0800472c __exidx_end = .
|
0x0800487c __exidx_end = .
|
||||||
0x0800472c __etext = ALIGN (0x4)
|
0x0800487c __etext = ALIGN (0x4)
|
||||||
|
|
||||||
.rel.dyn 0x0800472c 0x0
|
.rel.dyn 0x0800487c 0x0
|
||||||
.rel.iplt 0x0800472c 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
.rel.iplt 0x0800487c 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
||||||
|
|
||||||
.data 0x20000000 0x430 load address 0x0800472c
|
.data 0x20000000 0x430 load address 0x0800487c
|
||||||
0x20000000 __data_start__ = .
|
0x20000000 __data_start__ = .
|
||||||
*(vtable)
|
*(vtable)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
|
|
@ -727,115 +753,116 @@ LOAD c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eab
|
||||||
0x20000430 . = ALIGN (0x4)
|
0x20000430 . = ALIGN (0x4)
|
||||||
0x20000430 __data_end__ = .
|
0x20000430 __data_end__ = .
|
||||||
|
|
||||||
.igot.plt 0x20000430 0x0 load address 0x08004b5c
|
.igot.plt 0x20000430 0x0 load address 0x08004cac
|
||||||
.igot.plt 0x20000430 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
.igot.plt 0x20000430 0x0 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crtbegin.o
|
||||||
|
|
||||||
.bss 0x20000430 0x2fc load address 0x08004b5c
|
.bss 0x20000430 0x300 load address 0x08004cac
|
||||||
0x20000430 . = ALIGN (0x4)
|
0x20000430 . = ALIGN (0x4)
|
||||||
0x20000430 __bss_start__ = .
|
0x20000430 __bss_start__ = .
|
||||||
*(.bss*)
|
*(.bss*)
|
||||||
.bss.buff0 0x20000430 0x14 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.addrh 0x20000430 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000430 buff0
|
.bss.buff0 0x20000434 0x14 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.buff1 0x20000444 0x14 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000434 buff0
|
||||||
0x20000444 buff1
|
.bss.buff1 0x20000448 0x14 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.buff2 0x20000458 0x14 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000448 buff1
|
||||||
0x20000458 buff2
|
.bss.buff2 0x2000045c 0x14 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.buff3 0x2000046c 0x14 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x2000045c buff2
|
||||||
0x2000046c buff3
|
.bss.buff3 0x20000470 0x14 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.cur_buff 0x20000480 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000470 buff3
|
||||||
0x20000480 cur_buff
|
.bss.cur_buff 0x20000484 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
|
0x20000484 cur_buff
|
||||||
.bss.cur_usb_load_buff
|
.bss.cur_usb_load_buff
|
||||||
0x20000484 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000488 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.incoming_bytes_remain
|
.bss.incoming_bytes_remain
|
||||||
0x20000488 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x2000048c 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
*fill* 0x20000489 0x3
|
*fill* 0x2000048d 0x3
|
||||||
.bss.log 0x2000048c 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.log 0x20000490 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.new_address
|
.bss.new_address
|
||||||
0x20000490 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000494 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
*fill* 0x20000491 0x1
|
*fill* 0x20000495 0x1
|
||||||
.bss.num_bytes_req.lto_priv.36
|
.bss.num_bytes_req.lto_priv.42
|
||||||
0x20000492 0x2 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000496 0x2 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000492 num_bytes_req.lto_priv.36
|
0x20000496 num_bytes_req.lto_priv.42
|
||||||
.bss.num_bytes_sending.lto_priv.35
|
.bss.num_bytes_sending.lto_priv.41
|
||||||
0x20000494 0x2 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000498 0x2 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000494 num_bytes_sending.lto_priv.35
|
0x20000498 num_bytes_sending.lto_priv.41
|
||||||
.bss.num_bytes_xfrd.lto_priv.34
|
.bss.num_bytes_xfrd.lto_priv.40
|
||||||
0x20000496 0x2 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x2000049a 0x2 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000496 num_bytes_xfrd.lto_priv.34
|
0x2000049a num_bytes_xfrd.lto_priv.40
|
||||||
.bss.oper_info_struct
|
.bss.oper_info_struct
|
||||||
0x20000498 0x20 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x2000049c 0x20 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000498 oper_info_struct
|
0x2000049c oper_info_struct
|
||||||
.bss.pbje_command
|
.bss.pbje_command
|
||||||
0x200004b8 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200004bc 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x200004b8 pbje_command
|
0x200004bc pbje_command
|
||||||
.bss.pbje_data
|
.bss.pbje_data
|
||||||
0x200004b9 0x20 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200004bd 0x20 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x200004b9 pbje_data
|
0x200004bd pbje_data
|
||||||
.bss.pbje_numclk
|
.bss.pbje_numclk
|
||||||
0x200004d9 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200004dd 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x200004d9 pbje_numclk
|
0x200004dd pbje_numclk
|
||||||
.bss.pbje_status
|
.bss.pbje_status
|
||||||
0x200004da 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200004de 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x200004da pbje_status
|
0x200004de pbje_status
|
||||||
.bss.raw_bank_status
|
.bss.raw_bank_status
|
||||||
0x200004db 0x10 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200004df 0x10 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
*fill* 0x200004eb 0x1
|
*fill* 0x200004ef 0x1
|
||||||
.bss.raw_buffer16
|
.bss.raw_buffer16
|
||||||
0x200004ec 0x200 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200004f0 0x200 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.req_dir 0x200006ec 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.req_dir 0x200006f0 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.reqdir 0x200006ed 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.reqdir 0x200006f1 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.reqtype 0x200006ee 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.reqtype 0x200006f2 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
*fill* 0x200006ef 0x1
|
*fill* 0x200006f3 0x1
|
||||||
.bss.rv16.4882
|
.bss.rv16.4938
|
||||||
0x200006f0 0x8 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200006f4 0x8 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.bss.swim_base
|
.bss.swim_base
|
||||||
0x200006f8 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x200006fc 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x200006f8 swim_base
|
0x200006fc swim_base
|
||||||
.bss.swim_pin 0x200006fc 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.swim_pin 0x20000700 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x200006fc swim_pin
|
0x20000700 swim_pin
|
||||||
*fill* 0x200006fd 0x3
|
*fill* 0x20000701 0x3
|
||||||
.bss.tck_base 0x20000700 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tck_base 0x20000704 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000700 tck_base
|
0x20000704 tck_base
|
||||||
.bss.tck_pin 0x20000704 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tck_pin 0x20000708 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000704 tck_pin
|
0x20000708 tck_pin
|
||||||
*fill* 0x20000705 0x3
|
*fill* 0x20000709 0x3
|
||||||
.bss.tdi_base 0x20000708 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tdi_base 0x2000070c 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000708 tdi_base
|
0x2000070c tdi_base
|
||||||
.bss.tdi_pin 0x2000070c 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tdi_pin 0x20000710 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x2000070c tdi_pin
|
0x20000710 tdi_pin
|
||||||
*fill* 0x2000070d 0x3
|
*fill* 0x20000711 0x3
|
||||||
.bss.tdo_base 0x20000710 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tdo_base 0x20000714 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000710 tdo_base
|
0x20000714 tdo_base
|
||||||
.bss.tdo_pin 0x20000714 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tdo_pin 0x20000718 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000714 tdo_pin
|
0x20000718 tdo_pin
|
||||||
*fill* 0x20000715 0x3
|
*fill* 0x20000719 0x3
|
||||||
.bss.tms_base 0x20000718 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tms_base 0x2000071c 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000718 tms_base
|
0x2000071c tms_base
|
||||||
.bss.tms_pin 0x2000071c 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.bss.tms_pin 0x20000720 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x2000071c tms_pin
|
0x20000720 tms_pin
|
||||||
*fill* 0x2000071d 0x3
|
*fill* 0x20000721 0x3
|
||||||
.bss.usbMsgPtr
|
.bss.usbMsgPtr
|
||||||
0x20000720 0x4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x20000724 0x4 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x20000720 usbMsgPtr
|
0x20000724 usbMsgPtr
|
||||||
.bss.num_buff.4962
|
.bss.num_buff.5018
|
||||||
0x20000724 0x1 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x20000728 0x1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
*fill* 0x20000725 0x3
|
*fill* 0x20000729 0x3
|
||||||
COMMON 0x20000728 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
|
COMMON 0x2000072c 0x4 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
|
||||||
0x20000728 errno
|
0x2000072c errno
|
||||||
0x2000072c . = ALIGN (0x4)
|
0x20000730 . = ALIGN (0x4)
|
||||||
0x2000072c __bss_end__ = .
|
0x20000730 __bss_end__ = .
|
||||||
|
|
||||||
.heap 0x20000730 0x0
|
.heap 0x20000730 0x0
|
||||||
0x20000730 __end__ = .
|
0x20000730 __end__ = .
|
||||||
0x20000730 PROVIDE (end, .)
|
0x20000730 PROVIDE (end, .)
|
||||||
*(.heap*)
|
*(.heap*)
|
||||||
.heap 0x20000730 0x0 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.heap 0x20000730 0x0 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
0x20000730 __HeapLimit = .
|
0x20000730 __HeapLimit = .
|
||||||
|
|
||||||
.stack_dummy 0x20000730 0xc00
|
.stack_dummy 0x20000730 0xc00
|
||||||
*(.stack*)
|
*(.stack*)
|
||||||
.stack 0x20000730 0xc00 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.stack 0x20000730 0xc00 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
0x20001800 __StackTop = (ORIGIN (RAM) + LENGTH (RAM))
|
0x20001800 __StackTop = (ORIGIN (RAM) + LENGTH (RAM))
|
||||||
0x20000c00 __StackLimit = (__StackTop - SIZEOF (.stack_dummy))
|
0x20000c00 __StackLimit = (__StackTop - SIZEOF (.stack_dummy))
|
||||||
0x20001800 PROVIDE (__stack, __StackTop)
|
0x20001800 PROVIDE (__stack, __StackTop)
|
||||||
|
|
@ -847,96 +874,103 @@ OUTPUT(build_stm/inlretro_stm.elf elf32-littlearm)
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000000 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
0x00000000 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m/crti.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x0000001e 0x1b C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
0x0000001e 0x1b C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000039 0x2f C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x00000039 0x2f C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000068 0x2f C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x00000068 0x2f C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000097 0x2f C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x00000097 0x2f C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x000000c6 0x2f C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
0x000000c6 0x2f C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x000000f5 0x21 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
0x000000f5 0x21 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000116 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
|
0x00000116 0x21 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000134 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_shi.o)
|
0x00000137 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
|
||||||
.ARM.attributes
|
.ARM.attributes
|
||||||
0x00000152 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
|
0x00000155 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_shi.o)
|
||||||
|
.ARM.attributes
|
||||||
|
0x00000173 0x1e c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
|
||||||
|
|
||||||
.comment 0x00000000 0x7f
|
.comment 0x00000000 0x7f
|
||||||
.comment 0x00000000 0x7f C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.comment 0x00000000 0x7f C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x80 (size before relaxing)
|
0x80 (size before relaxing)
|
||||||
.comment 0x0000007f 0x80 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.comment 0x0000007f 0x80 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.comment 0x0000007f 0x80 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.comment 0x0000007f 0x80 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.comment 0x0000007f 0x80 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.comment 0x0000007f 0x80 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
|
|
||||||
.debug_line 0x00000000 0x18dc
|
.debug_line 0x00000000 0x19fd
|
||||||
.debug_line 0x00000000 0x6f C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.debug_line 0x00000000 0x6f C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
.debug_line 0x0000006f 0xa19 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.debug_line 0x0000006f 0xab1 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.debug_line 0x00000a88 0x815 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.debug_line 0x00000b20 0x7ec C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.debug_line 0x0000129d 0x3a8 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.debug_line 0x0000130c 0x3ce C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.debug_line 0x00001645 0x1a4 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.debug_line 0x000016da 0x1e6 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
.debug_line 0x000017e9 0xf3 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
.debug_line 0x000018c0 0x4a C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
|
.debug_line 0x0000190a 0xf3 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
|
|
||||||
.debug_info 0x00000000 0x38f0
|
.debug_info 0x00000000 0x3d46
|
||||||
.debug_info 0x00000000 0x82 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.debug_info 0x00000000 0x82 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
.debug_info 0x00000082 0x14d6 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.debug_info 0x00000082 0x1823 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.debug_info 0x00001558 0x18c6 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.debug_info 0x000018a5 0x177e C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.debug_info 0x00002e1e 0x632 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.debug_info 0x00003023 0x66d C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.debug_info 0x00003450 0x425 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.debug_info 0x00003690 0x5bc C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
.debug_info 0x00003875 0x7b C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
.debug_info 0x00003c4c 0x7f C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
|
.debug_info 0x00003ccb 0x7b C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
|
|
||||||
.debug_abbrev 0x00000000 0xa81
|
.debug_abbrev 0x00000000 0xabf
|
||||||
.debug_abbrev 0x00000000 0x14 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
.debug_abbrev 0x00000000 0x14 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
.debug_abbrev 0x00000014 0x387 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.debug_abbrev 0x00000014 0x3a8 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.debug_abbrev 0x0000039b 0x396 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.debug_abbrev 0x000003bc 0x396 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.debug_abbrev 0x00000731 0x1ba C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.debug_abbrev 0x00000752 0x1ba C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.debug_abbrev 0x000008eb 0x182 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.debug_abbrev 0x0000090c 0x18b C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
.debug_abbrev 0x00000a6d 0x14 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
.debug_abbrev 0x00000a97 0x14 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
|
.debug_abbrev 0x00000aab 0x14 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
|
|
||||||
.debug_aranges 0x00000000 0x178
|
.debug_aranges 0x00000000 0x1a8
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x00000000 0x20 C:\Users\Paul\AppData\Local\Temp\cceBaBiJ.o
|
0x00000000 0x20 C:\Users\Paul\AppData\Local\Temp\cceBDSbg.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x00000020 0x20 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
0x00000020 0x20 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x00000040 0x50 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
0x00000040 0x50 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x00000090 0x98 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
0x00000090 0xa0 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x00000128 0x30 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
0x00000130 0x38 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x00000158 0x20 C:\Users\Paul\AppData\Local\Temp\cclhBf2A.o
|
0x00000168 0x20 C:\Users\Paul\AppData\Local\Temp\ccRslRPq.o
|
||||||
|
.debug_aranges
|
||||||
|
0x00000188 0x20 C:\Users\Paul\AppData\Local\Temp\ccj81ITq.o
|
||||||
|
|
||||||
.debug_loc 0x00000000 0x3cfd
|
.debug_loc 0x00000000 0x404b
|
||||||
.debug_loc 0x00000000 0x2457 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.debug_loc 0x00000000 0x2691 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.debug_loc 0x00002457 0xfc0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.debug_loc 0x00002691 0xf75 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.debug_loc 0x00003417 0x61e C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.debug_loc 0x00003606 0x660 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.debug_loc 0x00003a35 0x2c8 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.debug_loc 0x00003c66 0x3e5 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
|
|
||||||
.debug_ranges 0x00000000 0x1608
|
.debug_ranges 0x00000000 0x1708
|
||||||
.debug_ranges 0x00000000 0x12d0 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.debug_ranges 0x00000000 0x13e8 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.debug_ranges 0x000012d0 0x290 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.debug_ranges 0x000013e8 0x268 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.debug_ranges 0x00001560 0x88 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.debug_ranges 0x00001650 0x90 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.debug_ranges 0x000015e8 0x20 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.debug_ranges 0x000016e0 0x28 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
|
|
||||||
.debug_str 0x00000000 0xc68
|
.debug_str 0x00000000 0xd18
|
||||||
.debug_str 0x00000000 0x87d C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.debug_str 0x00000000 0x8f7 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
0x8e2 (size before relaxing)
|
0x95c (size before relaxing)
|
||||||
.debug_str 0x0000087d 0x247 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.debug_str 0x000008f7 0x237 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
0x4d9 (size before relaxing)
|
0x4d2 (size before relaxing)
|
||||||
.debug_str 0x00000ac4 0x113 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.debug_str 0x00000b2e 0x12c C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
0x2f8 (size before relaxing)
|
0x311 (size before relaxing)
|
||||||
.debug_str 0x00000bd7 0x91 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.debug_str 0x00000c5a 0xbe C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
0x307 (size before relaxing)
|
0x33d (size before relaxing)
|
||||||
|
|
||||||
.debug_frame 0x00000000 0x2ec
|
.debug_frame 0x00000000 0x31c
|
||||||
.debug_frame 0x00000000 0x30 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans0.ltrans.o
|
.debug_frame 0x00000000 0x30 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans0.ltrans.o
|
||||||
.debug_frame 0x00000030 0xd8 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans1.ltrans.o
|
.debug_frame 0x00000030 0xd8 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans1.ltrans.o
|
||||||
.debug_frame 0x00000108 0x174 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans2.ltrans.o
|
.debug_frame 0x00000108 0x184 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans2.ltrans.o
|
||||||
.debug_frame 0x0000027c 0x70 C:\Users\Paul\AppData\Local\Temp\ccHx4fn8.ltrans3.ltrans.o
|
.debug_frame 0x0000028c 0x90 C:\Users\Paul\AppData\Local\Temp\cc6CqT8m.ltrans3.ltrans.o
|
||||||
|
|
||||||
.stabstr 0x00000000 0x76
|
.stabstr 0x00000000 0x76
|
||||||
.stabstr 0x00000000 0x76 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
|
.stabstr 0x00000000 0x76 c:/arm/gcc-arm-none-eabi-6-2017-q2-update-win32/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
|
||||||
|
|
||||||
|
//;Ensure that your assembly code complies with the Procedure Call Standard for the ARM Architecture (AAPCS).
|
||||||
|
//;
|
||||||
|
//;The AAPCS describes a contract between caller functions and callee functions. For example, for integer or pointer types, it specifies that:
|
||||||
|
//;
|
||||||
|
//; Registers R0-R3 pass argument values to the callee function, with subsequent arguments passed on the stack.
|
||||||
|
//; Register R0 passes the result value back to the caller function.
|
||||||
|
//; Caller functions must preserve R0-R3 and R12, because these registers are allowed to be corrupted by the callee function.
|
||||||
|
//; Callee functions must preserve R4-R11 and LR, because these registers are not allowed to be corrupted by the callee function.
|
||||||
|
//;
|
||||||
|
//;For more information, see the Procedure Call Standard for the ARM Architecture (AAPCS).
|
||||||
|
|
||||||
|
//;WARNING!!! logic instructions all affect flags despite the 's' postfix arm_none_eabi_gcc doesn't like 's' instructions
|
||||||
|
//; but the 's' affect flag instructions are the only ones the M0 supports
|
||||||
|
//; because of this, issue the following code isn't compatible with other cores.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.globl jump2addr
|
||||||
|
.p2align 2
|
||||||
|
.type jump2addr,%function
|
||||||
|
//;r0 - r3 contain function args (excess on stack)
|
||||||
|
//;jump2addr( data_pb, spddir_len, swim_base, swim_mask);
|
||||||
|
//;spddir_len = (SWIM_RD_LS<<16) | len;
|
||||||
|
//; stream .req a1 this arg is moved to variable reg after stack push
|
||||||
|
addr .req a1
|
||||||
|
//; rv .req r0
|
||||||
|
//; len .req a2
|
||||||
|
//; swim_base .req a3
|
||||||
|
//; swim_mask .req a4
|
||||||
|
jump2addr: //;Function entry point.
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
//;bkpt
|
||||||
|
blx r0
|
||||||
|
.fnend
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
#include "bootload.h"
|
||||||
|
|
||||||
|
//=================================================================================================
|
||||||
|
//
|
||||||
|
// BOOTLOAD operations
|
||||||
|
// This file includes all the bootload functions possible to be called from the bootload dictionary.
|
||||||
|
//
|
||||||
|
// See description of the commands contained here in shared/shared_dictionaries.h
|
||||||
|
//
|
||||||
|
//=================================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
//const uint32_t fixed_const __attribute__((at(0x0800F000)));
|
||||||
|
//fixed_const= 0xDEADBEEF;
|
||||||
|
|
||||||
|
//int gSquared __attribute__((at(0x5000))); // Place at 0x5000
|
||||||
|
|
||||||
|
|
||||||
|
/* Desc:Function takes an opcode which was transmitted via USB
|
||||||
|
* then decodes it to call designated function.
|
||||||
|
* shared_dict_bootload.h is used in both host and fw to ensure opcodes/names align
|
||||||
|
* Pre: Macros must be defined in firmware pinport.h & bootload.h
|
||||||
|
* opcode must be defined in shared_dict_bootload.h
|
||||||
|
* Post:function call complete.
|
||||||
|
* Rtn: SUCCESS if opcode found, error if opcode not present or other problem.
|
||||||
|
*/
|
||||||
|
|
||||||
|
uint32_t addrh;
|
||||||
|
|
||||||
|
|
||||||
|
uint8_t bootload_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata )
|
||||||
|
{
|
||||||
|
switch (opcode) {
|
||||||
|
#ifdef STM_CORE
|
||||||
|
case JUMP_BL: jump_to_bootloader(); break;
|
||||||
|
//device won't respond after this point so actually expect an error to result
|
||||||
|
|
||||||
|
case LOAD_ADDRH: addrh = operand; break;
|
||||||
|
case JUMP_ADDR: jump2addr((addrh<<16) | (operand)); break;
|
||||||
|
//device may not respond depending on the address/function being jumped to
|
||||||
|
|
||||||
|
default:
|
||||||
|
//opcode doesn't exist
|
||||||
|
return ERR_UNKN_BOOTLOAD_OPCODE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void jump_to_bootloader()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef STM_INL6
|
||||||
|
// 070C6 jump to: 0x1FFFC519
|
||||||
|
// 070RB jump to: 0x1FFFCBC1
|
||||||
|
|
||||||
|
|
||||||
|
asm(
|
||||||
|
//"ldr pc, boot_addr\n\t"
|
||||||
|
// "ldr r0, =0x12345678\n\t"
|
||||||
|
// "mov r0, r0\n\t"
|
||||||
|
// "mov r0, r0\n\t"
|
||||||
|
//".p2align 2\n\t"
|
||||||
|
//"boot_addr:\n\t"
|
||||||
|
//".word 0x1FFFC519"
|
||||||
|
"ldr r0, [pc, #8]\n\t"// @ remember pc is 8 bytes ahead
|
||||||
|
"mov r13, r0\n\t" //load main stack pointer
|
||||||
|
"ldr r0, [pc, #8]\n\t"// @ remember pc is 8 bytes ahead
|
||||||
|
//"mov lr, r0\n\t"
|
||||||
|
//"bx lr \n\t"// @ function return
|
||||||
|
//"bkpt\n\t"
|
||||||
|
"mov r0, r0\n\t"
|
||||||
|
//"mov pc, r0\n\t"
|
||||||
|
"bx r0\n\t"
|
||||||
|
//"bootaddr\n\t"//
|
||||||
|
//".word 0x1FFFC519" //070C6
|
||||||
|
".p2align 2\n\t"
|
||||||
|
".word 0x20001278\n\t" //C6 MSP @ reset
|
||||||
|
// ".word 0x00010002\n\t"
|
||||||
|
//".word 0x00030004\n\t"
|
||||||
|
//".word 0x1FFFC519\n\t" //C6 AN2606
|
||||||
|
".word 0x1FFFCAC5\n\t" //C6 BL reset vector
|
||||||
|
//".word 0x1FFFCBC1\n\t" //stlink PC when connecting with BL grounded
|
||||||
|
//".word 0x1FFFC919\n\t" //best guess based on C6
|
||||||
|
//".word 0x1FFFCBC1\n\t" //bootloader reset vector
|
||||||
|
".word 0x00050006\n\t"
|
||||||
|
".word 0x00070008\n\t"
|
||||||
|
// ".word 0x1FFFC919\n\t"
|
||||||
|
// ".word 0x1FFFC919\n\t"
|
||||||
|
// ".word 0x1FFFC919\n\t"
|
||||||
|
// ".word 0x1FFFC919\n\t"
|
||||||
|
// ".word 0x1FFFC919\n\t"
|
||||||
|
".word 0x1FFFC919"
|
||||||
|
//".word 0x1FFFCBC1"
|
||||||
|
);
|
||||||
|
bootaddr:
|
||||||
|
asm(
|
||||||
|
".word 0xDEADBEEF"
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef _bootload_h
|
||||||
|
#define _bootload_h
|
||||||
|
|
||||||
|
#include "pinport.h"
|
||||||
|
#include "shared_dictionaries.h"
|
||||||
|
#include "shared_errors.h"
|
||||||
|
|
||||||
|
#ifdef STM_INL6
|
||||||
|
|
||||||
|
#endif //end STM_INL6
|
||||||
|
|
||||||
|
uint8_t bootload_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
||||||
|
|
||||||
|
void jump2addr(uint32_t addr);
|
||||||
|
void jump_to_bootloader();
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
#include "ciccom.h"
|
||||||
|
|
||||||
|
//=================================================================================================
|
||||||
|
//
|
||||||
|
// CICCOM operations
|
||||||
|
// This file includes all the ciccom functions possible to be called from the ciccom dictionary.
|
||||||
|
//
|
||||||
|
// See description of the commands contained here in shared/shared_dictionaries.h
|
||||||
|
//
|
||||||
|
//=================================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Desc:Function takes an opcode which was transmitted via USB
|
||||||
|
* then decodes it to call designated function.
|
||||||
|
* shared_dict_ciccom.h is used in both host and fw to ensure opcodes/names align
|
||||||
|
* Pre: Macros must be defined in firmware pinport.h & ciccom.h
|
||||||
|
* opcode must be defined in shared_dict_ciccom.h
|
||||||
|
* Post:function call complete.
|
||||||
|
* Rtn: SUCCESS if opcode found, error if opcode not present or other problem.
|
||||||
|
*/
|
||||||
|
uint8_t ciccom_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata )
|
||||||
|
{
|
||||||
|
#define RD_LEN 0
|
||||||
|
#define RD0 1
|
||||||
|
#define RD1 2
|
||||||
|
#define RD2 3
|
||||||
|
#define RD3 4
|
||||||
|
#define RD4 5
|
||||||
|
#define RD5 6
|
||||||
|
// uint16_t *ret_hword = (uint16_t*) &rdata[1];
|
||||||
|
|
||||||
|
#define BYTE_LEN 1
|
||||||
|
#define HWORD_LEN 2
|
||||||
|
switch (opcode) {
|
||||||
|
|
||||||
|
// case CICCOM_INIT: ciccom_init(); break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
//opcode doesn't exist
|
||||||
|
return ERR_UNKN_CICCOM_OPCODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef _ciccom_h
|
||||||
|
#define _ciccom_h
|
||||||
|
|
||||||
|
#include "pinport.h"
|
||||||
|
#include "shared_dictionaries.h"
|
||||||
|
#include "shared_errors.h"
|
||||||
|
|
||||||
|
|
||||||
|
uint8_t ciccom_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -38,13 +38,15 @@ uint8_t dump_buff( buffer *buff ) {
|
||||||
//Nomolos bank table @ CC84
|
//Nomolos bank table @ CC84
|
||||||
//nes_cpu_wr( (0xCC84+bank), bank );
|
//nes_cpu_wr( (0xCC84+bank), bank );
|
||||||
//Owlia bank table @ CC84
|
//Owlia bank table @ CC84
|
||||||
nes_cpu_wr( (0xE473+bank), bank );
|
//nes_cpu_wr( (0xE473+bank), bank );
|
||||||
//Rushnattack
|
//Rushnattack
|
||||||
//nes_cpu_wr( (0x8000+bank), bank );
|
//nes_cpu_wr( (0x8000+bank), bank );
|
||||||
//twindragons
|
//twindragons
|
||||||
//nes_cpu_wr( (0xC000+bank), bank );
|
//nes_cpu_wr( (0xC000+bank), bank );
|
||||||
//h1
|
//h1
|
||||||
//nes_cpu_wr( (0xFFC0+bank), bank );
|
//nes_cpu_wr( (0xFFC0+bank), bank );
|
||||||
|
//AFB
|
||||||
|
nes_cpu_wr( (0xFD69+bank), bank );
|
||||||
|
|
||||||
buff->cur_byte = nes_cpu_page_rd_poll( buff->data, addrH, buff->id,
|
buff->cur_byte = nes_cpu_page_rd_poll( buff->data, addrH, buff->id,
|
||||||
//id contains MSb of page when <256B buffer
|
//id contains MSb of page when <256B buffer
|
||||||
|
|
@ -159,15 +161,26 @@ uint8_t dump_buff( buffer *buff ) {
|
||||||
buff->last_idx, ~FALSE );
|
buff->last_idx, ~FALSE );
|
||||||
break;
|
break;
|
||||||
case SNESROM:
|
case SNESROM:
|
||||||
addrH |= 0x80; //$8000 LOROM space
|
if (buff->mapper == LOROM) {
|
||||||
//need to split page_num
|
addrH |= 0x80; //$8000 LOROM space
|
||||||
//A14-8 page_num[7-0]
|
//need to split page_num
|
||||||
//A15 high (LOROM)
|
//A14-8 page_num[6-0]
|
||||||
//A23-16 page_num[14-8]
|
//A15 high (LOROM)
|
||||||
HADDR_SET( (buff->page_num)>>7 );
|
//A23-16 page_num[14-7]
|
||||||
|
bank = (buff->page_num)>>7;
|
||||||
|
}
|
||||||
|
if (buff->mapper == HIROM) {
|
||||||
|
//need to split page_num
|
||||||
|
//A15-8 page_num[7-0]
|
||||||
|
//A21-16 page_num[13-8]
|
||||||
|
//A22 high (HIROM)
|
||||||
|
//A23 ~page_num[14] (bank CO starts first half, bank 40 starts second)
|
||||||
|
bank = ((((buff->page_num)>>8) | 0x40) & 0x7F);
|
||||||
|
}
|
||||||
|
HADDR_SET( bank );
|
||||||
buff->cur_byte = snes_rom_page_rd_poll( buff->data, addrH, buff->id,
|
buff->cur_byte = snes_rom_page_rd_poll( buff->data, addrH, buff->id,
|
||||||
//id contains MSb of page when <256B buffer
|
//id contains MSb of page when <256B buffer
|
||||||
buff->last_idx, ~FALSE );
|
buff->last_idx, ~FALSE );
|
||||||
case SNESRAM:
|
case SNESRAM:
|
||||||
//warn addrX = ((buff->page_num)>>8);
|
//warn addrX = ((buff->page_num)>>8);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,9 @@ uint8_t write_page_bank( uint8_t bank, uint8_t addrH, uint16_t unlock1, uint16_t
|
||||||
//select first bank for unlock sequence
|
//select first bank for unlock sequence
|
||||||
//needs to be written to bank table!
|
//needs to be written to bank table!
|
||||||
// nes_cpu_wr( (0xCC84), 0x00 );
|
// nes_cpu_wr( (0xCC84), 0x00 );
|
||||||
nes_cpu_wr( (0xE473), 0x00 );
|
// nes_cpu_wr( (0xE473), 0x00 );
|
||||||
// nes_cpu_wr( (0xC000), 0x00 );
|
// nes_cpu_wr( (0xC000), 0x00 );
|
||||||
|
nes_cpu_wr( (0xFD69), 0x00 );
|
||||||
|
|
||||||
//wr_func( 0x5555, 0xAA );
|
//wr_func( 0x5555, 0xAA );
|
||||||
wr_func( unlock1, 0xAA );
|
wr_func( unlock1, 0xAA );
|
||||||
|
|
@ -94,10 +95,11 @@ uint8_t write_page_bank( uint8_t bank, uint8_t addrH, uint16_t unlock1, uint16_t
|
||||||
//now need to select bank for the actual write!
|
//now need to select bank for the actual write!
|
||||||
//but this write can't be applied to the PRG-ROM
|
//but this write can't be applied to the PRG-ROM
|
||||||
// nes_cpu_wr( (0xCC84+bank), bank );
|
// nes_cpu_wr( (0xCC84+bank), bank );
|
||||||
nes_cpu_wr( (0xE473+bank), bank );
|
// nes_cpu_wr( (0xE473+bank), bank );
|
||||||
// nes_cpu_wr( (0x8000+bank), bank );
|
// nes_cpu_wr( (0x8000+bank), bank );
|
||||||
//nes_cpu_wr( (0xC000+bank), bank );
|
//nes_cpu_wr( (0xC000+bank), bank );
|
||||||
// nes_cpu_wr( (0xFFC0+bank), bank );
|
// nes_cpu_wr( (0xFFC0+bank), bank );
|
||||||
|
nes_cpu_wr( (0xFD69+bank), bank );
|
||||||
|
|
||||||
wr_func( ((addrH<<8)| n), buff->data[n] );
|
wr_func( ((addrH<<8)| n), buff->data[n] );
|
||||||
|
|
||||||
|
|
@ -836,6 +838,16 @@ uint8_t flash_buff( buffer *buff ) {
|
||||||
//bank gets written inside flash algo
|
//bank gets written inside flash algo
|
||||||
write_page_bank( bank, addrH, 0x5555, 0x2AAA, buff, discrete_exp0_prgrom_wr, nes_cpu_rd );
|
write_page_bank( bank, addrH, 0x5555, 0x2AAA, buff, discrete_exp0_prgrom_wr, nes_cpu_rd );
|
||||||
}
|
}
|
||||||
|
if (buff->mapper == MM2) {
|
||||||
|
//addrH &= 0b1011 1111 A14 must always be low
|
||||||
|
addrH &= 0x3F;
|
||||||
|
addrH |= 0x80; //A15 doesn't apply to exp0 write, but needed for read back
|
||||||
|
//write bank value
|
||||||
|
//page_num shift by 6 bits A14 >> A8(0)
|
||||||
|
bank = buff->page_num >> 6;
|
||||||
|
//bank gets written inside flash algo
|
||||||
|
write_page_bank( bank, addrH, 0x5555, 0x2AAA, buff, disc_push_exp0_prgrom_wr, nes_cpu_rd );
|
||||||
|
}
|
||||||
if (buff->mapper == MAP30) {
|
if (buff->mapper == MAP30) {
|
||||||
//addrH &= 0b1011 1111 A14 must always be low
|
//addrH &= 0b1011 1111 A14 must always be low
|
||||||
addrH &= 0x3F;
|
addrH &= 0x3F;
|
||||||
|
|
@ -939,14 +951,25 @@ uint8_t flash_buff( buffer *buff ) {
|
||||||
// buff->last_idx, ~FALSE );
|
// buff->last_idx, ~FALSE );
|
||||||
break;
|
break;
|
||||||
case SNESROM:
|
case SNESROM:
|
||||||
addrH |= 0x80; //$8000 LOROM space
|
if (buff->mapper == LOROM) {
|
||||||
//need to split page_num
|
addrH |= 0x80; //$8000 LOROM space
|
||||||
//A14-8 page_num[7-0]
|
//need to split page_num
|
||||||
//A15 high (LOROM)
|
//A14-8 page_num[7-0]
|
||||||
//A23-16 page_num[14-8]
|
//A15 high (LOROM)
|
||||||
HADDR_SET( (buff->page_num)>>7 );
|
//A23-16 page_num[14-8]
|
||||||
//clear any reset state
|
bank = (buff->page_num)>>7;
|
||||||
//EXP0_HI();
|
//clear any reset state
|
||||||
|
//EXP0_HI();
|
||||||
|
}
|
||||||
|
if (buff->mapper == HIROM) {
|
||||||
|
//need to split page_num
|
||||||
|
//A15-8 page_num[7-0]
|
||||||
|
//A21-16 page_num[13-8]
|
||||||
|
//A22 high (HIROM)
|
||||||
|
//A23 ~page_num[14] (bank CO starts first half, bank 40 starts second)
|
||||||
|
bank = ((((buff->page_num)>>8) | 0x40) & 0x7F);
|
||||||
|
}
|
||||||
|
HADDR_SET( bank );
|
||||||
write_page_snes( 0, addrH, buff, snes_rom_wr, snes_rom_rd );
|
write_page_snes( 0, addrH, buff, snes_rom_wr, snes_rom_rd );
|
||||||
case SNESRAM:
|
case SNESRAM:
|
||||||
//warn addrX = ((buff->page_num)>>8);
|
//warn addrX = ((buff->page_num)>>8);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
#include "gameboy.h"
|
||||||
|
|
||||||
|
//=================================================================================================
|
||||||
|
//
|
||||||
|
// GAMEBOY operations
|
||||||
|
// This file includes all the gameboy functions possible to be called from the gameboy dictionary.
|
||||||
|
//
|
||||||
|
// See description of the commands contained here in shared/shared_dictionaries.h
|
||||||
|
//
|
||||||
|
//=================================================================================================
|
||||||
|
|
||||||
|
/* Desc:Function takes an opcode which was transmitted via USB
|
||||||
|
* then decodes it to call designated function.
|
||||||
|
* shared_dict_gameboy.h is used in both host and fw to ensure opcodes/names align
|
||||||
|
* Pre: Macros must be defined in firmware pinport.h
|
||||||
|
* opcode must be defined in shared_dict_gameboy.h
|
||||||
|
* Post:function call complete.
|
||||||
|
* Rtn: SUCCESS if opcode found and completed, error if opcode not present or other problem.
|
||||||
|
*/
|
||||||
|
uint8_t gameboy_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata )
|
||||||
|
{
|
||||||
|
|
||||||
|
#define RD_LEN 0
|
||||||
|
#define RD0 1
|
||||||
|
#define RD1 2
|
||||||
|
|
||||||
|
#define BYTE_LEN 1
|
||||||
|
#define HWORD_LEN 2
|
||||||
|
|
||||||
|
switch (opcode) {
|
||||||
|
// //no return value:
|
||||||
|
case DMG_WR:
|
||||||
|
dmg_wr( operand, miscdata );
|
||||||
|
break;
|
||||||
|
|
||||||
|
//8bit return values:
|
||||||
|
case DMG_RD:
|
||||||
|
rdata[RD_LEN] = BYTE_LEN;
|
||||||
|
rdata[RD0] = dmg_rd( operand );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//macro doesn't exist
|
||||||
|
return ERR_UNKN_GAMEBOY_OPCODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t dmg_rd( uint16_t addr )
|
||||||
|
{
|
||||||
|
return 0xAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void dmg_wr( uint16_t addr, uint8_t data )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef _gameboy_h
|
||||||
|
#define _gameboy_h
|
||||||
|
|
||||||
|
#include "pinport.h"
|
||||||
|
#include "shared_dictionaries.h"
|
||||||
|
#include "shared_errors.h"
|
||||||
|
|
||||||
|
uint8_t gameboy_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
||||||
|
|
||||||
|
uint8_t dmg_rd( uint16_t addr );
|
||||||
|
void dmg_wr( uint16_t addr, uint8_t data );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
#include "gba.h"
|
||||||
|
|
||||||
|
//=================================================================================================
|
||||||
|
//
|
||||||
|
// GBA operations
|
||||||
|
// This file includes all the gba functions possible to be called from the gba dictionary.
|
||||||
|
//
|
||||||
|
// See description of the commands contained here in shared/shared_dictionaries.h
|
||||||
|
//
|
||||||
|
//=================================================================================================
|
||||||
|
|
||||||
|
/* Desc:Function takes an opcode which was transmitted via USB
|
||||||
|
* then decodes it to call designated function.
|
||||||
|
* shared_dict_gba.h is used in both host and fw to ensure opcodes/names align
|
||||||
|
* Pre: Macros must be defined in firmware pinport.h
|
||||||
|
* opcode must be defined in shared_dict_gba.h
|
||||||
|
* Post:function call complete.
|
||||||
|
* Rtn: SUCCESS if opcode found and completed, error if opcode not present or other problem.
|
||||||
|
*/
|
||||||
|
uint8_t gba_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata )
|
||||||
|
{
|
||||||
|
|
||||||
|
#define RD_LEN 0
|
||||||
|
#define RD0 1
|
||||||
|
#define RD1 2
|
||||||
|
|
||||||
|
#define BYTE_LEN 1
|
||||||
|
#define HWORD_LEN 2
|
||||||
|
|
||||||
|
switch (opcode) {
|
||||||
|
// //no return value:
|
||||||
|
case GBA_WR:
|
||||||
|
gba_wr( operand, miscdata );
|
||||||
|
break;
|
||||||
|
|
||||||
|
//8bit return values:
|
||||||
|
case GBA_RD:
|
||||||
|
rdata[RD_LEN] = BYTE_LEN;
|
||||||
|
rdata[RD0] = gba_rd( operand );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//macro doesn't exist
|
||||||
|
return ERR_UNKN_GBA_OPCODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t gba_rd( uint16_t addr )
|
||||||
|
{
|
||||||
|
return 0xAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void gba_wr( uint16_t addr, uint8_t data )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef _gba_h
|
||||||
|
#define _gba_h
|
||||||
|
|
||||||
|
#include "pinport.h"
|
||||||
|
#include "shared_dictionaries.h"
|
||||||
|
#include "shared_errors.h"
|
||||||
|
|
||||||
|
uint8_t gba_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
||||||
|
|
||||||
|
uint8_t gba_rd( uint16_t addr );
|
||||||
|
void gba_wr( uint16_t addr, uint8_t data );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
|
#include "bootload.h"
|
||||||
#include "jtag.h"
|
#include "jtag.h"
|
||||||
|
|
||||||
#ifdef AVR_CORE
|
#ifdef AVR_CORE
|
||||||
|
|
@ -53,6 +54,15 @@ int main(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STM_CORE
|
#ifdef STM_CORE
|
||||||
|
|
||||||
|
//remap system memory (including vector table)
|
||||||
|
// SYSCFG->CFGR1 = 0x00000002; //boot value (BOOT1:0 = 0b10
|
||||||
|
// SYSCFG->CFGR1 = 0x00000001; //map sysmem bootloader to 0x00000000
|
||||||
|
//SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE_ | 0x0001;
|
||||||
|
//jump to bootloader
|
||||||
|
// jump_to_bootloader();
|
||||||
|
// jump_to_addr(0x1FFFC519);
|
||||||
|
|
||||||
//System is running at reset defaults
|
//System is running at reset defaults
|
||||||
|
|
||||||
//Default clock is in operation
|
//Default clock is in operation
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
#include "n64.h"
|
||||||
|
|
||||||
|
//=================================================================================================
|
||||||
|
//
|
||||||
|
// N64 operations
|
||||||
|
// This file includes all the n64 functions possible to be called from the n64 dictionary.
|
||||||
|
//
|
||||||
|
// See description of the commands contained here in shared/shared_dictionaries.h
|
||||||
|
//
|
||||||
|
//=================================================================================================
|
||||||
|
|
||||||
|
/* Desc:Function takes an opcode which was transmitted via USB
|
||||||
|
* then decodes it to call designated function.
|
||||||
|
* shared_dict_n64.h is used in both host and fw to ensure opcodes/names align
|
||||||
|
* Pre: Macros must be defined in firmware pinport.h
|
||||||
|
* opcode must be defined in shared_dict_n64.h
|
||||||
|
* Post:function call complete.
|
||||||
|
* Rtn: SUCCESS if opcode found and completed, error if opcode not present or other problem.
|
||||||
|
*/
|
||||||
|
uint8_t n64_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata )
|
||||||
|
{
|
||||||
|
|
||||||
|
#define RD_LEN 0
|
||||||
|
#define RD0 1
|
||||||
|
#define RD1 2
|
||||||
|
|
||||||
|
#define BYTE_LEN 1
|
||||||
|
#define HWORD_LEN 2
|
||||||
|
|
||||||
|
switch (opcode) {
|
||||||
|
// //no return value:
|
||||||
|
case N64_WR:
|
||||||
|
n64_wr( operand, miscdata );
|
||||||
|
break;
|
||||||
|
|
||||||
|
//8bit return values:
|
||||||
|
case N64_RD:
|
||||||
|
rdata[RD_LEN] = BYTE_LEN;
|
||||||
|
rdata[RD0] = n64_rd( operand );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//macro doesn't exist
|
||||||
|
return ERR_UNKN_N64_OPCODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t n64_rd( uint16_t addr )
|
||||||
|
{
|
||||||
|
return 0xAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void n64_wr( uint16_t addr, uint8_t data )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef _n64_h
|
||||||
|
#define _n64_h
|
||||||
|
|
||||||
|
#include "pinport.h"
|
||||||
|
#include "shared_dictionaries.h"
|
||||||
|
#include "shared_errors.h"
|
||||||
|
|
||||||
|
uint8_t n64_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
||||||
|
|
||||||
|
uint8_t n64_rd( uint16_t addr );
|
||||||
|
void n64_wr( uint16_t addr, uint8_t data );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -32,6 +32,9 @@ uint8_t nes_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *r
|
||||||
case DISCRETE_EXP0_PRGROM_WR:
|
case DISCRETE_EXP0_PRGROM_WR:
|
||||||
discrete_exp0_prgrom_wr( operand, miscdata );
|
discrete_exp0_prgrom_wr( operand, miscdata );
|
||||||
break;
|
break;
|
||||||
|
case DISC_PUSH_EXP0_PRGROM_WR:
|
||||||
|
disc_push_exp0_prgrom_wr( operand, miscdata );
|
||||||
|
break;
|
||||||
case NES_PPU_WR:
|
case NES_PPU_WR:
|
||||||
nes_ppu_wr( operand, miscdata );
|
nes_ppu_wr( operand, miscdata );
|
||||||
break;
|
break;
|
||||||
|
|
@ -113,6 +116,24 @@ void discrete_exp0_prgrom_wr( uint16_t addr, uint8_t data )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//like above, but push on EXP0 instead of pullup
|
||||||
|
void disc_push_exp0_prgrom_wr( uint16_t addr, uint8_t data )
|
||||||
|
{
|
||||||
|
ADDR_SET(addr);
|
||||||
|
|
||||||
|
DATA_OP();
|
||||||
|
DATA_SET(data);
|
||||||
|
|
||||||
|
EXP0_OP(); //Tas = 0ns, Tah = 30ns
|
||||||
|
EXP0_LO();
|
||||||
|
//EXP0_IP_PU(); //Twp = 40ns, Tds = 40ns, Tdh = 0ns
|
||||||
|
EXP0_HI(); //Twp = 40ns, Tds = 40ns, Tdh = 0ns
|
||||||
|
//16Mhz avr clk = 62.5ns period guarantees timing reqts
|
||||||
|
DATA_IP();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Desc: Discrete board MAPPER write without bus conflicts
|
/* Desc: Discrete board MAPPER write without bus conflicts
|
||||||
* will also write to PRG-ROM, but PRG-ROM shouldn't output
|
* will also write to PRG-ROM, but PRG-ROM shouldn't output
|
||||||
* data while writting to mapper. Thus removing need for bank table.
|
* data while writting to mapper. Thus removing need for bank table.
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
uint8_t nes_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
uint8_t nes_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
||||||
|
|
||||||
void discrete_exp0_prgrom_wr( uint16_t addr, uint8_t data );
|
void discrete_exp0_prgrom_wr( uint16_t addr, uint8_t data );
|
||||||
|
void disc_push_exp0_prgrom_wr( uint16_t addr, uint8_t data );
|
||||||
//void discrete_exp0_mapper_wr( uint16_t addr, uint8_t data );
|
//void discrete_exp0_mapper_wr( uint16_t addr, uint8_t data );
|
||||||
uint8_t emulate_nes_cpu_rd( uint16_t addr );
|
uint8_t emulate_nes_cpu_rd( uint16_t addr );
|
||||||
uint8_t nes_cpu_rd( uint16_t addr );
|
uint8_t nes_cpu_rd( uint16_t addr );
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
#include "sega.h"
|
||||||
|
|
||||||
|
//=================================================================================================
|
||||||
|
//
|
||||||
|
// SEGA operations
|
||||||
|
// This file includes all the sega functions possible to be called from the sega dictionary.
|
||||||
|
//
|
||||||
|
// See description of the commands contained here in shared/shared_dictionaries.h
|
||||||
|
//
|
||||||
|
//=================================================================================================
|
||||||
|
|
||||||
|
/* Desc:Function takes an opcode which was transmitted via USB
|
||||||
|
* then decodes it to call designated function.
|
||||||
|
* shared_dict_sega.h is used in both host and fw to ensure opcodes/names align
|
||||||
|
* Pre: Macros must be defined in firmware pinport.h
|
||||||
|
* opcode must be defined in shared_dict_sega.h
|
||||||
|
* Post:function call complete.
|
||||||
|
* Rtn: SUCCESS if opcode found and completed, error if opcode not present or other problem.
|
||||||
|
*/
|
||||||
|
uint8_t sega_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata )
|
||||||
|
{
|
||||||
|
|
||||||
|
#define RD_LEN 0
|
||||||
|
#define RD0 1
|
||||||
|
#define RD1 2
|
||||||
|
|
||||||
|
#define BYTE_LEN 1
|
||||||
|
#define HWORD_LEN 2
|
||||||
|
|
||||||
|
switch (opcode) {
|
||||||
|
// //no return value:
|
||||||
|
case SEGA_WR:
|
||||||
|
sega_wr( operand, miscdata );
|
||||||
|
break;
|
||||||
|
|
||||||
|
//8bit return values:
|
||||||
|
case SEGA_RD:
|
||||||
|
rdata[RD_LEN] = BYTE_LEN;
|
||||||
|
rdata[RD0] = sega_rd( operand );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//macro doesn't exist
|
||||||
|
return ERR_UNKN_SEGA_OPCODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t sega_rd( uint16_t addr )
|
||||||
|
{
|
||||||
|
return 0xAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void sega_wr( uint16_t addr, uint8_t data )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef _sega_h
|
||||||
|
#define _sega_h
|
||||||
|
|
||||||
|
#include "pinport.h"
|
||||||
|
#include "shared_dictionaries.h"
|
||||||
|
#include "shared_errors.h"
|
||||||
|
|
||||||
|
uint8_t sega_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );
|
||||||
|
|
||||||
|
uint8_t sega_rd( uint16_t addr );
|
||||||
|
void sega_wr( uint16_t addr, uint8_t data );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -117,6 +117,22 @@ uint16_t usbFunctionSetup(uint8_t data[8]) {
|
||||||
rv[RETURN_ERR_IDX] = snes_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
rv[RETURN_ERR_IDX] = snes_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DICT_GAMEBOY:
|
||||||
|
rv[RETURN_ERR_IDX] = gameboy_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DICT_GBA:
|
||||||
|
rv[RETURN_ERR_IDX] = gba_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DICT_SEGA:
|
||||||
|
rv[RETURN_ERR_IDX] = sega_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DICT_N64:
|
||||||
|
rv[RETURN_ERR_IDX] = n64_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
|
break;
|
||||||
|
|
||||||
case DICT_SWIM:
|
case DICT_SWIM:
|
||||||
rv[RETURN_ERR_IDX] = swim_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
rv[RETURN_ERR_IDX] = swim_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
break;
|
break;
|
||||||
|
|
@ -125,6 +141,14 @@ uint16_t usbFunctionSetup(uint8_t data[8]) {
|
||||||
rv[RETURN_ERR_IDX] = jtag_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
rv[RETURN_ERR_IDX] = jtag_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DICT_BOOTLOAD:
|
||||||
|
rv[RETURN_ERR_IDX] = bootload_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DICT_CICCOM:
|
||||||
|
rv[RETURN_ERR_IDX] = ciccom_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case DICT_BUFFER:
|
case DICT_BUFFER:
|
||||||
//just give buffer.c the setup packet and let it figure things out for itself
|
//just give buffer.c the setup packet and let it figure things out for itself
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,14 @@
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "nes.h"
|
#include "nes.h"
|
||||||
#include "snes.h"
|
#include "snes.h"
|
||||||
|
#include "gameboy.h"
|
||||||
|
#include "gba.h"
|
||||||
|
#include "sega.h"
|
||||||
|
#include "n64.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "swim.h"
|
#include "swim.h"
|
||||||
|
#include "bootload.h"
|
||||||
|
#include "ciccom.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "shared_usb.h"
|
#include "shared_usb.h"
|
||||||
#include "shared_errors.h"
|
#include "shared_errors.h"
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,8 @@ void HardFault_Handler(void)
|
||||||
#ifdef STM_INL6
|
#ifdef STM_INL6
|
||||||
#define XTAL_8Mhz
|
#define XTAL_8Mhz
|
||||||
#else //kaz6 prototype & stm adapter have 16Mhz xtal
|
#else //kaz6 prototype & stm adapter have 16Mhz xtal
|
||||||
#define XTAL_16Mhz
|
//#define XTAL_16Mhz
|
||||||
|
#define XTAL_8Mhz
|
||||||
#endif
|
#endif
|
||||||
void init_clock()
|
void init_clock()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,197 @@
|
||||||
|
|
||||||
|
-- create the module's table
|
||||||
|
local ciccom = {}
|
||||||
|
|
||||||
|
-- import required modules
|
||||||
|
local dict = require "scripts.app.dict"
|
||||||
|
|
||||||
|
-- file constants
|
||||||
|
|
||||||
|
-- local functions
|
||||||
|
local function start( debug )
|
||||||
|
|
||||||
|
--CIC reset & clock needs to be low to start
|
||||||
|
dict.pinport( "CTL_OP", "AFL")
|
||||||
|
dict.pinport( "CTL_SET_LO", "AFL") --CIC RESET LOW
|
||||||
|
|
||||||
|
dict.pinport( "CTL_OP", "GBP")
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP") --INL CIC DATA LOW
|
||||||
|
|
||||||
|
|
||||||
|
--[[
|
||||||
|
--reset the stm8 and disable SWIM, to get CIC in known state
|
||||||
|
dict.io("SWIM_INIT", "SWIM_ON_A0")
|
||||||
|
if swim.start(true) then
|
||||||
|
swim.stop_and_reset()
|
||||||
|
else
|
||||||
|
print("fail to activate SWIM")
|
||||||
|
end
|
||||||
|
|
||||||
|
--now the CIC should be restarting
|
||||||
|
--takes ~0.5msec for it to get through boot sequence
|
||||||
|
jtag.sleep(0.01) --10msec to be overly safe
|
||||||
|
--after that time it's waiting for a CIC reset pulse to wake it
|
||||||
|
--]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--CIC CLK needs to be low before taking CIC RESET HIGH
|
||||||
|
dict.pinport( "ADDR_ENABLE")
|
||||||
|
dict.pinport( "ADDR_OP")
|
||||||
|
dict.pinport( "ADDR_SET", 0) --CIC CLK LOW (A0)
|
||||||
|
|
||||||
|
--reset CIC by making it panic
|
||||||
|
-- dict.pinport( "CTL_SET_HI", "AFL")
|
||||||
|
-- dict.pinport( "CTL_SET_LO", "AFL")
|
||||||
|
-- rv = 2000
|
||||||
|
-- while rv ~= 0 do
|
||||||
|
-- dict.pinport( "ADDR_SET", 1) --CIC CLK
|
||||||
|
-- dict.pinport( "ADDR_SET", 0) --CIC CLK
|
||||||
|
-- rv = rv -1
|
||||||
|
-- end
|
||||||
|
|
||||||
|
|
||||||
|
dict.pinport( "ADDR_SET", 0) --CIC CLK
|
||||||
|
dict.pinport( "CTL_SET_HI", "AFL")
|
||||||
|
|
||||||
|
--CIC is now waiting for data to be clocked in using CIC CLK & KEY_DATA_OUT
|
||||||
|
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local function set_opcode(opcode)
|
||||||
|
|
||||||
|
--KEY DATA IN is clocked in on rising edges of CIC CLK
|
||||||
|
--"M" 0x4D (0b0100_1101 needs to be written to CIC to cause it to toggle mirroring
|
||||||
|
--MSbit is latched first
|
||||||
|
|
||||||
|
if opcode == "M" then
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--now that "M" is written to CIC, end OPCODE write sequence by taking CIC RESET LO
|
||||||
|
dict.pinport( "CTL_SET_LO", "AFL")
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function write(data)
|
||||||
|
|
||||||
|
--now send operand "V" (0x56) or "H" (0x48)
|
||||||
|
|
||||||
|
if data == "H" then
|
||||||
|
--HORIZONTAL
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
elseif data == "V" then
|
||||||
|
|
||||||
|
--VERTICAL
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_HI", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
|
||||||
|
dict.pinport( "CTL_SET_LO", "GBP")
|
||||||
|
dict.pinport( "ADDR_SET", 1)
|
||||||
|
dict.pinport( "ADDR_SET", 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- global variables so other modules can use them
|
||||||
|
|
||||||
|
|
||||||
|
-- call functions desired to run when script is called/imported
|
||||||
|
|
||||||
|
|
||||||
|
-- functions other modules are able to call
|
||||||
|
ciccom.start = start
|
||||||
|
ciccom.set_opcode = set_opcode
|
||||||
|
ciccom.write = write
|
||||||
|
ciccom.wotf = wotf
|
||||||
|
ciccom.rotf = rotf
|
||||||
|
|
||||||
|
-- return the module's table
|
||||||
|
return ciccom
|
||||||
|
|
@ -361,6 +361,213 @@ local function snes( opcode, operand, misc, data )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- external call for gameboy dictionary
|
||||||
|
local function gameboy( opcode, operand, misc, data )
|
||||||
|
|
||||||
|
if not op_gameboy[opcode] then
|
||||||
|
print("ERROR undefined opcode:", opcode, "must be defined in shared_dict_gameboy.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if not operand then
|
||||||
|
operand = 0
|
||||||
|
elseif type(operand) == "string" then
|
||||||
|
if not op_gameboy[operand] then
|
||||||
|
print("ERROR undefined operand:", operand, "must be defined in shared_dict_gameboy.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
--decode string operands into
|
||||||
|
operand = op_gameboy[operand]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not misc then misc = 0 end
|
||||||
|
|
||||||
|
local wLength, ep = default_rlen_1_in(op_gameboy[opcode.."rlen"])
|
||||||
|
|
||||||
|
local count
|
||||||
|
count, data = usb_vend_xfr(
|
||||||
|
-- ep, dictionary wValue[misc:opcode] wIndex wLength data
|
||||||
|
ep, dict["DICT_GAMEBOY"], ( misc<<8 | op_gameboy[opcode]), operand, wLength, data)
|
||||||
|
--print(count)
|
||||||
|
local error_code, data_len
|
||||||
|
if ep == USB_IN then
|
||||||
|
error_code = data:byte(RETURN_ERR_IDX)
|
||||||
|
data_len = data:byte(RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
--print("error:", error_code, "data_len:", data_len)
|
||||||
|
|
||||||
|
assert ( (error_code == err_codes["SUCCESS"]), "\n ERROR!!! problem with opcode: " .. opcode .. " device error code: " .. error_code)
|
||||||
|
|
||||||
|
if data_len and data_len ~= (wLength - RETURN_LEN_IDX) then
|
||||||
|
print("WARNING!! Device's return data length:", data_len, "did not match expected:", wLength-RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
|
||||||
|
--process the return data string and return it to calling function
|
||||||
|
if data_len then
|
||||||
|
return string_to_int( data:sub(RETURN_DATA, data_len+RETURN_DATA), data_len)
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- external call for gba dictionary
|
||||||
|
local function gba( opcode, operand, misc, data )
|
||||||
|
|
||||||
|
if not op_gba[opcode] then
|
||||||
|
print("ERROR undefined opcode:", opcode, "must be defined in shared_dict_gba.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if not operand then
|
||||||
|
operand = 0
|
||||||
|
elseif type(operand) == "string" then
|
||||||
|
if not op_gba[operand] then
|
||||||
|
print("ERROR undefined operand:", operand, "must be defined in shared_dict_gba.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
--decode string operands into
|
||||||
|
operand = op_gba[operand]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not misc then misc = 0 end
|
||||||
|
|
||||||
|
local wLength, ep = default_rlen_1_in(op_gba[opcode.."rlen"])
|
||||||
|
|
||||||
|
local count
|
||||||
|
count, data = usb_vend_xfr(
|
||||||
|
-- ep, dictionary wValue[misc:opcode] wIndex wLength data
|
||||||
|
ep, dict["DICT_GBA"], ( misc<<8 | op_gba[opcode]), operand, wLength, data)
|
||||||
|
--print(count)
|
||||||
|
local error_code, data_len
|
||||||
|
if ep == USB_IN then
|
||||||
|
error_code = data:byte(RETURN_ERR_IDX)
|
||||||
|
data_len = data:byte(RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
--print("error:", error_code, "data_len:", data_len)
|
||||||
|
|
||||||
|
assert ( (error_code == err_codes["SUCCESS"]), "\n ERROR!!! problem with opcode: " .. opcode .. " device error code: " .. error_code)
|
||||||
|
|
||||||
|
if data_len and data_len ~= (wLength - RETURN_LEN_IDX) then
|
||||||
|
print("WARNING!! Device's return data length:", data_len, "did not match expected:", wLength-RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
|
||||||
|
--process the return data string and return it to calling function
|
||||||
|
if data_len then
|
||||||
|
return string_to_int( data:sub(RETURN_DATA, data_len+RETURN_DATA), data_len)
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- external call for sega dictionary
|
||||||
|
local function sega( opcode, operand, misc, data )
|
||||||
|
|
||||||
|
if not op_sega[opcode] then
|
||||||
|
print("ERROR undefined opcode:", opcode, "must be defined in shared_dict_sega.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if not operand then
|
||||||
|
operand = 0
|
||||||
|
elseif type(operand) == "string" then
|
||||||
|
if not op_sega[operand] then
|
||||||
|
print("ERROR undefined operand:", operand, "must be defined in shared_dict_sega.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
--decode string operands into
|
||||||
|
operand = op_sega[operand]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not misc then misc = 0 end
|
||||||
|
|
||||||
|
local wLength, ep = default_rlen_1_in(op_sega[opcode.."rlen"])
|
||||||
|
|
||||||
|
local count
|
||||||
|
count, data = usb_vend_xfr(
|
||||||
|
-- ep, dictionary wValue[misc:opcode] wIndex wLength data
|
||||||
|
ep, dict["DICT_SEGA"], ( misc<<8 | op_sega[opcode]), operand, wLength, data)
|
||||||
|
--print(count)
|
||||||
|
local error_code, data_len
|
||||||
|
if ep == USB_IN then
|
||||||
|
error_code = data:byte(RETURN_ERR_IDX)
|
||||||
|
data_len = data:byte(RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
--print("error:", error_code, "data_len:", data_len)
|
||||||
|
|
||||||
|
assert ( (error_code == err_codes["SUCCESS"]), "\n ERROR!!! problem with opcode: " .. opcode .. " device error code: " .. error_code)
|
||||||
|
|
||||||
|
if data_len and data_len ~= (wLength - RETURN_LEN_IDX) then
|
||||||
|
print("WARNING!! Device's return data length:", data_len, "did not match expected:", wLength-RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
|
||||||
|
--process the return data string and return it to calling function
|
||||||
|
if data_len then
|
||||||
|
return string_to_int( data:sub(RETURN_DATA, data_len+RETURN_DATA), data_len)
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- external call for n64 dictionary
|
||||||
|
local function n64( opcode, operand, misc, data )
|
||||||
|
|
||||||
|
if not op_n64[opcode] then
|
||||||
|
print("ERROR undefined opcode:", opcode, "must be defined in shared_dict_n64.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if not operand then
|
||||||
|
operand = 0
|
||||||
|
elseif type(operand) == "string" then
|
||||||
|
if not op_n64[operand] then
|
||||||
|
print("ERROR undefined operand:", operand, "must be defined in shared_dict_n64.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
--decode string operands into
|
||||||
|
operand = op_n64[operand]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not misc then misc = 0 end
|
||||||
|
|
||||||
|
local wLength, ep = default_rlen_1_in(op_n64[opcode.."rlen"])
|
||||||
|
|
||||||
|
local count
|
||||||
|
count, data = usb_vend_xfr(
|
||||||
|
-- ep, dictionary wValue[misc:opcode] wIndex wLength data
|
||||||
|
ep, dict["DICT_N64"], ( misc<<8 | op_n64[opcode]), operand, wLength, data)
|
||||||
|
--print(count)
|
||||||
|
local error_code, data_len
|
||||||
|
if ep == USB_IN then
|
||||||
|
error_code = data:byte(RETURN_ERR_IDX)
|
||||||
|
data_len = data:byte(RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
--print("error:", error_code, "data_len:", data_len)
|
||||||
|
|
||||||
|
assert ( (error_code == err_codes["SUCCESS"]), "\n ERROR!!! problem with opcode: " .. opcode .. " device error code: " .. error_code)
|
||||||
|
|
||||||
|
if data_len and data_len ~= (wLength - RETURN_LEN_IDX) then
|
||||||
|
print("WARNING!! Device's return data length:", data_len, "did not match expected:", wLength-RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
|
||||||
|
--process the return data string and return it to calling function
|
||||||
|
if data_len then
|
||||||
|
return string_to_int( data:sub(RETURN_DATA, data_len+RETURN_DATA), data_len)
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- external call for swim dictionary
|
-- external call for swim dictionary
|
||||||
|
|
@ -471,6 +678,112 @@ local function jtag( opcode, operand, misc, data )
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- external call for bootload dictionary
|
||||||
|
local function bootload( opcode, operand, misc, data )
|
||||||
|
|
||||||
|
if not op_bootload[opcode] then
|
||||||
|
print("ERROR undefined opcode:", opcode, "must be defined in shared_dict_bootload.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if not operand then
|
||||||
|
operand = 0
|
||||||
|
elseif type(operand) == "string" then
|
||||||
|
if not op_bootload[operand] then
|
||||||
|
print("ERROR undefined operand:", operand, "must be defined in shared_dict_bootload.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
--decode string operands into
|
||||||
|
operand = op_bootload[operand]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not misc then misc = 0 end
|
||||||
|
|
||||||
|
local wLength, ep = default_rlen_1_in(op_bootload[opcode.."rlen"])
|
||||||
|
|
||||||
|
local count
|
||||||
|
count, data = usb_vend_xfr(
|
||||||
|
-- ep, dictionary wValue[misc:opcode] wIndex wLength data
|
||||||
|
ep, dict["DICT_BOOTLOAD"], ( misc<<8 | op_bootload[opcode]), operand, wLength, data)
|
||||||
|
--print(count)
|
||||||
|
local error_code, data_len
|
||||||
|
if ep == USB_IN then
|
||||||
|
error_code = data:byte(RETURN_ERR_IDX)
|
||||||
|
data_len = data:byte(RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
--print("error:", error_code, "data_len:", data_len)
|
||||||
|
|
||||||
|
assert ( (error_code == err_codes["SUCCESS"]), "\n ERROR!!! problem with opcode: " .. opcode .. " device error code: " .. error_code)
|
||||||
|
|
||||||
|
if data_len and data_len ~= (wLength - RETURN_LEN_IDX) then
|
||||||
|
print("WARNING!! Device's return data length:", data_len, "did not match expected:", wLength-RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
|
||||||
|
--process the return data string and return it to calling function
|
||||||
|
if data_len then
|
||||||
|
return string_to_int( data:sub(RETURN_DATA, data_len+RETURN_DATA), data_len)
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- external call for ciccom dictionary
|
||||||
|
local function ciccom( opcode, operand, misc, data )
|
||||||
|
|
||||||
|
if not op_ciccom[opcode] then
|
||||||
|
print("ERROR undefined opcode:", opcode, "must be defined in shared_dict_ciccom.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if not operand then
|
||||||
|
operand = 0
|
||||||
|
elseif type(operand) == "string" then
|
||||||
|
if not op_ciccom[operand] then
|
||||||
|
print("ERROR undefined operand:", operand, "must be defined in shared_dict_ciccom.h")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
--decode string operands into
|
||||||
|
operand = op_ciccom[operand]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not misc then misc = 0 end
|
||||||
|
|
||||||
|
local wLength, ep = default_rlen_1_in(op_ciccom[opcode.."rlen"])
|
||||||
|
|
||||||
|
local count
|
||||||
|
count, data = usb_vend_xfr(
|
||||||
|
-- ep, dictionary wValue[misc:opcode] wIndex wLength data
|
||||||
|
ep, dict["DICT_CICCOM"], ( misc<<8 | op_ciccom[opcode]), operand, wLength, data)
|
||||||
|
--print(count)
|
||||||
|
local error_code, data_len
|
||||||
|
if ep == USB_IN then
|
||||||
|
error_code = data:byte(RETURN_ERR_IDX)
|
||||||
|
data_len = data:byte(RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
--print("error:", error_code, "data_len:", data_len)
|
||||||
|
|
||||||
|
assert ( (error_code == err_codes["SUCCESS"]), "\n ERROR!!! problem with opcode: " .. opcode .. " device error code: " .. error_code)
|
||||||
|
|
||||||
|
if data_len and data_len ~= (wLength - RETURN_LEN_IDX) then
|
||||||
|
print("WARNING!! Device's return data length:", data_len, "did not match expected:", wLength-RETURN_LEN_IDX)
|
||||||
|
end
|
||||||
|
|
||||||
|
--process the return data string and return it to calling function
|
||||||
|
if data_len then
|
||||||
|
return string_to_int( data:sub(RETURN_DATA, data_len+RETURN_DATA), data_len)
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function buffer_payload_in( wLength, buff_num )
|
local function buffer_payload_in( wLength, buff_num )
|
||||||
|
|
@ -646,8 +959,14 @@ op_io = {}
|
||||||
op_operation = {}
|
op_operation = {}
|
||||||
op_nes = {}
|
op_nes = {}
|
||||||
op_snes = {}
|
op_snes = {}
|
||||||
|
op_gameboy = {}
|
||||||
|
op_gba = {}
|
||||||
|
op_sega = {}
|
||||||
|
op_n64 = {}
|
||||||
op_swim = {}
|
op_swim = {}
|
||||||
op_jtag = {}
|
op_jtag = {}
|
||||||
|
op_bootload = {}
|
||||||
|
op_ciccom = {}
|
||||||
err_codes = {}
|
err_codes = {}
|
||||||
|
|
||||||
-- Dictionary table definitions initialized by calling parser
|
-- Dictionary table definitions initialized by calling parser
|
||||||
|
|
@ -659,8 +978,14 @@ create_dict_tables( op_io, "../shared/shared_dict_io.h")
|
||||||
create_dict_tables( op_operation, "../shared/shared_dict_operation.h")
|
create_dict_tables( op_operation, "../shared/shared_dict_operation.h")
|
||||||
create_dict_tables( op_nes, "../shared/shared_dict_nes.h")
|
create_dict_tables( op_nes, "../shared/shared_dict_nes.h")
|
||||||
create_dict_tables( op_snes, "../shared/shared_dict_snes.h")
|
create_dict_tables( op_snes, "../shared/shared_dict_snes.h")
|
||||||
|
create_dict_tables( op_gameboy, "../shared/shared_dict_gameboy.h")
|
||||||
|
create_dict_tables( op_gba, "../shared/shared_dict_gba.h")
|
||||||
|
create_dict_tables( op_sega, "../shared/shared_dict_sega.h")
|
||||||
|
create_dict_tables( op_n64, "../shared/shared_dict_n64.h")
|
||||||
create_dict_tables( op_swim, "../shared/shared_dict_swim.h")
|
create_dict_tables( op_swim, "../shared/shared_dict_swim.h")
|
||||||
create_dict_tables( op_jtag, "../shared/shared_dict_jtag.h")
|
create_dict_tables( op_jtag, "../shared/shared_dict_jtag.h")
|
||||||
|
create_dict_tables( op_bootload,"../shared/shared_dict_bootload.h")
|
||||||
|
create_dict_tables( op_ciccom, "../shared/shared_dict_ciccom.h")
|
||||||
create_dict_tables( err_codes, "../shared/shared_errors.h")
|
create_dict_tables( err_codes, "../shared/shared_errors.h")
|
||||||
|
|
||||||
-- functions other modules are able to call
|
-- functions other modules are able to call
|
||||||
|
|
@ -668,8 +993,14 @@ dict.pinport = pinport
|
||||||
dict.io = io
|
dict.io = io
|
||||||
dict.nes = nes
|
dict.nes = nes
|
||||||
dict.snes = snes
|
dict.snes = snes
|
||||||
|
dict.gameboy = gameboy
|
||||||
|
dict.gba = gba
|
||||||
|
dict.sega = sega
|
||||||
|
dict.n64 = n64
|
||||||
dict.swim = swim
|
dict.swim = swim
|
||||||
dict.jtag = jtag
|
dict.jtag = jtag
|
||||||
|
dict.bootload = bootload
|
||||||
|
dict.ciccom = ciccom
|
||||||
dict.buffer = buffer
|
dict.buffer = buffer
|
||||||
dict.buffer_payload_in = buffer_payload_in
|
dict.buffer_payload_in = buffer_payload_in
|
||||||
dict.buffer_payload_out = buffer_payload_out
|
dict.buffer_payload_out = buffer_payload_out
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,8 @@ local function read_stack()
|
||||||
--STM8 stack starts at $0200 which is where the CIC version
|
--STM8 stack starts at $0200 which is where the CIC version
|
||||||
--and other special data is placed starting with v2.0
|
--and other special data is placed starting with v2.0
|
||||||
local stack_start = 0x0200
|
local stack_start = 0x0200
|
||||||
local last_char = 73
|
-- local last_char = 73 --73 end of copyright
|
||||||
|
local last_char = 74 --mirroring bit
|
||||||
local ack
|
local ack
|
||||||
local data = {}
|
local data = {}
|
||||||
|
|
||||||
|
|
@ -331,6 +332,7 @@ local function read_stack()
|
||||||
local j = 1
|
local j = 1
|
||||||
while data[j] do
|
while data[j] do
|
||||||
io.write(string.char(data[j]))
|
io.write(string.char(data[j]))
|
||||||
|
--io.write("B-",j,"=",data[j], " ")
|
||||||
j = j+1
|
j = j+1
|
||||||
end
|
end
|
||||||
print("\n")
|
print("\n")
|
||||||
|
|
@ -342,7 +344,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function start( debug )
|
local function start( debug, noreset )
|
||||||
|
|
||||||
--dict.io("IO_RESET")
|
--dict.io("IO_RESET")
|
||||||
|
|
||||||
|
|
@ -376,8 +378,15 @@ local function start( debug )
|
||||||
--by default there is now a breakpoint set at reset vector
|
--by default there is now a breakpoint set at reset vector
|
||||||
|
|
||||||
--reset the STM8 core
|
--reset the STM8 core
|
||||||
-- dict.swim("SWIM_SRST")
|
dict.swim("SWIM_SRST")
|
||||||
system_reset( true )
|
--optionally reset core below, but not of much use since a ROP enabled device
|
||||||
|
--will reset once SWIM comms initiate rotf/wotf
|
||||||
|
--if(noreset ~= true) then
|
||||||
|
-- if debug then print("RESETTING STM8 CPU") end
|
||||||
|
-- system_reset( true )
|
||||||
|
--else
|
||||||
|
-- if debug then print("STM8 CPU WASN'T reset during activation") end
|
||||||
|
--end
|
||||||
|
|
||||||
--the STM8 core is now stalled @ reset vector
|
--the STM8 core is now stalled @ reset vector
|
||||||
--can read/write to any address on STM8 core
|
--can read/write to any address on STM8 core
|
||||||
|
|
@ -401,6 +410,7 @@ local function start( debug )
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function printCSR()
|
local function printCSR()
|
||||||
print(cur_CSR)
|
print(cur_CSR)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,17 @@ function main ()
|
||||||
local cart = require "scripts.app.cart"
|
local cart = require "scripts.app.cart"
|
||||||
local nes = require "scripts.app.nes"
|
local nes = require "scripts.app.nes"
|
||||||
local snes = require "scripts.app.snes"
|
local snes = require "scripts.app.snes"
|
||||||
|
-- local gameboy = require "scripts.app.gameboy"
|
||||||
|
-- local gba = require "scripts.app.gba"
|
||||||
|
-- local sega = require "scripts.app.sega"
|
||||||
|
-- local n64 = require "scripts.app.n64"
|
||||||
local dump = require "scripts.app.dump"
|
local dump = require "scripts.app.dump"
|
||||||
local erase = require "scripts.app.erase"
|
local erase = require "scripts.app.erase"
|
||||||
local flash = require "scripts.app.flash"
|
local flash = require "scripts.app.flash"
|
||||||
local swim = require "scripts.app.swim"
|
local swim = require "scripts.app.swim"
|
||||||
local jtag = require "scripts.app.jtag"
|
local jtag = require "scripts.app.jtag"
|
||||||
|
local ciccom = require "scripts.app.ciccom"
|
||||||
|
-- local bootload = require "scripts.app.bootload"
|
||||||
-- local crc32 = require "scripts.app.crc32"
|
-- local crc32 = require "scripts.app.crc32"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -25,7 +31,7 @@ function main ()
|
||||||
--local curcart = require "scripts.nes.mmc1"
|
--local curcart = require "scripts.nes.mmc1"
|
||||||
--local curcart = require "scripts.nes.unrom"
|
--local curcart = require "scripts.nes.unrom"
|
||||||
--local curcart = require "scripts.nes.mm2"
|
--local curcart = require "scripts.nes.mm2"
|
||||||
--local curcart = require "scripts.nes.mapper30"
|
local curcart = require "scripts.nes.mapper30"
|
||||||
--local curcart = require "scripts.nes.bnrom"
|
--local curcart = require "scripts.nes.bnrom"
|
||||||
--local curcart = require "scripts.nes.cdream"
|
--local curcart = require "scripts.nes.cdream"
|
||||||
--local curcart = require "scripts.nes.cninja"
|
--local curcart = require "scripts.nes.cninja"
|
||||||
|
|
@ -33,7 +39,7 @@ function main ()
|
||||||
--local curcart = require "scripts.nes.action53_tsop"
|
--local curcart = require "scripts.nes.action53_tsop"
|
||||||
--local curcart = require "scripts.nes.easyNSF"
|
--local curcart = require "scripts.nes.easyNSF"
|
||||||
--local curcart = require "scripts.nes.dualport"
|
--local curcart = require "scripts.nes.dualport"
|
||||||
local curcart = require "scripts.snes.v3"
|
--local curcart = require "scripts.snes.v3"
|
||||||
|
|
||||||
local rv
|
local rv
|
||||||
-- rv = dict.pinport( "DATA_SET", 0xAA )
|
-- rv = dict.pinport( "DATA_SET", 0xAA )
|
||||||
|
|
@ -65,6 +71,19 @@ function main ()
|
||||||
-- print(dict.io("EXP0_PULLUP_TEST"))
|
-- print(dict.io("EXP0_PULLUP_TEST"))
|
||||||
--
|
--
|
||||||
|
|
||||||
|
--BOOTLOADER TEST
|
||||||
|
--print("jumping...")
|
||||||
|
|
||||||
|
--jump to 0xDEADBEEF
|
||||||
|
--dict.bootload("LOAD_ADDRH", 0xDEAD)
|
||||||
|
--dict.bootload("JUMP_ADDR", 0xBEEF) --for ARM LSbit must be odd (Thumb mode)
|
||||||
|
-- dict.bootload("LOAD_ADDRH", 0x1FFF)
|
||||||
|
-- dict.bootload("JUMP_ADDR", 0xCAC5)
|
||||||
|
-- dict.bootload("LOAD_ADDRH", 0x0800)
|
||||||
|
-- dict.bootload("JUMP_ADDR", 0x00C1)
|
||||||
|
|
||||||
|
--dict.bootload("JUMP_BL")
|
||||||
|
--print("jumped")
|
||||||
|
|
||||||
-- debug = true
|
-- debug = true
|
||||||
-- rv = cart.detect(debug)
|
-- rv = cart.detect(debug)
|
||||||
|
|
@ -78,16 +97,17 @@ function main ()
|
||||||
--PROCESS USER ARGS ON WHAT IS TO BE DONE WITH CART
|
--PROCESS USER ARGS ON WHAT IS TO BE DONE WITH CART
|
||||||
|
|
||||||
local force_cart = true
|
local force_cart = true
|
||||||
cart_console = "SNES"
|
cart_console = "NES"
|
||||||
|
|
||||||
if (force_cart or cart.detect_console(true)) then
|
if (force_cart or cart.detect_console(true)) then
|
||||||
if cart_console == "NES" or cart_console == "Famicom" then
|
if cart_console == "NES" or cart_console == "Famicom" then
|
||||||
dict.io("IO_RESET")
|
dict.io("IO_RESET")
|
||||||
dict.io("NES_INIT")
|
dict.io("NES_INIT")
|
||||||
|
|
||||||
--[[
|
---[[
|
||||||
--NES detect mirroring to gain mapper info
|
--NES detect mirroring to gain mapper info
|
||||||
nes.detect_mapper_mirroring(true)
|
nes.detect_mapper_mirroring(true)
|
||||||
|
--[[
|
||||||
--NES detect memories to gain more mapper/board info
|
--NES detect memories to gain more mapper/board info
|
||||||
--check for CHR-RAM
|
--check for CHR-RAM
|
||||||
nes.ppu_ram_sense(0x1000, true)
|
nes.ppu_ram_sense(0x1000, true)
|
||||||
|
|
@ -159,9 +179,27 @@ function main ()
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
--[[
|
---[[
|
||||||
|
|
||||||
|
|
||||||
|
ciccom.start()
|
||||||
|
ciccom.set_opcode("M")
|
||||||
|
--now send operand "V" (0x56) or "H" (0x48)
|
||||||
|
ciccom.write("H")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dict.io("IO_RESET")
|
||||||
|
jtag.sleep(0.01) --10msec to be overly safe
|
||||||
|
|
||||||
|
|
||||||
|
---[[
|
||||||
|
--the CIC won't update the H/V stack flag unless it's reset
|
||||||
|
--reset caused during swim init doesn't count either bc it halts at reset vector
|
||||||
|
|
||||||
--test reading back CIC version
|
--test reading back CIC version
|
||||||
dict.io("SWIM_INIT", "SWIM_ON_A0")
|
dict.io("SWIM_INIT", "SWIM_ON_A0")
|
||||||
|
--dict.io("SWIM_INIT", "SWIM_ON_EXP0")
|
||||||
if swim.start(true) then
|
if swim.start(true) then
|
||||||
|
|
||||||
swim.read_stack()
|
swim.read_stack()
|
||||||
|
|
@ -169,6 +207,7 @@ function main ()
|
||||||
else
|
else
|
||||||
print("ERROR trying to read back CIC signature stack data")
|
print("ERROR trying to read back CIC signature stack data")
|
||||||
end
|
end
|
||||||
|
swim.stop_and_reset()
|
||||||
|
|
||||||
print("done reading STM8 stack on A0\n")
|
print("done reading STM8 stack on A0\n")
|
||||||
|
|
||||||
|
|
@ -190,6 +229,7 @@ function main ()
|
||||||
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/Zelda2.bin", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/Zelda2.bin", "ignore/verifyout.bin")
|
||||||
|
|
||||||
--UxROM
|
--UxROM
|
||||||
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/AFB_128.prg", "ignore/verifyout.bin")
|
||||||
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/nomolosFINAL.prg", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/nomolosFINAL.prg", "ignore/verifyout.bin")
|
||||||
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/owlia_revb.prg", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/owlia_revb.prg", "ignore/verifyout.bin")
|
||||||
--curcart.process( true, false, false, false, false, "ignore/dump.bin", "ignore/rushnattack.prg", "ignore/verifyout.bin")
|
--curcart.process( true, false, false, false, false, "ignore/dump.bin", "ignore/rushnattack.prg", "ignore/verifyout.bin")
|
||||||
|
|
@ -200,7 +240,9 @@ function main ()
|
||||||
--curcart.process( true, true, false, false, false, "ignore/dump.bin", "ignore/mm2_i0.prg", "ignore/verifyout.bin")
|
--curcart.process( true, true, false, false, false, "ignore/dump.bin", "ignore/mm2_i0.prg", "ignore/verifyout.bin")
|
||||||
|
|
||||||
--UNROM512 mapper 30
|
--UNROM512 mapper 30
|
||||||
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/MysticOrigins.prg", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/BBC_nonJW.bin", "ignore/verifyout.bin")
|
||||||
|
curcart.process( true, false, false, false, false, "ignore/dump.bin", "ignore/MysticOrigins.prg", "ignore/verifyout.bin")
|
||||||
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/NESmaker.nes", "ignore/verifyout.bin")
|
||||||
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/tb_map30.prg", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/tb_map30.prg", "ignore/verifyout.bin")
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -266,8 +308,9 @@ function main ()
|
||||||
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/MMXdump.bin", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/MMXdump.bin", "ignore/verifyout.bin")
|
||||||
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/smw.sfc", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/smw.sfc", "ignore/verifyout.bin")
|
||||||
--curcart.process( true, true, false, false, false, "ignore/dump.bin", "ignore/hsbm_4Mbit_Lo.sfc", "ignore/verifyout.bin")
|
--curcart.process( true, true, false, false, false, "ignore/dump.bin", "ignore/hsbm_4Mbit_Lo.sfc", "ignore/verifyout.bin")
|
||||||
curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/hsbm_4Mbit_Lo.sfc", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/hsbm_4Mbit_Lo.sfc", "ignore/verifyout.bin")
|
||||||
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/hsbm_4Mbit_Hi.sfc", "ignore/verifyout.bin")
|
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/hsbm_4Mbit_Hi.sfc", "ignore/verifyout.bin")
|
||||||
|
curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/hsbm_32Mbit_Hi.sfc", "ignore/verifyout.bin")
|
||||||
|
|
||||||
|
|
||||||
-- --old SNES code
|
-- --old SNES code
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ local function write_gift(base, off)
|
||||||
--local msg1 = "Regular Edition"
|
--local msg1 = "Regular Edition"
|
||||||
--local msg1 = "Contributor Edition"
|
--local msg1 = "Contributor Edition"
|
||||||
local msg1 = "Limited Edition"
|
local msg1 = "Limited Edition"
|
||||||
local msg2 = "100 of 100" -- all flashed
|
local msg2 = "82 of 100" -- all flashed
|
||||||
|
|
||||||
--local msg1 = " Contributor Edition "
|
--local msg1 = " Contributor Edition "
|
||||||
--local msg2 = " PinoBatch " --issue if capital P or R is first char for some reason..
|
--local msg2 = " PinoBatch " --issue if capital P or R is first char for some reason..
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
|
|
||||||
local rv = nil
|
local rv = nil
|
||||||
local file
|
local file
|
||||||
|
local size = 512
|
||||||
|
--local filetype = "nes"
|
||||||
|
local filetype = "bin"
|
||||||
|
|
||||||
--initialize device i/o for NES
|
--initialize device i/o for NES
|
||||||
dict.io("IO_RESET")
|
dict.io("IO_RESET")
|
||||||
|
|
@ -58,11 +61,59 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
|
|
||||||
--test cart by reading manf/prod ID
|
--test cart by reading manf/prod ID
|
||||||
if test then
|
if test then
|
||||||
|
print("mapper 30")
|
||||||
nes.detect_mapper_mirroring(true)
|
nes.detect_mapper_mirroring(true)
|
||||||
nes.ppu_ram_sense(0x1000, true)
|
nes.ppu_ram_sense(0x1000, true)
|
||||||
print("EXP0 pull-up test:", dict.io("EXP0_PULLUP_TEST"))
|
print("EXP0 pull-up test:", dict.io("EXP0_PULLUP_TEST"))
|
||||||
|
|
||||||
prgrom_manf_id( debug )
|
prgrom_manf_id( debug )
|
||||||
|
|
||||||
|
--test CHR-RAM banking
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x00) --CHR bank 0
|
||||||
|
dict.nes("NES_PPU_WR", 0x0000, 0xAA)
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x20) --CHR bank 1
|
||||||
|
dict.nes("NES_PPU_WR", 0x0000, 0x55)
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x40) --CHR bank 2
|
||||||
|
dict.nes("NES_PPU_WR", 0x0000, 0xCC)
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x60) --CHR bank 3
|
||||||
|
dict.nes("NES_PPU_WR", 0x0000, 0x33)
|
||||||
|
|
||||||
|
--read back
|
||||||
|
local test = true
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x00) --CHR bank 0
|
||||||
|
rv = dict.nes("NES_PPU_RD", 0x0000)
|
||||||
|
if rv ~= 0xAA then
|
||||||
|
print( "\nFAIL CHR-RAM BANKING TEST!!!\n")
|
||||||
|
print("bank0 read:", string.format("%X", rv))
|
||||||
|
test = false
|
||||||
|
end
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x20) --CHR bank 1
|
||||||
|
rv = dict.nes("NES_PPU_RD", 0x0000)
|
||||||
|
if rv ~= 0x55 then
|
||||||
|
print( "\nFAIL CHR-RAM BANKING TEST!!!\n")
|
||||||
|
print("bank1 read:", string.format("%X", rv))
|
||||||
|
test = false
|
||||||
|
end
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x40) --CHR bank 2
|
||||||
|
rv = dict.nes("NES_PPU_RD", 0x0000)
|
||||||
|
if rv ~= 0xCC then
|
||||||
|
print( "\nFAIL CHR-RAM BANKING TEST!!!\n")
|
||||||
|
print("bank2 read:", string.format("%X", rv))
|
||||||
|
test = false
|
||||||
|
end
|
||||||
|
dict.nes("NES_CPU_WR", 0xC000, 0x60) --CHR bank 3
|
||||||
|
rv = dict.nes("NES_PPU_RD", 0x0000)
|
||||||
|
if rv ~= 0x33 then
|
||||||
|
print( "\nFAIL CHR-RAM BANKING TEST!!!\n")
|
||||||
|
print("bank3 read:", string.format("%X", rv))
|
||||||
|
test = false
|
||||||
|
end
|
||||||
|
|
||||||
|
if test then
|
||||||
|
print("CHR-RAM BANKING TEST PASSED")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--dump the cart to dumpfile
|
--dump the cart to dumpfile
|
||||||
|
|
@ -70,7 +121,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
file = assert(io.open(dumpfile, "wb"))
|
file = assert(io.open(dumpfile, "wb"))
|
||||||
|
|
||||||
--dump cart into file
|
--dump cart into file
|
||||||
dump.dumptofile( file, 512, "MAP30", "PRGROM", true )
|
dump.dumptofile( file, size, "MAP30", "PRGROM", true )
|
||||||
|
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
@ -124,10 +175,26 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
file = assert(io.open(flashfile, "rb"))
|
file = assert(io.open(flashfile, "rb"))
|
||||||
--determine if auto-doubling, deinterleaving, etc,
|
--determine if auto-doubling, deinterleaving, etc,
|
||||||
--needs done to make board compatible with rom
|
--needs done to make board compatible with rom
|
||||||
|
|
||||||
|
|
||||||
|
if filetype == "nes" then
|
||||||
|
--advance past the 16byte header
|
||||||
|
--TODO set mirroring bit via ciccom
|
||||||
|
local buffsize = 1
|
||||||
|
local byte
|
||||||
|
local count = 1
|
||||||
|
|
||||||
|
for byte in file:lines(buffsize) do
|
||||||
|
local data = string.unpack("B", byte, 1)
|
||||||
|
--print(string.format("%X", data))
|
||||||
|
count = count + 1
|
||||||
|
if count == 17 then break end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--flash cart
|
--flash cart
|
||||||
flash.write_file( file, 512, "MAP30", "PRGROM", true )
|
flash.write_file( file, size, "MAP30", "PRGROM", true )
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
||||||
|
|
@ -140,7 +207,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
file = assert(io.open(verifyfile, "wb"))
|
file = assert(io.open(verifyfile, "wb"))
|
||||||
|
|
||||||
--dump cart into file
|
--dump cart into file
|
||||||
dump.dumptofile( file, 512, "MAP30", "PRGROM", true )
|
dump.dumptofile( file, size, "MAP30", "PRGROM", true )
|
||||||
|
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
|
|
||||||
local rv = nil
|
local rv = nil
|
||||||
local file
|
local file
|
||||||
|
local size = 128
|
||||||
|
|
||||||
--initialize device i/o for NES
|
--initialize device i/o for NES
|
||||||
dict.io("IO_RESET")
|
dict.io("IO_RESET")
|
||||||
|
|
@ -125,7 +126,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
|
|
||||||
--TODO find bank table to avoid bus conflicts!
|
--TODO find bank table to avoid bus conflicts!
|
||||||
--dump cart into file
|
--dump cart into file
|
||||||
dump.dumptofile( file, 512, "UxROM", "PRGROM", true )
|
dump.dumptofile( file, size, "UxROM", "PRGROM", true )
|
||||||
|
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
@ -174,14 +175,16 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
--Nomolos' bank table is at $CC84 so hard code that for now
|
--Nomolos' bank table is at $CC84 so hard code that for now
|
||||||
--wr_bank_table(0xCC84, 32)
|
--wr_bank_table(0xCC84, 32)
|
||||||
--Owlia bank table
|
--Owlia bank table
|
||||||
wr_bank_table(0xE473, 32)
|
--wr_bank_table(0xE473, 32)
|
||||||
--rushnattack
|
--rushnattack
|
||||||
--wr_bank_table(0x8000, 8)
|
--wr_bank_table(0x8000, 8)
|
||||||
--twindragons
|
--twindragons
|
||||||
--wr_bank_table(0xC000, 32)
|
--wr_bank_table(0xC000, 32)
|
||||||
|
--Armed for Battle
|
||||||
|
wr_bank_table(0xFD69, 8)
|
||||||
|
|
||||||
--flash cart
|
--flash cart
|
||||||
flash.write_file( file, 512, "UxROM", "PRGROM", true )
|
flash.write_file( file, size, "UxROM", "PRGROM", true )
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
||||||
|
|
@ -194,7 +197,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
file = assert(io.open(verifyfile, "wb"))
|
file = assert(io.open(verifyfile, "wb"))
|
||||||
|
|
||||||
--dump cart into file
|
--dump cart into file
|
||||||
dump.dumptofile( file, 512, "UxROM", "PRGROM", true )
|
dump.dumptofile( file, size, "UxROM", "PRGROM", true )
|
||||||
|
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
|
||||||
|
|
@ -113,12 +113,21 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
dict.io("IO_RESET")
|
dict.io("IO_RESET")
|
||||||
dict.io("SNES_INIT")
|
dict.io("SNES_INIT")
|
||||||
|
|
||||||
|
-- local snes_mapping = "LOROM"
|
||||||
|
local snes_mapping = "HIROM"
|
||||||
|
-- local rom_size = 512
|
||||||
|
-- local rom_size = 1024
|
||||||
|
-- local rom_size = 2048
|
||||||
|
local rom_size = 4096
|
||||||
|
-- local rom_size = 8192
|
||||||
|
-- local rom_size = 12288
|
||||||
|
-- local rom_size = 16384
|
||||||
|
|
||||||
--test cart by reading manf/prod ID
|
--test cart by reading manf/prod ID
|
||||||
if test then
|
if test then
|
||||||
|
|
||||||
--SNES detect HiROM or LoROM
|
--SNES detect HiROM or LoROM
|
||||||
--nes.detect_mapper_mirroring(true)
|
--nes.detect_mapper_mirroring(true)
|
||||||
local snes_mapping = "LOROM"
|
|
||||||
--SNES detect if there's save ram and size
|
--SNES detect if there's save ram and size
|
||||||
|
|
||||||
--SNES detect if able to read flash ID's
|
--SNES detect if able to read flash ID's
|
||||||
|
|
@ -148,13 +157,13 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
--dump the cart to dumpfile
|
--dump the cart to dumpfile
|
||||||
if read then
|
if read then
|
||||||
--initialize the mapper for dumping
|
--initialize the mapper for dumping
|
||||||
init_mapper(debug)
|
--init_mapper(debug)
|
||||||
|
|
||||||
file = assert(io.open(dumpfile, "wb"))
|
file = assert(io.open(dumpfile, "wb"))
|
||||||
|
|
||||||
--TODO find bank table to avoid bus conflicts!
|
--TODO find bank table to avoid bus conflicts!
|
||||||
--dump cart into file
|
--dump cart into file
|
||||||
dump.dumptofile( file, 512, "LOROM", "SNESROM", true )
|
dump.dumptofile( file, rom_size, snes_mapping, "SNESROM", true )
|
||||||
|
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
@ -215,7 +224,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
if program then
|
if program then
|
||||||
|
|
||||||
--initialize the mapper for dumping
|
--initialize the mapper for dumping
|
||||||
init_mapper(debug)
|
--init_mapper(debug)
|
||||||
|
|
||||||
--open file
|
--open file
|
||||||
file = assert(io.open(flashfile, "rb"))
|
file = assert(io.open(flashfile, "rb"))
|
||||||
|
|
@ -225,7 +234,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
--not susceptible to bus conflicts
|
--not susceptible to bus conflicts
|
||||||
|
|
||||||
--flash cart
|
--flash cart
|
||||||
flash.write_file( file, 512, "LOROM", "SNESROM", true )
|
flash.write_file( file, rom_size, snes_mapping, "SNESROM", true )
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
||||||
|
|
@ -238,7 +247,7 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile,
|
||||||
file = assert(io.open(verifyfile, "wb"))
|
file = assert(io.open(verifyfile, "wb"))
|
||||||
|
|
||||||
--dump cart into file
|
--dump cart into file
|
||||||
dump.dumptofile( file, 512, "LOROM", "SNESROM", true )
|
dump.dumptofile( file, rom_size, snes_mapping, "SNESROM", true )
|
||||||
|
|
||||||
--close file
|
--close file
|
||||||
assert(file:close())
|
assert(file:close())
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef _shared_dict_bootload_h
|
||||||
|
#define _shared_dict_bootload_h
|
||||||
|
|
||||||
|
//define dictionary's reference number in the shared_dictionaries.h file
|
||||||
|
//then include this dictionary file in shared_dictionaries.h
|
||||||
|
//The dictionary number is literally used as usb transfer request field
|
||||||
|
//the opcodes and operands in this dictionary are fed directly into usb setup packet's wValue wIndex fields
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
// BOOTLOAD DICTIONARY
|
||||||
|
//
|
||||||
|
// opcodes contained in this dictionary must be implemented in firmware/source/bootload.c
|
||||||
|
//
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
//BOOTLOAD opcodes
|
||||||
|
#define JUMP_BL 1 //jump to the bootloader
|
||||||
|
|
||||||
|
#define LOAD_ADDRH 2 //upper address of jump
|
||||||
|
#define JUMP_ADDR 3 //jump to address upper 16bit provided previous opcode
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -152,6 +152,7 @@
|
||||||
#define FME7 69 //SUNSOFT-5 with synth
|
#define FME7 69 //SUNSOFT-5 with synth
|
||||||
#define HDIVER 78
|
#define HDIVER 78
|
||||||
#define DxROM 205
|
#define DxROM 205
|
||||||
|
#define MM2 253
|
||||||
#define DPROM 254 //just a random mapper number for whatever I need it for
|
#define DPROM 254 //just a random mapper number for whatever I need it for
|
||||||
// UNKNOWN 255 don't assign to something meaningful
|
// UNKNOWN 255 don't assign to something meaningful
|
||||||
//operand LSB mapper variant
|
//operand LSB mapper variant
|
||||||
|
|
@ -159,7 +160,10 @@
|
||||||
|
|
||||||
|
|
||||||
#define LOROM 0
|
#define LOROM 0
|
||||||
#define HIROM 1
|
#define HIROM 1 //file starts at bank 40 and is mirrored to C0
|
||||||
|
#define EXHIROM 2 //file starts at bank C0
|
||||||
|
#define SOROM 3 //12MB star ocean mapping
|
||||||
|
|
||||||
|
|
||||||
//set function
|
//set function
|
||||||
//miscdata: buffer number
|
//miscdata: buffer number
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef _shared_dict_ciccom_h
|
||||||
|
#define _shared_dict_ciccom_h
|
||||||
|
|
||||||
|
//define dictionary's reference number in the shared_dictionaries.h file
|
||||||
|
//then include this dictionary file in shared_dictionaries.h
|
||||||
|
//The dictionary number is literally used as usb transfer request field
|
||||||
|
//the opcodes and operands in this dictionary are fed directly into usb setup packet's wValue wIndex fields
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
// CICCOM DICTIONARY
|
||||||
|
//
|
||||||
|
// opcodes contained in this dictionary must be implemented in firmware/source/ciccom.c
|
||||||
|
//
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
#define CICCOM_INIT 0
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef _shared_dict_gameboy_h
|
||||||
|
#define _shared_dict_gameboy_h
|
||||||
|
|
||||||
|
//define dictionary's reference number in the shared_dictionaries.h file
|
||||||
|
//then include this dictionary file in shared_dictionaries.h
|
||||||
|
//The dictionary number is literally used as usb transfer request field
|
||||||
|
//the opcodes and operands in this dictionary are fed directly into usb setup packet's wValue wIndex fields
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
// GAMEBOY DICTIONARY
|
||||||
|
//
|
||||||
|
// opcodes contained in this dictionary must be implemented in firmware/source/gameboy.c
|
||||||
|
//
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
#define DMG_RD 0 //RL=3 return error code, data len = 1, 1 byte of data
|
||||||
|
#define DMG_WR 1
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef _shared_dict_gba_h
|
||||||
|
#define _shared_dict_gba_h
|
||||||
|
|
||||||
|
//define dictionary's reference number in the shared_dictionaries.h file
|
||||||
|
//then include this dictionary file in shared_dictionaries.h
|
||||||
|
//The dictionary number is literally used as usb transfer request field
|
||||||
|
//the opcodes and operands in this dictionary are fed directly into usb setup packet's wValue wIndex fields
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
// GBA (gameboy advance) DICTIONARY
|
||||||
|
//
|
||||||
|
// opcodes contained in this dictionary must be implemented in firmware/source/gba.c
|
||||||
|
//
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
#define GBA_RD 0 //RL=3 return error code, data len = 1, 1 byte of data
|
||||||
|
#define GBA_WR 1
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef _shared_dict_n64_h
|
||||||
|
#define _shared_dict_n64_h
|
||||||
|
|
||||||
|
//define dictionary's reference number in the shared_dictionaries.h file
|
||||||
|
//then include this dictionary file in shared_dictionaries.h
|
||||||
|
//The dictionary number is literally used as usb transfer request field
|
||||||
|
//the opcodes and operands in this dictionary are fed directly into usb setup packet's wValue wIndex fields
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
// N64 DICTIONARY
|
||||||
|
//
|
||||||
|
// opcodes contained in this dictionary must be implemented in firmware/source/n64.c
|
||||||
|
//
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
#define N64_RD 0 //RL=3 return error code, data len = 1, 1 byte of data
|
||||||
|
#define N64_WR 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -43,6 +43,8 @@
|
||||||
|
|
||||||
#define NES_DUALPORT_WR 0x05
|
#define NES_DUALPORT_WR 0x05
|
||||||
|
|
||||||
|
#define DISC_PUSH_EXP0_PRGROM_WR 0x06
|
||||||
|
|
||||||
//=============================================================================================
|
//=============================================================================================
|
||||||
// OPCODES WITH OPERAND AND RETURN VALUE plus SUCCESS/ERROR_CODE
|
// OPCODES WITH OPERAND AND RETURN VALUE plus SUCCESS/ERROR_CODE
|
||||||
//=============================================================================================
|
//=============================================================================================
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
#define SWD_ 17
|
#define SWD_ 17
|
||||||
// PC18 "SWC" mcu debug
|
// PC18 "SWC" mcu debug
|
||||||
#define C18_ 18
|
#define C18_ 18
|
||||||
// PC19 "AFL" flipflop addr expansion for FF0-7
|
// PC19 "AFL" flipflop addr expansion for FF0-7 (also CIC RESET on NES)
|
||||||
#define C19_ 19
|
#define C19_ 19
|
||||||
#define AFL_ 19
|
#define AFL_ 19
|
||||||
// PC20 "COUT" CIC data out
|
// PC20 "COUT" CIC data out
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef _shared_dict_sega_h
|
||||||
|
#define _shared_dict_sega_h
|
||||||
|
|
||||||
|
//define dictionary's reference number in the shared_dictionaries.h file
|
||||||
|
//then include this dictionary file in shared_dictionaries.h
|
||||||
|
//The dictionary number is literally used as usb transfer request field
|
||||||
|
//the opcodes and operands in this dictionary are fed directly into usb setup packet's wValue wIndex fields
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
// SEGA (genesis/megadrive) DICTIONARY
|
||||||
|
//
|
||||||
|
// opcodes contained in this dictionary must be implemented in firmware/source/sega.c
|
||||||
|
//
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
#define SEGA_RD 0 //RL=3 return error code, data len = 1, 1 byte of data
|
||||||
|
#define SEGA_WR 1
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -5,19 +5,110 @@
|
||||||
//these numbers literally sent in usb control transfer in request field
|
//these numbers literally sent in usb control transfer in request field
|
||||||
//the included dictionaries define opcodes and operands contained in transfer wValue wIndex fields
|
//the included dictionaries define opcodes and operands contained in transfer wValue wIndex fields
|
||||||
//they also define expected data buffer sizes and contents.
|
//they also define expected data buffer sizes and contents.
|
||||||
|
|
||||||
|
//These dictionaries are imported to the device firmware at compile time
|
||||||
|
//The host application loads & parses these dictionaries at run time
|
||||||
|
//So creation of new dictionaries/opcodes requires device firmware to
|
||||||
|
//be recompiled, and loaded onto the device. But the host application
|
||||||
|
//does not need to be recompiled.
|
||||||
//
|
//
|
||||||
//TODO eventually the host code should have access to these libraries during run time.
|
//
|
||||||
//that way character strings can be interpreted by parsing the dictionary .h file
|
//There are a number of updates that must be completed when creating new dictionaries:
|
||||||
//this would also allow for dictionary expansion after compilation of host code.
|
//
|
||||||
//However the kazzo fw would still need rebuilt to support dictionary expansion.
|
//1: Define the dictionary number here in this file with #define & #include
|
||||||
//Possible to take this one step further and remove dictionaries from host compiliation.
|
// This will get the new dictionary included in the firmware build
|
||||||
//that way you simply point the host to a dictionary directory at runtime.
|
// the assigned dictionary number must be between 0-255
|
||||||
//Perhaps utilizing a database of some sort would be better than directory of text/.h files.
|
// This number is the actual USB bRequest value for the setup packet
|
||||||
//but since firmware build relies on dictionary definition at build time, perhaps the simplest
|
//
|
||||||
//solution of using those avr build .h files slurped up by host at run time is safest and easiest.
|
//2: Create new "shared_dict_<name>.h" file in the same directory as this file
|
||||||
//having host capability to convert command string to the usb dict/opcode is the first
|
// Feel free to copy paste a similar dict, just make sure everything is
|
||||||
//step in having scripting support on host side. The thought above just expands it one
|
// appropriately renamed in the file
|
||||||
//step further making the dictionaries themselves operate as run time 'scripts'.
|
//
|
||||||
|
//3: Add the new dictionary to host/scripts/app/dict.lua
|
||||||
|
// This includes instantiating, creating, & exporting the module at the bottom
|
||||||
|
// of dict.lua file as follows:
|
||||||
|
// op_<name> = {}
|
||||||
|
// create_dict_tables( op_<name>, "../shared/shared_dict_<name>.h")
|
||||||
|
// dict.<name> = <name>
|
||||||
|
// Create the <name> dictionary function in dict.lua
|
||||||
|
// This is the function that the host scripts use each time an opcode is
|
||||||
|
// called for that dictionary. It designates how the operand, misc, & data
|
||||||
|
// for the opcode are defined and how they map to the USB setup & data packets.
|
||||||
|
// Currently there is no generic function for dictionaries to use
|
||||||
|
// This is because some dictionaries may handle USB transfers in special ways
|
||||||
|
// For now one can probably get by copy pasting one of the other functions
|
||||||
|
// like nes, and then renaming all "nes" to "<name>" and "NES" to "<NAME>"
|
||||||
|
// TODO: create generic dictionary script function for general use
|
||||||
|
//
|
||||||
|
//4: Define the desired opcodes in the newly created shared/shared_dict_<name>.h file
|
||||||
|
// This is done with lines like the following:
|
||||||
|
// #define NEW_OPCODE 1 //RL=2
|
||||||
|
// the opcode name comes first which is the name used to call the opcode
|
||||||
|
// This is used in host scripts and device firmware
|
||||||
|
// An underscore can be tacked to the end to allow direct mapping between
|
||||||
|
// firmware defines and shared defines (see firmware/source/pinport.h for example)
|
||||||
|
// In that case the trailing underscore is trimmed by the host parser
|
||||||
|
// choose an arbitrary number between 0-255 that is different from all other
|
||||||
|
// opcodes in that dictionary
|
||||||
|
// This value is sent as USB setup packet wValue LSByte
|
||||||
|
// the "RL=<number>" that's follows the "//" C comment designates the "return data length"
|
||||||
|
// This C comment is for the host side only so it knows the desired USB endpoint & data length.
|
||||||
|
// If left out, the default is RL=1 which is ENDPOINT IN with data length of 1.
|
||||||
|
// A negative value for RL denotes ENDPOINT OUT (write to device).
|
||||||
|
// a positive is ENDPOINT IN (read data from device).
|
||||||
|
// That 1 byte of data read back from the device is typically the success/error
|
||||||
|
// code sent back from the device to denote if opcode wasn't found, or other problem.
|
||||||
|
// If you want some actual data to be returned increased.
|
||||||
|
// Typically the first byte is still reserved for error code, second byte gives data length
|
||||||
|
// of the data that follows. So 1 byte of return data would be RL=3
|
||||||
|
// first byte would be errorcode, second = 1, and third byte would be actual data
|
||||||
|
// see nes.c for an example of this on reads
|
||||||
|
// You must also dictate what to do with that data once it arrives in the
|
||||||
|
// dict.lua function created in step 3 above.
|
||||||
|
// dict.lua parses this RL value, all that really matters is it follows //
|
||||||
|
// and contains RL=<number> where the number is assumed decimal, but can be hex with 0x prefix
|
||||||
|
// white space is okay, and RL doesn't have to be first thing in the comment
|
||||||
|
// If one wants to comment out opcodes it must be done with // at the beginning of the line.
|
||||||
|
// multiline C comments is not permitted by the dict.lua parser
|
||||||
|
// Make notes about the opcode explaining operands and data when used.
|
||||||
|
// Comments in shared_dict_<name>.h must be single line C comments starting with //
|
||||||
|
//
|
||||||
|
//5: Add support for the dictionary in the device
|
||||||
|
// This is done in firmware/source/usb.c within the usbFunctionSetup function
|
||||||
|
// This is where setup packet is mapped to the firmware function you'd like to be called for
|
||||||
|
// each incoming setup packet for this dictionary
|
||||||
|
//
|
||||||
|
//6: Create the firmware C code to implement the dictionary.
|
||||||
|
// Something like <name>.c & <name>.h which can be copied from a similar dictionary
|
||||||
|
// The .h file must be included in usb.h
|
||||||
|
// Create a <name>_call function in <name>.c which you called in step 6 above.
|
||||||
|
// Use a switch statement to key off the opcode and pass operands/data to the opcode's function
|
||||||
|
// Be sure to return SUCCESS/ERROR when possible to get some sort of report back from device that
|
||||||
|
// the opcode was found and executed properly.
|
||||||
|
// the return SUCCESS/ERROR is not possible when sending data packets to device (ENDPOINT OUT)
|
||||||
|
// in that case perhaps you want a 'GET_LAST_ERROR_CODE' opcode that would follow afterwards..
|
||||||
|
// These error codes should be kept in shared/shared_errors.h
|
||||||
|
//
|
||||||
|
//7: Call opcodes in the new dictionary from host lua scripts!
|
||||||
|
// For example:
|
||||||
|
// dict.io("NES_INIT")
|
||||||
|
// calls the NES_INIT opcode in the io dictionary, this opcode happens to initialize
|
||||||
|
// the mcu GPIO pins to a known state to prepare for calling other opcodes in the nes dictionary
|
||||||
|
//
|
||||||
|
// dict.nes("NES_CPU_WR", 0x8000, 0xFF)
|
||||||
|
// calls the NES_CPU_WR opcode from the nes dictionary, with operand 0x8000, and miscdata 0xFF
|
||||||
|
// the host/scripts/app/dict.lua nes function is what determines how that operand/misc data is sent in the setup packet
|
||||||
|
// in this example the value 0xFF is written to CPU address $8000
|
||||||
|
//
|
||||||
|
// dict.snes("SNES_SET_BANK", 0)
|
||||||
|
// rv = dict.snes("SNES_ROM_RD", 0xFFFF)
|
||||||
|
// the SNES_SET_BANK opcode sets the SNES bank address bits to 0
|
||||||
|
// the second SNES_ROM_RD opcode reads the value from $FFFF (of the currently selected bank)
|
||||||
|
// and the read value is stored in the variable rv for use in the script
|
||||||
|
//
|
||||||
|
// hex & decimal values can be used in data, operands, misc. Hex must have 0x prefix
|
||||||
|
// this is lua code afterall, so anything that's possible in lua can be done here on the host side
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Notes:
|
//Notes:
|
||||||
|
|
@ -121,4 +212,62 @@
|
||||||
//dictionary used to control jtag communications
|
//dictionary used to control jtag communications
|
||||||
//=============================================================================================
|
//=============================================================================================
|
||||||
//=============================================================================================
|
//=============================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
#define DICT_BOOTLOAD 10
|
||||||
|
#include "shared_dict_bootload.h"
|
||||||
|
//dictionary used to control USB device bootloader
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
#define DICT_CICCOM 11
|
||||||
|
#include "shared_dict_ciccom.h"
|
||||||
|
//dictionary used to communicate to the CIC
|
||||||
|
//The lockout microcontroller on some INL manufactured cartridges
|
||||||
|
//is used for advanced features such as mirroring software switch, JTAG interface, etc.
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
#define DICT_GAMEBOY 12
|
||||||
|
#include "shared_dict_gameboy.h"
|
||||||
|
//gameboy dictionary
|
||||||
|
//These commands rely on io initialization from io dictionary prior to calling
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
#define DICT_GBA 13
|
||||||
|
#include "shared_dict_gba.h"
|
||||||
|
//gameboy advance dictionary
|
||||||
|
//These commands rely on io initialization from io dictionary prior to calling
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
#define DICT_SEGA 14
|
||||||
|
#include "shared_dict_sega.h"
|
||||||
|
//Sega Genesis dictionary
|
||||||
|
//These commands rely on io initialization from io dictionary prior to calling
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
#define DICT_N64 15
|
||||||
|
#include "shared_dict_n64.h"
|
||||||
|
//Nintendo 64 dictionary
|
||||||
|
//These commands rely on io initialization from io dictionary prior to calling
|
||||||
|
//=============================================================================================
|
||||||
|
//=============================================================================================
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
#define ERR_UNKN_SWIM_OPCODE 130
|
#define ERR_UNKN_SWIM_OPCODE 130
|
||||||
|
|
||||||
#define ERR_UNKN_JTAG_OPCODE 135
|
#define ERR_UNKN_JTAG_OPCODE 135
|
||||||
|
#define ERR_UNKN_CICCOM_OPCODE 136
|
||||||
|
#define ERR_UNKN_BOOTLOAD_OPCODE 138
|
||||||
|
|
||||||
#define ERR_UNKN_PP_OPCODE 140
|
#define ERR_UNKN_PP_OPCODE 140
|
||||||
#define ERR_CTL_PIN_NOT_PRESENT 141
|
#define ERR_CTL_PIN_NOT_PRESENT 141
|
||||||
|
|
@ -25,6 +27,11 @@
|
||||||
//
|
//
|
||||||
#define ERR_UNKN_SNES_OPCODE 170
|
#define ERR_UNKN_SNES_OPCODE 170
|
||||||
|
|
||||||
|
#define ERR_UNKN_GAMEBOY_OPCODE 175
|
||||||
|
#define ERR_UNKN_GBA_OPCODE 176
|
||||||
|
#define ERR_UNKN_SEGA_OPCODE 177
|
||||||
|
#define ERR_UNKN_N64_OPCODE 178
|
||||||
|
|
||||||
#define ERR_UNKN_BUFF_OPCODE 180
|
#define ERR_UNKN_BUFF_OPCODE 180
|
||||||
#define ERR_BUFN_DOES_NOT_EXIST 181
|
#define ERR_BUFN_DOES_NOT_EXIST 181
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue