Difference between revisions of "Low Level Developer Tools"

From C256 Foenix Wiki
Jump to navigation Jump to search
(Created page with "== Development Tools == ; Foenix IDE : The Foenix IDE is a full-featured emulator and board manager tool written in C#. The bulk of the Foenix IDE is an emulator of the C256...")
 
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Development Tools ==
 
  
; Foenix IDE
 
: The Foenix IDE is a full-featured emulator and board manager tool written in C#. The bulk of the Foenix IDE is an emulator of the C256 Foenix which emulates several key systems of the C256 and allows for breakpoints in the code, examination of memory, and so on. The IDE can also connect to the physical C256 through the USB debug interface. It can use the interface to upload data from a BIN file, an Intel HEX file, or the IDE emulator's memory into the C256, download memory from the C256 into the emulator's memory to be examined through the IDE, or to reprogram the C256's flash memory. Although a GUI application by default, the IDE can be used as a command line tool. The IDE also includes a character set / font editor tool, allowing you to design your own characters to use in your C256 programs. The source code for the IDE as well as the latest binary can be found at: https://github.com/Trinity-11/FoenixIDE.
 
  
; C256Mgr
+
== Foenix IDE ==
: C256Mgr is a set of Python scripts allowing access to the C256's USB debug interface. The scripts allow you to use the command line to upload BIN and HEX files to the C256, reprogram the flash memory, or examine memory on the C256. If your code includes a 64Tass compatible LBL file, the C256Mgr scripts can use that LBL file to allow you to examine memory based on the labels in your code. C256Mgr was originally intended to provide a cross-platform option for those who cannot run .Net applications. The C256Mgr can be found at: https://github.com/pweingar/C256Mgr.
 
  
; 64Tass
+
The Foenix IDE is a full-featured emulator and board manager tool written in C#. The bulk of the Foenix IDE is an emulator of the C256 Foenix which emulates several key systems of the C256 and allows for breakpoints in the code, examination of memory, and so on. The IDE can also connect to the physical C256 through the USB debug interface. It can use the interface to upload data from a BIN file, an Intel HEX file, or the IDE emulator's memory into the C256, download memory from the C256 into the emulator's memory to be examined through the IDE, or to reprogram the C256's flash memory. Although a GUI application by default, the IDE can be used as a command line tool. The IDE also includes a character set / font editor tool, allowing you to design your own characters to use in your C256 programs. The source code for the IDE as well as the latest binary can be found at: https://github.com/Trinity-11/FoenixIDE.
: Although any assembler that can produce 65816 code can be used to write code for the C256, the kernel, BASIC interpreter, and much of the sample code are written using 64Tass, which can be found at: https://sourceforge.net/projects/tass64/.
 
  
; WDC816CC
+
== 64Tass ==
: Assembly seems to be the language of choice. But for those looking for something more portable, WDC provides a C-compiler. It's not necessarily more easy to use than assembly as Foenix programming is very close to the metal and it has some quirks. But if you have any skill using C on other platforms it will make you feel right at home and it does not require you to learn 65816 specific opcodes. Good assembly will always be the better performer however. You can even mix both if you want to. For some pointers on using the compile see [[C-compiler use]]
 
  
== Installing Drivers ==
+
Although any assembler that can produce 65816 code can be used to write code for the C256, the kernel, BASIC interpreter, and much of the sample code are written using 64Tass, which can be found at: https://sourceforge.net/projects/tass64/.
  
Data and programs can be sent to the C256 Foenix over the USB debug port (the USB port on the right side of the board, next to the expansion connector).
+
== WDC816CC ==
The debug interface is a USB serial port which requires a driver to be installed on the host system. The drivers for the serial USB device (XR21V1411) can be found at: https://www.maxlinear.com/support/design-tools/software-drivers.
 
  
== Uploading with the Foenix IDE ==
+
Assembly seems to be the language of choice. But for those looking for something more portable, WDC provides a C-compiler. It's not necessarily more easy to use than assembly as Foenix programming is very close to the metal and it has some quirks. But if you have any skill using C on other platforms it will make you feel right at home and it does not require you to learn 65816 specific opcodes. Good assembly will always be the better performer however. You can even mix both if you want to. For some pointers on using the compile see [[C-compiler use]]
  
To setup the Foenix IDE, not much is required beyond copying or cloning the repository from GitHub. There is no special installation required, and the EXE should just run.
+
== The Monitor ==
 +
The bundled C256 BASIC816 includes a monitor; simply type MONITOR <ENTER> at the READY prompt! 
  
To upload a BIN or HEX file with the Foenix IDE's user interface:
+
The commands are as follows; see the sources for more details:  
 
+
* https://github.com/pweingar/BASIC816/blob/master/src/monitor.s
# Select the Tools > Uploader menu option. An "Uploader Window" will open.
+
{|
# Select the COM port associated with the C256 debug interface in the drop down selector.
+
|'''Cmd''' || '''Command''' || '''Params'''
# Click the "Connect" button to establish a connection to the C256.
+
|-
# Click the button labeled with ellipsis (...) to select the file to upload. By default, the uploader will show BIN files, but you can choose to search for HEX files instead.
+
| A  ||  ASSEMBLE  ||  [Start] [Assembly code]
# If you are uploading a BIN file, enter the starting destination address in the field "C256 Dest Address". This step is not needed with HEX files, since they have the destination addresses for their data included.
+
|-
# Click the "Send Binary" button to start the upload process.
+
| C  ||  COMPARE  ||  Start1 Start2 [Len (1 if blank)]
 
+
|-
[[File:Foenix IDE Uploader.png]]
+
| D  ||  DISASSEMBLE  || Start [End]
 
+
|-
== Uploading with the C256Mgr ==
+
| F  ||  FILL  ||      Start End Byte
 
+
|-
To install the C256Mgr, you will need to make sure you have Python 3.7 installed as well as the PySerial library. You will need to edit the c256.ini file to set the default COM port and LBL file for your project, although both settings can be overridden by the command line options.
+
| G  ||  GO    ||      [Address]
 
+
|-
Once the manager is installed and configured correctly, there are two batch files that can be used to upload a file to the C256:
+
|J  ||    JUMP ||        [Address]
 
+
|-
; Binary
+
|H  ||  HUNT (find)||  Start End Byte [Byte]...
: To upload a binary file, you use the UPLOAD.BAT file, which takes a BIN file and destination address (in hex) as arguments:
+
|-
<code>upload kernel.bin 380000</code>
+
|L  ||  LOAD      ||  "File" [Device] [Start]
 
+
|-
; HEX File
+
|M  ||  MEMORY    ||  [Start] [End]
: To upload an Intel HEX file, you use the RUN256.BAT file, which takes just the HEX file as an argument:
+
|-
<code>run256 hello.hex</code>
+
|R  ||  REGISTERS  ||  Register [Value] (A 1234, F 00100011)
 +
|-
 +
|S  ||  SAVE      ||  "File" Device Start End
 +
|-
 +
|T  ||  TRANSFER  ||  Start End Destination
 +
|-
 +
|V  ||  VERIFY    ||  "File" [Device] [Start]
 +
|-
 +
|X  ||  EXIT
 +
|-
 +
|> ||  MODIFY    ||  Start Byte [Byte]...
 +
|-
 +
|@  ||  DOS      ||  [Command] Returns drive status if no params.
 +
|-
 +
|?  ||  HELP      ||  Display a short help screen
 +
|}

Latest revision as of 14:34, 16 February 2020


Foenix IDE

The Foenix IDE is a full-featured emulator and board manager tool written in C#. The bulk of the Foenix IDE is an emulator of the C256 Foenix which emulates several key systems of the C256 and allows for breakpoints in the code, examination of memory, and so on. The IDE can also connect to the physical C256 through the USB debug interface. It can use the interface to upload data from a BIN file, an Intel HEX file, or the IDE emulator's memory into the C256, download memory from the C256 into the emulator's memory to be examined through the IDE, or to reprogram the C256's flash memory. Although a GUI application by default, the IDE can be used as a command line tool. The IDE also includes a character set / font editor tool, allowing you to design your own characters to use in your C256 programs. The source code for the IDE as well as the latest binary can be found at: https://github.com/Trinity-11/FoenixIDE.

64Tass

Although any assembler that can produce 65816 code can be used to write code for the C256, the kernel, BASIC interpreter, and much of the sample code are written using 64Tass, which can be found at: https://sourceforge.net/projects/tass64/.

WDC816CC

Assembly seems to be the language of choice. But for those looking for something more portable, WDC provides a C-compiler. It's not necessarily more easy to use than assembly as Foenix programming is very close to the metal and it has some quirks. But if you have any skill using C on other platforms it will make you feel right at home and it does not require you to learn 65816 specific opcodes. Good assembly will always be the better performer however. You can even mix both if you want to. For some pointers on using the compile see C-compiler use

The Monitor

The bundled C256 BASIC816 includes a monitor; simply type MONITOR <ENTER> at the READY prompt!

The commands are as follows; see the sources for more details:

Cmd Command Params
A ASSEMBLE [Start] [Assembly code]
C COMPARE Start1 Start2 [Len (1 if blank)]
D DISASSEMBLE Start [End]
F FILL Start End Byte
G GO [Address]
J JUMP [Address]
H HUNT (find) Start End Byte [Byte]...
L LOAD "File" [Device] [Start]
M MEMORY [Start] [End]
R REGISTERS Register [Value] (A 1234, F 00100011)
S SAVE "File" Device Start End
T TRANSFER Start End Destination
V VERIFY "File" [Device] [Start]
X EXIT
> MODIFY Start Byte [Byte]...
@ DOS [Command] Returns drive status if no params.
? HELP Display a short help screen