blog:pc98_djgpp_patchnotes

NEC PC-98 - DJGPP 2.03 Patch for PC-98

This is a machine-translated version of the notes included with the patch against DJGPP v2.03 to target PC-98 runtime environment.

=================================================== ============================
djgpp v2.03 libc patch for PC-AT/PC-9800 Rel.0
			      -- User's manual --
Copyright (C) 1997-2000 Suyu (takas) / All rights reserved.
=================================================== ============================

=================================================== ============================
 Chapter 0 Overview and Features
=================================================== ============================

This package is a collection of patches to make libc.a of djgpp v2.03 compatible with DOS/V 
environment of PC-AT successor and PC-9800 Series. It contains both source and binary differences.

Originally, djgpp v2 startup only recognized PC-98, and from v2.02, conio also includes the code 
for DOS/V environment, but they are all incomplete. I have no choice.

Rebuilding with this patched library should produce a binary that works on both PC-AT inheritors 
and PC-9800 unless you have written a direct dependency (...maybe (^^ ;;)

However, please note that this does not correspond to Japanese, so it is not.

For the original djgpp, see the original author DJ Delorie
http://www.delorie.com/djgpp/
Look at Also, the original distribution of djgpp should be mirrored in simtelnet all over the 
world, so please obtain it from a place close to the network.

=================================================== ============================
 Chapter 1 Compatible models
=================================================== ============================

Compatible models: PC-AT successor or PC-9801 and fully compatible
: Models that can use i80386 commands
Operating environment: PC-AT => DOS/V 5.0 or higher (us/jp compatible)
: PC-9800 => MS-DOS 5.00A or more
: PC-H98 => Operation not confirmed

=================================================== ============================
 Chapter 2 Patch Install
=================================================== ============================

[SKIPPED - THIS IS DEALT WITH ON MY WIKI

=================================================== ============================
  Chapter 3 Patch Details
 =================================================== ============================

(0) General

・Details
Please describe as much as possible in each file according to COPYING.DJ.
Please read the source for details.

・Save the original
In PC-AT English mode, I'm trying to be as insensitive to patches as possible.

・__Crt0_mtype
Store the model in int __crt0_mtype in crt1.c of startup, and all the operations 
after that are branched by this.

・Executable file size
Hello World is about 3KB larger than the original library.

(1) Compatible with PC-9800 Series

・Src\libc\bios\*.c
I am trying to emulate a PC-AT BIOS, but none of them are perfect. Also, I don't 
emulate the DISK BIOS because it doesn't make sense and it's just a trap.

・Src\libc\crt0\crt1.c
The recognition of PC-9800 is as original (ffff:0003 == fd80)
I'm afraid, but I'm quite anxious Is it possible to recognize the PC-H98?

・Src\libc\dos\dos\delay.c
For models without a time stamper, the method using horizontal frequency is used, 
but there is a considerable error under Windows.

・Src\libc\pc_hw\co80\*.c
It is trapping a function that includes all TVRAM access. There are some unimplemented 
functions.

・Src\libc\pc_hw\kb\*.c
It is almost completely transplanted.

・Src\libc\pc_hw\timer\*.c
clock() and uclock() are models that cannot use the time stamper.
Then the accuracy is totally insufficient.

・Src\libc\pc_hw\sound\*.c
It is almost completely transplanted.

・Other
Eliminates PC-AT BIOS calls and DOS common area references.

(2) Supports PC-AT DOS/V

・Src\libc\crt0\crt1.c
Perhaps it can be determined by PC-DOS/V.

・Src\libc\pc_hw\co80\*.c
Conio.c was being supported for DOS/V, but SC*.c was not supported, so I supported it.

=================================================== ============================
  Chapter 4 RENCLOCK
 =================================================== ============================

There is a clock.c in the source of djgpp libc.
However, NEC NEC MS-DOS 6.2 or earlier cannot create a file called clock.* because there 
is a CLOCK device. This limitation becomes an issue when making libc.

So I wrote a program that solves this problem by renaming the CLOCK device to CLOCK$. The 
source is attached as RENCLOCK.LZH. It is a COM/DEVICE type program that can be executed by 
both device driver and command line.

	[Execution method]
(CONFIG.SYS) DEVICE=RENCLOCK.COM
(AUTOEXEC.BAT) RENCLOCK

	[Operating environment]
Compatible models: PC-9800 Series and fully compatible
Operating environment: NEC MS-DOS 3.1 or above 6.2 or below

	[Copyright]
According to this package.
  • blog/pc98_djgpp_patchnotes.txt
  • Last modified: 2020/08/12 18:54
  • by john