mirror of
https://github.com/fadden/6502bench.git
synced 2024-08-20 11:28:58 +00:00
C64 PRG files are pretty common. Their salient feature is that they start with a 16-bit value that is used as the load address. The value is commonly generated by the assembler itself, rather than explicitly added to the source file. Not all assemblers know what a PRG file is, and some of them handle it in ways that are difficult to guarantee in SourceGen. ACME adds the 16-bit header when the output file name ends in ".prg", cc65 uses a modified config file, 64tass uses a different command-line option, and Merlin 32 has no idea what they are. This change adds PRG file detection and handling to the 64tass code generator. Doing so required making a few changes to the gen/asm interfaces, because we now need to have the generator pass additional flags to the assembler, and sometimes we need code generation to start somewhere other than offset zero. Overall the changes were pretty minor. The 20042-address-changes test needed a 6502-only variant. A new test (20040-address-changes) has been added and given a PRG header. As part of this change the 65816 variant was changed to use addresses in bank 2, which uncovered a code generation bug that this change also fixes. The 64tass --long-address flag doesn't appear to be necessary for files <= 65536 bytes long, so we no longer emit it for those. (issue #90)
168 lines
2.0 KiB
Plaintext
168 lines
2.0 KiB
Plaintext
### 6502bench SourceGen dis65 v1.0 ###
|
|
{
|
|
"_ContentVersion":4,
|
|
"FileDataLength":203,
|
|
"FileDataCrc32":-2143569845,
|
|
"ProjectProps":{
|
|
"CpuName":"65816",
|
|
"IncludeUndocumentedInstr":false,
|
|
"TwoByteBrk":false,
|
|
"EntryFlags":33489103,
|
|
"AutoLabelStyle":"Simple",
|
|
"AnalysisParams":{
|
|
"AnalyzeUncategorizedData":true,
|
|
"DefaultTextScanMode":"LowHighAscii",
|
|
"MinCharsForString":4,
|
|
"SeekNearbyTargets":true,
|
|
"UseRelocData":false,
|
|
"SmartPlpHandling":true,
|
|
"SmartPlbHandling":true},
|
|
|
|
"PlatformSymbolFileIdentifiers":[],
|
|
"ExtensionScriptFileIdentifiers":[],
|
|
"ProjectSyms":{
|
|
}},
|
|
|
|
"AddressMap":[{
|
|
"Offset":0,
|
|
"Addr":135168},
|
|
|
|
{
|
|
"Offset":13,
|
|
"Addr":135424},
|
|
|
|
{
|
|
"Offset":27,
|
|
"Addr":135424},
|
|
|
|
{
|
|
"Offset":42,
|
|
"Addr":135424},
|
|
|
|
{
|
|
"Offset":56,
|
|
"Addr":139264},
|
|
|
|
{
|
|
"Offset":63,
|
|
"Addr":139296},
|
|
|
|
{
|
|
"Offset":72,
|
|
"Addr":139392},
|
|
|
|
{
|
|
"Offset":104,
|
|
"Addr":139520},
|
|
|
|
{
|
|
"Offset":109,
|
|
"Addr":141312},
|
|
|
|
{
|
|
"Offset":125,
|
|
"Addr":141344},
|
|
|
|
{
|
|
"Offset":143,
|
|
"Addr":143360},
|
|
|
|
{
|
|
"Offset":157,
|
|
"Addr":143616},
|
|
|
|
{
|
|
"Offset":180,
|
|
"Addr":143744},
|
|
|
|
{
|
|
"Offset":198,
|
|
"Addr":143872}],
|
|
"TypeHints":[{
|
|
"Low":0,
|
|
"High":0,
|
|
"Hint":"Code"},
|
|
|
|
{
|
|
"Low":27,
|
|
"High":27,
|
|
"Hint":"Code"},
|
|
|
|
{
|
|
"Low":42,
|
|
"High":42,
|
|
"Hint":"Code"},
|
|
|
|
{
|
|
"Low":178,
|
|
"High":180,
|
|
"Hint":"InlineData"},
|
|
|
|
{
|
|
"Low":201,
|
|
"High":202,
|
|
"Hint":"InlineData"}],
|
|
"StatusFlagOverrides":{
|
|
},
|
|
|
|
"Comments":{
|
|
},
|
|
|
|
"LongComments":{
|
|
},
|
|
|
|
"Notes":{
|
|
},
|
|
|
|
"UserLabels":{
|
|
"71":{
|
|
"Label":"offend",
|
|
"Value":139304,
|
|
"Source":"User",
|
|
"Type":"LocalOrGlobalAddr",
|
|
"LabelAnno":"None"},
|
|
|
|
"155":{
|
|
"Label":"ulabel",
|
|
"Value":143372,
|
|
"Source":"User",
|
|
"Type":"LocalOrGlobalAddr",
|
|
"LabelAnno":"None"},
|
|
|
|
"158":{
|
|
"Label":"fwd",
|
|
"Value":143617,
|
|
"Source":"User",
|
|
"Type":"LocalOrGlobalAddr",
|
|
"LabelAnno":"None"},
|
|
|
|
"196":{
|
|
"Label":"label1",
|
|
"Value":143760,
|
|
"Source":"User",
|
|
"Type":"LocalOrGlobalAddr",
|
|
"LabelAnno":"None"}},
|
|
|
|
"OperandFormats":{
|
|
"191":{
|
|
"Length":3,
|
|
"Format":"NumericLE",
|
|
"SubFormat":"Symbol",
|
|
"SymbolRef":{
|
|
"Label":"label1",
|
|
"Part":"Low"}}},
|
|
|
|
"LvTables":{
|
|
},
|
|
|
|
"Visualizations":[],
|
|
"VisualizationAnimations":[],
|
|
"VisualizationSets":{
|
|
},
|
|
|
|
"RelocList":{
|
|
},
|
|
|
|
"DbrValues":{
|
|
}}
|