Login
Search for:


Previous | Next

From: Crown (all posts)
Date: 1998-07-05
Subject: Minus4 v1.6 fixes
Hi there,

Mike:
In 6502.c function ProcessScanLine line 2064, you should change if (charset>=0xc0) {
to if (charscreen>=0xc0) {
It seems that you half-fixed this bug, you changed 0xd0 to 0xc0,
but forgot to change charset to charscreen....

In disk.c function PrintName line 803 change AddMenu(1234,&s[0],0,0);
to AddMenu(0xff,&s[0],0,0);
This was needed because FileType of tMenuList is defined as uint8 and the parameter 1234 ends up in this structure tag.
Also change in disk.c LoadD64 function line 1072
if (pMenu->FileType!=1234) {
pMenu=GetInfo(MenuNumber);
to pMenu=GetInfo(MenuNumber);
if (pMenu->FileType!=0xff) {
So you have to change the order of the two lines, as otherwise variable pMenu will be acessed before its being initalized,
and also change the constant for the filetype. This was compiled with the warning that the result of the comparison will be always 1 ,
because 1234 couldn't fit into uint8 !!!

Also in the makefile put the option -bt=dos4g into the compiler flags. I was compiling the source with the Win95 hosted compilers.
As this option (the target OS) was not given, it assumed that I will compile for the host OS, which in this case was WinNT console application. This sets up different predefined DEFINE-s, and in the header file dos.h the definition of _dos_read is dependant on these DEFINE-s. (One of the pointer is defined as FAR under dos, but defined as normal pointer under NT, so this was giving me crashes on startup!!!)
This was hard to find, I even had to reverse engineer the C-librarys...

While I was searching for the above mentioned I also noted that in window.c in the function GetFileSize you don't close the directory with _dos_findclose(&ffblk). I'm not sure, but this could leak some resources (maybe FILE handles)!

Tibor Biczo / Crown of GOTU

Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon