Post by elmer on Nov 28, 2018 23:22:02 GMT
******************************************************************************
******************************************************************************
Elmer's PC-FX Programming Resource Links
******************************************************************************
******************************************************************************
2018-11-28 Created this message to be a "sticky" for the all sorts of PC-FX tools and information.
2018-12-10 Added my customized version of Mednafen (same as on the PCE sticky).
2022-02-02 Add information about ISOlink.
Here are some links to programming information for the PC-FX.
Official NEC/Hudson PC-FXGA DOS/V SDK
For Japanese DOS/V and Windows95 computers. Includes programming docs in Windows 3 ".WRI" format.
Official NEC V810 CPU Documentation
On the new PlanetVB website.
Nintendo's V810 Programming Seminars
On the new PlanetVB website.
Please note that ...
If the links break, then you can try here ...
Official NEC V810 CPU Documentation
On the Wayback Machine's archive of the old PlanetVB website.
Nintendo's V810 Programming Seminars
On the Wayback Machine's archive of the old PlanetVB website.
Here is a work-in-progress toolchain for PC-FX development.
It is based on my update (almost a complete re-write) of the old Japanese GCC 2.95 patches that Japanese PC-FXGA developers created in late 2000, together with update versions of Alex Marshall's abandoned work from 2011 to create a library and supporting tools for PC-FX development.
The 'new' GCC compiler has been used by the VirtualBoy homebrew community for the last two years, and seems stable.
Since this is still only a work-in-progress, I'm not releasing a downloadable snapshot of the tools, but the source is up on github for the adventurous.
v810-gcc
liberis
pcfxtools
The old Japanese Win32 homebrew build of GCC 2.95 and its PC-FX libraries, developed by APC-Project and HyperClub, can be downloaded from the WayBack machine here ...
APC-Project's website (with their old 2000-dated build of GCC 2.95)
HyperClub's website (with PC-FX libraries for GCC 2.95)
Please note that this old build and libraries are not compatible with my GCC4 toolset, because I have changed the underlying V810 ABI to be more efficient for future projects, at the expense of compatibility with the old ABI from 1995.
In technical terms, the new ABI creates an incompatible stack-frame including a dedicated frame-pointer, and it dedicates the previously-unused R2 (HSP) register as the frame-pointer, and the previously-unused R5 (TP) register as a pointer to a new 64KByte-maximum area for thread-specific variables.
Here is my customized "no-eyestrain" version of the Mednafen emulator for the PC Engine, PC-FX, VirtualBoy, PlayStation and WonderSwan.
It increases the size of Mednafen's debugging displays and fonts so that they are more pleasant to use while developing homebrew or translation patches.
The result looks something like this ...
Rather than the headache-inducing original ...
In addition, the PCE emulation has 480KB of SCD RAM (banks $44-$7F), plus the 2MB ACD RAM (banks $40-$43), and the PC-FX emulation has 8MB RAM.
The extra RAM can be useful during homebrew development as a place to store debugging-info.
It might also be useful for someone that needs some extra memory for a translation, especially since the Turbo Everdrive2 provides that extra memory.
Mednafen General Documentation
mednafen.fobby.net/documentation/
Mednafen Debugger Documentation
mednafen.fobby.net/documentation/debugger.html
You may wish to edit the mednafen.cfg configuration file to change the following settings ...
There are prebuilt versions for Windows (both 32-bit and 64-bit) that can be downloaded here ...
Win32 or Win64
A linux version can be built from the source code, and I've confirmed that it all works correctly on Debian.
The patches and build script themselves can be found on github here ...
github.com/jbrandwood/mednafen-happyeyes
ISOlink CD-ROM File Directory
Recent versions of HuC's ISOlink can build a bootable PC-FX CD, and also store a directory of the files that are in the CD-ROM's ISO track.
This directory is stored in the previously unused 512-byte space at the end of the second sector of the ISO, which contains the IPL's boot information.
As long as the game developer loads their initial boot program at memory location $8000 or higher, then when the boot program starts to execute, memory locations $6600-$67FF will hold a copy of the directory information.
The format of the directory is shown below ...
[/i]
******************************************************************************
Elmer's PC-FX Programming Resource Links
******************************************************************************
******************************************************************************
2018-11-28 Created this message to be a "sticky" for the all sorts of PC-FX tools and information.
2018-12-10 Added my customized version of Mednafen (same as on the PCE sticky).
2022-02-02 Add information about ISOlink.
2022-02-11 Add links to the old GCC 2.95 build.
2022-04-22 Fix links to the documents on the PlanetVB website.
Here are some links to programming information for the PC-FX.
Official NEC/Hudson PC-FXGA DOS/V SDK
For Japanese DOS/V and Windows95 computers. Includes programming docs in Windows 3 ".WRI" format.
Official NEC V810 CPU Documentation
On the new PlanetVB website.
Nintendo's V810 Programming Seminars
On the new PlanetVB website.
Please note that ...
- The V810 in the VirtualBoy is customized to add 6 new instructions that are not on the PC-FX.
- The VirtualBoy uses a 16-bit data bus, rather than the 32-bit data bus on the PC-FX, and so its cycle timings are different (slower).
- Unlike the PC-FX, the VirtualBoy maps I/O space on top of regular RAM space, and so it can use the V810's "in" instruction to load unsigned values.
If the links break, then you can try here ...
Official NEC V810 CPU Documentation
On the Wayback Machine's archive of the old PlanetVB website.
Nintendo's V810 Programming Seminars
On the Wayback Machine's archive of the old PlanetVB website.
Here is a work-in-progress toolchain for PC-FX development.
It is based on my update (almost a complete re-write) of the old Japanese GCC 2.95 patches that Japanese PC-FXGA developers created in late 2000, together with update versions of Alex Marshall's abandoned work from 2011 to create a library and supporting tools for PC-FX development.
The 'new' GCC compiler has been used by the VirtualBoy homebrew community for the last two years, and seems stable.
Since this is still only a work-in-progress, I'm not releasing a downloadable snapshot of the tools, but the source is up on github for the adventurous.
v810-gcc
liberis
pcfxtools
The old Japanese Win32 homebrew build of GCC 2.95 and its PC-FX libraries, developed by APC-Project and HyperClub, can be downloaded from the WayBack machine here ...
APC-Project's website (with their old 2000-dated build of GCC 2.95)
HyperClub's website (with PC-FX libraries for GCC 2.95)
Please note that this old build and libraries are not compatible with my GCC4 toolset, because I have changed the underlying V810 ABI to be more efficient for future projects, at the expense of compatibility with the old ABI from 1995.
In technical terms, the new ABI creates an incompatible stack-frame including a dedicated frame-pointer, and it dedicates the previously-unused R2 (HSP) register as the frame-pointer, and the previously-unused R5 (TP) register as a pointer to a new 64KByte-maximum area for thread-specific variables.
Here is my customized "no-eyestrain" version of the Mednafen emulator for the PC Engine, PC-FX, VirtualBoy, PlayStation and WonderSwan.
It increases the size of Mednafen's debugging displays and fonts so that they are more pleasant to use while developing homebrew or translation patches.
The result looks something like this ...
Rather than the headache-inducing original ...
In addition, the PCE emulation has 480KB of SCD RAM (banks $44-$7F), plus the 2MB ACD RAM (banks $40-$43), and the PC-FX emulation has 8MB RAM.
The extra RAM can be useful during homebrew development as a place to store debugging-info.
It might also be useful for someone that needs some extra memory for a translation, especially since the Turbo Everdrive2 provides that extra memory.
Mednafen General Documentation
mednafen.fobby.net/documentation/
Mednafen Debugger Documentation
mednafen.fobby.net/documentation/debugger.html
You may wish to edit the mednafen.cfg configuration file to change the following settings ...
; Automatically go into the debugger's step mode after a game is loaded (this is now the default).
debugger.autostepmode 1
; Force SuperGrafx emulation.
pce.forcesgx 1
; Treat the fast-forward button as a toggle.
fftoggle 1
There are prebuilt versions for Windows (both 32-bit and 64-bit) that can be downloaded here ...
Win32 or Win64
A linux version can be built from the source code, and I've confirmed that it all works correctly on Debian.
The patches and build script themselves can be found on github here ...
github.com/jbrandwood/mednafen-happyeyes
ISOlink CD-ROM File Directory
Recent versions of HuC's ISOlink can build a bootable PC-FX CD, and also store a directory of the files that are in the CD-ROM's ISO track.
This directory is stored in the previously unused 512-byte space at the end of the second sector of the ISO, which contains the IPL's boot information.
As long as the game developer loads their initial boot program at memory location $8000 or higher, then when the boot program starts to execute, memory locations $6600-$67FF will hold a copy of the directory information.
The format of the directory is shown below ...
$6600: 16-bit sector # of start of file 0 (255 files max)
$6602: 16-bit sector # of start of file 1 (255 files max)
$6604: 16-bit sector # of start of file 2 (255 files max)
...
$67FC: 16-bit sector # of start of file 254 (255 files max)
$67FE: 16-bit sector # of after of file 254 (255 files max)
$6600: # of files stored on CD-ROM
$6601: index # of 1st file beyond 256MB
All files are stored on the CD with 2-sector (4KByte) alignment, and the directory entries are stored divided-by-2 to allow for a larger ISO track than on the PC Engine.
File 0 is the IPL (starts at sector 0, length 2 sectors)
File 1 is the game's boot file (starts at sector 2, length ? sectors)
File 2+ are the other files that are specified on the ISOlink command line
There is space for up to 255 files (including the IPL), and the ISO track can be a maximum size of 512MB.
In order to allow for files that start beyond the 16-bit limit of the sector number, the directory stores the index of the first file that starts beyond that boundary.
Because file 0 (the IPL) always starts at LBA 0, its directory entry is used to hold the #-of-files and index-beyond-256MB instead.
Note that file 1 does not always have to start at sector 2, because a custom IPL file can be any size.
[/i]