1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-07 07:28:57 +00:00
6502bench/SourceGen/RuntimeData
Andy McFadden 478afa542e Fix 64tass code gen corner case
On the 65816, if you say "JSR foo" from bank $12, but "foo" is an
address in bank 0, most assemblers will conclude that you're forming
a 16-bit argument with a 16-bit address and assemble happily.  64tass
halts with an error.  Up until v1.55 or so, you could fake it out
by supplying a large offset.

This no longer works.  The preferred way to say "no really I mean to
do this" is to append ",k" to the operand.  We now do that as needed.

I didn't want to define a new ExpressionMode for 64tass just to
support an operand modifier that should probably never actually get
generated (you can't call across banks with JSR!), so this is
implemented with a quirk and an op flag.

64tass v1.56.2625 is now the default.

(issue #104)
2021-08-09 14:11:15 -07:00
..
Apple Fix lastOffset calculations in Apple II hi-res visualizer 2021-05-17 17:28:13 -07:00
Atari Add simple SGEC reader 2020-04-13 17:33:34 -07:00
Commodore Various minor tweaks 2019-12-07 11:42:26 -08:00
Help Fix 64tass code gen corner case 2021-08-09 14:11:15 -07:00
Nintendo Fixes that reflect feedback. 2021-07-29 23:46:05 +09:00
Oric Modifying errors after feedback 2021-07-03 22:57:33 +02:00
TestData Initial file commit 2018-09-28 10:05:11 -07:00
ExportTemplate.html Update HTML export to use HTML 5 2021-05-23 11:27:42 -07:00
LegalStuff.txt Mention VS2017 icon library usage 2020-09-04 18:20:26 -07:00
README.md Updated the RuntimeData README 2020-01-01 18:06:59 -08:00
RuntimeData.csproj Initial file commit 2018-09-28 10:05:11 -07:00
SGStyle.css Add visualization sets to exported HTML 2019-12-13 17:15:38 -08:00
SystemDefs.json Change entry flags to native mode 2021-07-30 01:02:08 +09:00

Runtime Data

Symbol files and analyzer scripts are split into directories by platform manufacturer.

The Visual Studio project (RuntimeData.csproj) exists so you can edit scripts with IntelliSense and error highlighting. Everything here is distributed as source, not in compiled form; all compilation occurs at run time.

SystemDefs.json

This file defines the systems available in the "new project" screen. The following fields are mandatory:

  • Name - Short name that identifies the system.
  • GroupName - Short string used to group common items together in the UI.
  • CPU - Type of CPU used. The string must be part of the known set (see CpuDef.cs)
  • Speed - Clock rate, in MHz, of the CPU on the system. When multiple speeds are possible, use the most common, favoring NTSC over PAL.
  • SymbolFiles - List of platform symbol file identifiers (see below).
  • ExtensionScripts - List of extension script file identifiers (see below).
  • Parameters - List of optional parameters (see below).

The currently-supported parameters are:

  • load-address=<addr> - Specify the initial load address. The default is 0x1000.
  • entry-flags=<flag-set> - Specify the processor status flag values to use at entry points. This is intended for use on the 65802/65816, and may be one of "emulation", "native-short", and "native-long". The default is "emulation".
  • undocumented-opcodes={true|false} - Enable or disable undocumented opcodes. They are disabled by default.
  • first-word-is-load-addr={true|false} - If true, the first two bytes of the file contain the load address.
  • default-text-encoding=<mode> - Specify default character encoding. Use "c64-petscii" for PETSCII. The default is low/high ASCII.

All of these things can be changed after the project has begun, but it's nice to have them configured in advance.

SymbolFiles and ExtensionScripts use file identifiers, which look like "RT:Apple/ProDOS8.sym65". The "RT:" means that the file lives in the RuntimeData directory, and the rest is a partial pathname. Files that live in the same directory as the project file are prefixed with "PROJ:". All symbol files and extension scripts must live in the RuntimeData directory or project file directory, or they will not be loaded.

All "RT:" identifier paths are relative to the RuntimeData directory. The Group Name is not automatically added.

Platform Symbol Files and Extension Scripts

These are described in the "Advanced Topics" section of the manual (here).

Misc Files

ExportTemplate.html and SGStyle.css are used by SourceGen's HTML export feature.

LegalStuff.txt is displayed in the About box.