Difference between revisions of "Human 68k"

From Free Pascal wiki
Jump to navigationJump to search
(Human 68k first paga)
 
Line 3: Line 3:
 
The Human 68k port is an experimental "just for fun" [[m68k]] target. It targets the Sharp X68000 line of computers, that existed from the mid-80s to the mid-90s as a Japanese-only home computer and gaming console, and their operating system, the MS-DOS-alike Human 68k by Hudson Soft. This port is currently a cross-compiler only target. This is mostly due to hardware limitations of the original unexpanded platform.
 
The Human 68k port is an experimental "just for fun" [[m68k]] target. It targets the Sharp X68000 line of computers, that existed from the mid-80s to the mid-90s as a Japanese-only home computer and gaming console, and their operating system, the MS-DOS-alike Human 68k by Hudson Soft. This port is currently a cross-compiler only target. This is mostly due to hardware limitations of the original unexpanded platform.
  
The initial version of the QL port was implemented by [[User:Chain-Q|Karoly Balogh]].
+
The initial version of the Human 68k port was implemented by [[User:Chain-Q|Karoly Balogh]].
  
 
=Requirements=
 
=Requirements=

Revision as of 19:39, 19 November 2023

WIP page, ignore for now!

The Human 68k port is an experimental "just for fun" m68k target. It targets the Sharp X68000 line of computers, that existed from the mid-80s to the mid-90s as a Japanese-only home computer and gaming console, and their operating system, the MS-DOS-alike Human 68k by Hudson Soft. This port is currently a cross-compiler only target. This is mostly due to hardware limitations of the original unexpanded platform.

The initial version of the Human 68k port was implemented by Karoly Balogh.

Requirements

The compiled binaries - depending on the size - should be able to run on any Sharp X68000. Memory expansion for more complex programs is highly recommended.

Identification

To identify the Human 68k compile-time, use {$IFDEF HUMAN68K}.

Defaults

This section documents several compiler default settings, which are specific to the Human 68k target. Settings not documented here are usually the default for the m68k CPU architecture.

CPU

The default CPU target for the Human 68k target is the 68000. This is different from most other m68k targets where the default is the 68020. The SoftFPU is enabled by default.

Alignment

Record elements are aligned to WORD (2 bytes) by default. Use the {$PACKRECORDS n} compiler directive, if you want to change the default aligment. For byte aligned records, a packed record is also possible. Free Pascal also has support for the 68000 special alignment requirements.

Stack

The default stack size is set to 16 KiB, which is quite small for a complex Pascal program. For more complex programs you'll probably need to increase it. To change the stack size, use the {SMEMORY <stacksize>,<heapsize>} directive, or the -Cs command line argument. See the details in the documentation.


External Dependencies

The Human 68k port depends on vasm and vlink, as external assembler and linker.

Assembler

The only supported assembler for the Human 68k port is vasm, which is also the default. The Human 68k port uses ELF as the default object format. This means using vasm also requires vlink as linker. vasm is open source, and it is available here. Only vasm versions 1.9f and newer were tested with the Human 68k port, older versions might not work.

Building vasm

Note that vasm for m68k needs to be built with the standard syntax module to work with Free Pascal. This is not the default, as most programmers and compilers prefer the Motorola syntax module. A vasm version with the standard syntax module can be built with the following command, issued in the root of the vasm source tree:

 make CPU=m68k SYNTAX=std

The resulting vasmm68k_std executable file is the assembler Free Pascal needs.

Linker

The Human 68k port defaults to vlink by Frank Wille as the default linker, which is the only supported linker for this target. vlink is open source, and it is available here.

Please make sure you use vlink version 0.17a or newer. Earlier versions were never tested.

Licensing

Please note that the license of vasm and vlink does not allow development of commercial applications. If you plan to develop and sell a commercial application using these tools, you need their author's written consent. Please see the documentation of vasm and vlink for details.