blog:x68_devtools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blog:x68_devtools [2020/06/29 20:50] – [Documentation] johnblog:x68_devtools [2020/08/12 20:28] (current) – [The Lydux toolchain (GCC 4.6.2)] john
Line 1: Line 1:
-======= X68000 Development Tools =======+======= Sharp X68000 Development Tools =======
  
 ===== Documentation ===== ===== Documentation =====
Line 17: Line 17:
 {{:blog:inside_x68000.png?200|}} [[https://archive.org/details/InsideX680001992|archive.org]], {{ :blog:inside_x68000_1992_text_version_.pdf |local copy}} {{:blog:inside_x68000.png?200|}} [[https://archive.org/details/InsideX680001992|archive.org]], {{ :blog:inside_x68000_1992_text_version_.pdf |local copy}}
 {{:blog:outside_x68000.png?200|}} [[https://archive.org/details/OutsideX680001993|archive.org]], {{ :blog:outside_x68000_1993_text.pdf |local copy}}  {{:blog:outside_x68000.png?200|}} [[https://archive.org/details/OutsideX680001993|archive.org]], {{ :blog:outside_x68000_1993_text.pdf |local copy}} 
 +
 +----
 +
 +=== X68000 Programmers Reference ===
 +
 +Comprehensive set of programmers reference manuals covering most of the system calls, the use of (very early) GCC and GDB tools and more.
 +
 +{{:blog:x68000_programmers_reference_0.png?200|}}[[https://archive.org/details/X68kProgrammingSeries0X680x0Develop.LibcII1994|archive.org]], {{ :blog:x68k_programming_series_x680x0_develop_libc_ii_0_1994_text.pdf|local copy}} {{:blog:x68000_programmers_reference_1.png?200|}}[[https://archive.org/details/X68kProgrammingSeries1X680x0Develop.ManualBooksVol.2Reference19942|archive.org]], {{ :blog:x68k_programming_series_x680x0_develop_libc_ii_1_1994_text.pdf|local copy}} 
 +
 +{{:blog:x68000_programmers_reference_2.png?190|}}[[https://archive.org/details/X68kProgrammingSeries2X680x0LibcManualBooksVol.2ProgrammersReferernce1994|archive.org]], {{ :blog:x68k_programming_series_x680x0_develop_libc_ii_2_1994_text.pdf|local copy}}
 +
 +   * Blue book (#0) covers the install and use of early versions of GCC, HAS assembler and GDB
 +   * Red book (#1) covers the use of the early versions of GCC and the GDB debugger
 +   * Green book (#2) covers function calls available in old versions of GCC and doscalls (including better worded descriptions compared to 'Inside X68000' or the 'PUNI docs')
 +
 +It's fair to say that #0 has more assembly examples than #2, which is probably the one you want if you are interested in figuring out how to use the various X68000 system calls in //doscalls/dos.h//.
 +
 +//Do be aware that when the various libc function calls are listed, this is referring to the old version of GCC, and not the new version which comes with newlib and a smaller set of functions.
 +//
 +----
 +
 +=== Technical Data book ===
 +
 +Although not a programming reference per-se, the technical data book does contain some information that is useful to programmers; it covers a broad spectrum of topics - from CPU registers to a description of the X68000 mouse and its communications protocol.
 +
 +{{:blog:technical_data_book_x68000.png?200|}} [[https://archive.org/details/X68000_488|archive.org]], {{ :blog:x68000_text.pdf |local copy}}
 +
 +----
 +
 +=== X680x0 Game Programming with GCC ===
 +
 +This is another old book that describes how to use GCC (and period assembler and linker, such as HAS, as listed way down this page) to develop game software on the X68000.
 +
 +{{:blog:x6800_game_gcc.png?200|}} [[https://nfggames.com/X68000/Documentation/Books/X68000%20Game%20Programming%20with%20GCC%20(omnipage%20600dpi).pdf|NFG Games]], {{ :blog:x68000_game_programming_with_gcc_omnipage_600dpi_.pdf|local copy}}
 +
 +{{:blog:gccx680x0gameprg1993.jpeg?200|}} Source code: [[https://archive.org/details/GCCX680x0GAMEPRG1993|archive.org]], {{ :blog:gccx680x0gameprg_1993.zip |local copy}}, {{ :blog:gccsample.zip|files extracted from disk images}}
 +
 +To be fair, the best source of material for this one is found in the example source code. Note: Disk 1 is just the old GCC compiler, the examples are found on Disk 2. You can either download the disk images and mount them in a real or emulated X68000, or download the extracted sample files so that you can view them with any normal text editor. Be aware that some of the code uses S-JIS encoded for actual function names!!!
 +
  
 ---- ----
Line 35: Line 74:
 | code.rtf | Note sure what this is - a character encoding table?? | {{ :blog:code.rtf |}} | - | | code.rtf | Note sure what this is - a character encoding table?? | {{ :blog:code.rtf |}} | - |
 | condition.rtf | Explanation of the condition bits in status registers resulting from arithmetic operations. | {{ :blog:condition.rtf |}} | - | | condition.rtf | Explanation of the condition bits in status registers resulting from arithmetic operations. | {{ :blog:condition.rtf |}} | - |
-| doscall.rtf | List of the available DOS/Human68k system calls; open file, get character input, allocate memory, etc. | {{ :blog:doscall.rtf |}} | |+| doscall.rtf | List of the available DOS/Human68k system calls; open file, get character input, allocate memory, etc. | {{ :blog:doscall.rtf |}} | [[https://gamesx.com/wiki/doku.php?id=x68000:doscall|Gamesx Wiki]] |
 | fdformat.rtf | Table of the various supported 3.5" and 5.25" floppy disk formats and their layout (sectors/tracks/heads) etc. | {{ :blog:fdformat.rtf |}} | - | | fdformat.rtf | Table of the various supported 3.5" and 5.25" floppy disk formats and their layout (sectors/tracks/heads) etc. | {{ :blog:fdformat.rtf |}} | - |
 | fefunc.rtf | List of the available arithmetic operators, including multiplication and division, and their parameters. | {{ :blog:fefunc.rtf |}} | - | | fefunc.rtf | List of the available arithmetic operators, including multiplication and division, and their parameters. | {{ :blog:fefunc.rtf |}} | - |
Line 78: Line 117:
 Pre-built binaries for Linux: Pre-built binaries for Linux:
  
-   * {{ :blog:x68000_amd64_gcc-4.6.2.tar.bz2 |GCC 4.6.2 X68000 cross compiler}} (Linux x86_64 host)+   * {{ :blog:x68000_amd64_gcc-4.6.2-with-dos-align-fix.tar.bz2| GCC 4.6.2 +dos.h struct align bugfix}} (Linux x86_64 host)
  
 If you want to build the tools from source, here's a handy script that patches them with a required fix before install; you must apply the patch, as there is a bug in this version of GCC which will cause a segfault during compilation otherwise: If you want to build the tools from source, here's a handy script that patches them with a required fix before install; you must apply the patch, as there is a bug in this version of GCC which will cause a segfault during compilation otherwise:
    * {{ :blog:build_x68_gcc.zip |}} - Run the included bash script to configure and patch the source from Github    * {{ :blog:build_x68_gcc.zip |}} - Run the included bash script to configure and patch the source from Github
 +
 +Note as well, that the current distribution includes some C header prototypes that cause bus errors due to struct alignment problems. This is discussed here: https://nfggames.com/forum2/index.php?msg=41392
 +The pre-compiled bundle above already has the fixes applied to //dos.h//.
 + 
 +==== Makefiles & Compiling ====
  
 Using the toolchain: Using the toolchain:
  
-   * Download the archive and extract in /, it unpacks to /opt/toolchains/x68k+   * Download the pre-built binaries above and extract in /, it unpacks to /opt/toolchains/x68k
    * X68000 library functions are defined in:    * X68000 library functions are defined in:
      * /opt/toolchains/x68k/human68k/include/dos.h      * /opt/toolchains/x68k/human68k/include/dos.h
      * /opt/toolchains/x68k/human68k/include/iocs.h      * /opt/toolchains/x68k/human68k/include/iocs.h
    * Use the sample makefile below    * Use the sample makefile below
- +
 <code> <code>
 # Names of the compiler and friends # Names of the compiler and friends
  • blog/x68_devtools.1593460226.txt.gz
  • Last modified: 2020/06/29 20:50
  • by john