1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-06-30 06:29:32 +00:00

Update A2-HP-CDA example

This used to be an example of why disassembling Apple IIgs OMF
binaries didn't work.  Now it's an example of how well it works.
This commit is contained in:
Andy McFadden 2020-07-10 21:22:18 -07:00
parent cc6ebaffc5
commit abba1c8462
4 changed files with 2434 additions and 288 deletions

Binary file not shown.

View File

@ -1,282 +0,0 @@
### 6502bench SourceGen dis65 v1.0 ###
{
"_ContentVersion":1,"FileDataLength":1816,"FileDataCrc32":775804905,"ProjectProps":{
"CpuName":"65816","IncludeUndocumentedInstr":false,"EntryFlags":12780031,"AnalysisParams":{
"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true},
"PlatformSymbolFileIdentifiers":["RT:Apple/Cxxx-IO.sym65","RT:Apple/IIgs-ROM.sym65","RT:Apple/GSOS.sym65"],"ExtensionScriptFileIdentifiers":["RT:Apple/GSOS.cs","RT:Apple/IIgs-Toolbox.cs"],"ProjectSyms":{
}},
"AddressMap":[{
"Offset":0,"Addr":131072},
{
"Offset":158,"Addr":196608},
{
"Offset":232,"Addr":0}],"TypeHints":[{
"Low":358,"High":358,"Hint":"Code"}],"StatusFlagOverrides":{
},
"Comments":{
"306":"3 states for item 1","308":"2 here"},
"LongComments":{
"-2147483647":{
"Text":"6502bench SourceGen v1.0.0-alpha1","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"0":{
"Text":"~ExpressLoad segment header","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"158":{
"Text":"Code segment header\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"232":{
"Text":"\r\nStart of code.\r\n\r\nThis begins with the header required for CDAs.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"296":{
"Text":"\r\nGlobal variable storage.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"310":{
"Text":"\r\nText screen line offsets.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"865":{
"Text":"\r\nCDA shutdown entry point.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"1597":{
"Text":"\r\nMesgData\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"358":{
"Text":"\r\nMain entry point from system.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
"1672":{
"Text":"Not sure what this is.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0}},
"Notes":{
"232":{
"Text":"Start of the interesting stuff. The values that are updated by the relocating loader are all based off of 00/0000, so that\u0027s where we set the ORG. This confuses things a bit, since we seem to be running our code off of zero page, but it mostly seems to work.\r\n\r\nThis could use further refinement, but I\u0027m not sure there\u0027s much point without actual OMF support.","BoxMode":false,"MaxWidth":80,"BackgroundColor":-7278960}},
"UserLabels":{
"72":{
"Label":"ExpressLoad","Value":131144,"Source":"User","Type":"LocalOrGlobalAddr"},
"232":{
"Label":"Header","Value":0,"Source":"User","Type":"LocalOrGlobalAddr"},
"306":{
"Label":"max1","Value":74,"Source":"User","Type":"LocalOrGlobalAddr"},
"300":{
"Label":"hilite_opt","Value":68,"Source":"User","Type":"LocalOrGlobalAddr"},
"304":{
"Label":"stat2","Value":72,"Source":"User","Type":"LocalOrGlobalAddr"},
"302":{
"Label":"stat1","Value":70,"Source":"User","Type":"LocalOrGlobalAddr"},
"298":{
"Label":"global_flags","Value":66,"Source":"User","Type":"LocalOrGlobalAddr"},
"296":{
"Label":"global_mode","Value":64,"Source":"User","Type":"LocalOrGlobalAddr"},
"308":{
"Label":"max2","Value":76,"Source":"User","Type":"LocalOrGlobalAddr"},
"358":{
"Label":"Main","Value":126,"Source":"User","Type":"GlobalAddr"},
"770":{
"Label":"fail_cause","Value":538,"Source":"User","Type":"LocalOrGlobalAddr"},
"948":{
"Label":"InitScreen","Value":716,"Source":"User","Type":"GlobalAddr"},
"671":{
"Label":"ErrorMain","Value":439,"Source":"User","Type":"GlobalAddr"},
"865":{
"Label":"ShutDown","Value":633,"Source":"User","Type":"GlobalAddr"},
"310":{
"Label":"texttab","Value":78,"Source":"User","Type":"LocalOrGlobalAddr"},
"866":{
"Label":"GetKey","Value":634,"Source":"User","Type":"GlobalAddr"},
"932":{
"Label":"event_rec","Value":700,"Source":"User","Type":"LocalOrGlobalAddr"},
"1175":{
"Label":"err_flag","Value":943,"Source":"User","Type":"LocalOrGlobalAddr"},
"1270":{
"Label":"DrawScreen","Value":1038,"Source":"User","Type":"GlobalAddr"},
"1477":{
"Label":"items","Value":1245,"Source":"User","Type":"LocalOrGlobalAddr"},
"1483":{
"Label":"item1","Value":1251,"Source":"User","Type":"LocalOrGlobalAddr"},
"1573":{
"Label":"item2","Value":1341,"Source":"User","Type":"LocalOrGlobalAddr"},
"1465":{
"Label":"cur_line","Value":1233,"Source":"User","Type":"LocalOrGlobalAddr"},
"1467":{
"Label":"cur_item","Value":1235,"Source":"User","Type":"LocalOrGlobalAddr"},
"1469":{
"Label":"item_stat","Value":1237,"Source":"User","Type":"LocalOrGlobalAddr"},
"1471":{
"Label":"item_ptr","Value":1239,"Source":"User","Type":"LocalOrGlobalAddr"},
"1473":{
"Label":"cmask","Value":1241,"Source":"User","Type":"LocalOrGlobalAddr"},
"1475":{
"Label":"csub","Value":1243,"Source":"User","Type":"LocalOrGlobalAddr"},
"1493":{
"Label":"title1","Value":1261,"Source":"User","Type":"LocalOrGlobalAddr"},
"1501":{
"Label":"i1compr","Value":1269,"Source":"User","Type":"LocalOrGlobalAddr"},
"1525":{
"Label":"i1decomp","Value":1293,"Source":"User","Type":"LocalOrGlobalAddr"},
"1549":{
"Label":"i1inact","Value":1317,"Source":"User","Type":"LocalOrGlobalAddr"},
"1581":{
"Label":"title2","Value":1349,"Source":"User","Type":"LocalOrGlobalAddr"},
"1624":{
"Label":"data_in","Value":1392,"Source":"User","Type":"LocalOrGlobalAddr"},
"1626":{
"Label":"data_out","Value":1394,"Source":"User","Type":"LocalOrGlobalAddr"},
"1646":{
"Label":"SendMsg","Value":1414,"Source":"User","Type":"GlobalAddr"},
"1597":{
"Label":"idstring","Value":1365,"Source":"User","Type":"LocalOrGlobalAddr"}},
"OperandFormats":{
"0":{
"Length":72,"Format":"Dense","SubFormat":"None","SymbolRef":null},
"72":{
"Length":86,"Format":"Dense","SubFormat":"None","SymbolRef":null},
"158":{
"Length":74,"Format":"Dense","SubFormat":"None","SymbolRef":null},
"232":{
"Length":20,"Format":"String","SubFormat":"L8String","SymbolRef":null},
"252":{
"Length":4,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
"Label":"Main","Part":"Low"}},
"256":{
"Length":4,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
"Label":"ShutDown","Part":"Low"}},
"260":{
"Length":36,"Format":"String","SubFormat":"CString","SymbolRef":null},
"296":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"298":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"300":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"302":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"304":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"306":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"308":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"310":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"312":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"314":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"316":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"318":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"320":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"322":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"324":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"326":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"328":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"330":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"332":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"334":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"336":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"338":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"340":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"342":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"344":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"346":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"348":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"350":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"352":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"354":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"356":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"770":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"772":{
"Length":31,"Format":"String","SubFormat":"CString","SymbolRef":null},
"803":{
"Length":29,"Format":"String","SubFormat":"CString","SymbolRef":null},
"832":{
"Length":33,"Format":"String","SubFormat":"CString","SymbolRef":null},
"877":{
"Length":3,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"880":{
"Length":3,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"883":{
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
"Label":"event_rec","Part":"Bank"}},
"886":{
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
"Label":"event_rec","Part":"Low"}},
"1175":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1177":{
"Length":20,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1465":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1467":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1469":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1471":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1473":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1475":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1477":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1479":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1481":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1483":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1485":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1487":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1489":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1491":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1493":{
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1501":{
"Length":24,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1525":{
"Length":24,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1549":{
"Length":24,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1573":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1575":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1577":{
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
"1579":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1581":{
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1589":{
"Length":4,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1593":{
"Length":4,"Format":"String","SubFormat":"CString","SymbolRef":null},
"1597":{
"Length":27,"Format":"String","SubFormat":"L8String","SymbolRef":null},
"1624":{
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
"1650":{
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
"Label":"idstring","Part":"Bank"}},
"1653":{
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
"Label":"idstring","Part":"Low"}},
"1658":{
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
"Label":"data_out","Part":"Bank"}},
"1672":{
"Length":144,"Format":"Dense","SubFormat":"None","SymbolRef":null}}}

File diff suppressed because it is too large Load Diff

View File

@ -20,14 +20,14 @@ project to the original.
65816 sources, with a little bit of ProDOS 8 and IIgs toolbox usage.
Demonstrates how extension scripts are used during analysis.
[(Full project)](https://fadden.com/apple2/misc.html#zippy)
* A2-HP-CDA: HardPressed Classic Desk Accessory. This is 65816 code
in OMF loader format, which SourceGen doesn't support, so it's a little
rough. (This is chiefly here to answer the question, "what does it look
like when you disassemble OMF binaries?")
* A2-HP-CDA: HardPressed Classic Desk Accessory. This original binary is
in 65816 code in OMF loader format, which was then prepared with
SourceGen's OMF conversion tool. (Try loading the "#b90100" file
into the disassembler to see why.)
[(Full project)](https://fadden.com/apple2/hardpressed.html)
(You may be wondering why some of the example files have filenames with
You may be wondering why some of the example files have filenames with
things like "#061d60" in them. It's a method of preserving the file type
for Apple II files used by some utilities. The potential advantage for
disassembly is that the file type often determines the load address,
possibly removing some initial guesswork.)
possibly removing some initial guesswork.