1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-01 22:50:35 +00:00
6502bench/SourceGen
Andy McFadden 99cd0d3ac1 Improve handling of C64 PRG header
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)
2020-10-17 16:45:13 -07:00
..
AsmGen Improve handling of C64 PRG header 2020-10-17 16:45:13 -07:00
Examples Update A2-HP-CDA example 2020-07-10 21:22:18 -07:00
Properties Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
Res Warn about multi-line start/stop tags 2020-10-15 17:18:49 -07:00
RuntimeData Improve handling of C64 PRG header 2020-10-17 16:45:13 -07:00
Sandbox Reboot sandbox when required 2020-07-19 13:20:18 -07:00
SGTestData Improve handling of C64 PRG header 2020-10-17 16:45:13 -07:00
Tests Improve handling of C64 PRG header 2020-10-17 16:45:13 -07:00
Tools Rename "hints" to "analyzer tags" 2020-10-15 16:55:29 -07:00
WpfGui Rename "hints" to "analyzer tags" 2020-10-15 16:55:29 -07:00
Anattrib.cs Rename "hints" to "analyzer tags" 2020-10-15 16:55:29 -07:00
App.config Fix startup issues 2019-07-20 17:36:12 -07:00
App.xaml Improve visualization 2019-12-04 15:59:37 -08:00
App.xaml.cs Version 1.7.3-dev1 2020-10-11 18:46:37 -07:00
AppSettings.cs Split "show cycle counts" in two 2020-08-27 13:59:53 -07:00
AutoLabel.cs Label rework, part 1 2019-11-08 21:02:15 -08:00
ChangeSet.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
CodeAnalysis.cs Warn about multi-line start/stop tags 2020-10-15 17:18:49 -07:00
DataAnalysis.cs Update relocation data handling 2020-07-10 17:41:38 -07:00
DefSymbol.cs Prefer narrower project/platform symbols 2020-01-23 10:49:22 -08:00
DisasmProject.cs Rename "hints" to "analyzer tags" 2020-10-15 16:55:29 -07:00
DisplayList.cs Various minor changes 2020-03-30 16:50:52 -07:00
DisplayListSelection.cs Add C64 encodings to instruction and data operand editors 2019-08-15 17:53:12 -07:00
Exporter.cs Tweaks 2020-07-22 10:53:54 -07:00
ExternalFile.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
FormatDescriptor.cs Fix junk alignment check 2019-10-23 13:25:50 -07:00
FormattedOperandCache.cs Add a string operand cache 2019-08-17 17:03:06 -07:00
HelpAccess.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
LineListGen.cs Rename "hints" to "analyzer tags" 2020-10-15 16:55:29 -07:00
LocalVariableLookup.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
LocalVariableTable.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
MainController.cs Warn about multi-line start/stop tags 2020-10-15 17:18:49 -07:00
MessageList.cs Check for hidden visualizations 2019-12-25 11:15:22 -08:00
MultiLineComment.cs Tweak line folding code 2019-11-01 19:47:56 -07:00
NavStack.cs Tweak navigation 2019-10-10 11:57:36 -07:00
PlatformSymbols.cs Update comments, remove unused var 2019-10-27 21:29:44 -07:00
ProjectFile.cs Rename "hints" to "analyzer tags" 2020-10-15 16:55:29 -07:00
ProjectProperties.cs Default "smart PLP handling" to off 2020-07-24 21:38:45 -07:00
PseudoOp.cs Make operand wrap length configurable 2020-07-19 18:39:27 -07:00
RuntimeDataAccess.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
Sgec.cs SGEC tweaks 2020-07-16 10:14:28 -07:00
SourceGen.csproj Add Apple II screen memory chart 2020-08-20 17:24:28 -07:00
Symbol.cs Fix symbol entry bug in operand editors 2019-12-26 11:04:37 -08:00
SymbolTable.cs Prefer narrower project/platform symbols 2020-01-23 10:49:22 -08:00
SystemDefaults.cs Optionally treat BRKs as two-byte instructions 2019-10-09 14:55:56 -07:00
SystemDefs.cs Progress toward OMF file handling 2020-06-30 08:20:12 -07:00
UndoableChange.cs Rename "hints" to "analyzer tags" 2020-10-15 16:55:29 -07:00
VisBitmapAnimation.cs Progress toward wireframe animations 2020-03-08 17:05:08 -07:00
Visualization.cs Add Export feature to visualization editor 2020-06-20 17:32:57 -07:00
VisualizationSet.cs Add a progress bar to HTML export 2020-03-15 14:07:05 -07:00
VisWireframeAnimation.cs Add Atari AVG visualizer 2020-04-11 17:24:21 -07:00
WeakSymbolRef.cs Add local variable uniquification 2019-08-31 14:19:50 -07:00
WireframeObject.cs Consolidate wireframe data validation 2020-04-23 11:25:45 -07:00
XrefSet.cs Show "ptr" for pointer use in cross-reference list 2020-09-04 13:26:41 -07:00