Closed Laci1953 closed 3 years ago
Hi @Laci1953.
Yes it's strange.
That error can only occur in the read_com
function when reading the COM file.
Computing its size in 128 byte records:
// Get the file size in bytes
if((com_size = fsize(com_fname)) == -1) {
err_read();
}
com_size *= 128;
Opening the file:
// Read the file into memory
if(!(fp = fopen(com_fname, "rb"))) {
err_read();
}
Reading its contents into memory:
if(fread(com_buf, com_size, 1, fp) != 1) {
err_read();
}
What TE COM adaptation are you trying to patch?
The emulator is running CP/M v2 or v3?
Do you have enough TPA?
Have you tried in another emulator?
Hi,
Sorry, I have only Udo Munk's Z80PACK I suggest you to test your product on Z80PACK... regards,Ladislau
On Tuesday, September 14, 2021, 01:20:36 AM GMT+3, MiguelVis @.***> wrote:
Hi @Laci1953.
Yes it's strange.
That error can only occur in the read_com function when reading the COM file.
Computing its size in 128 byte records: // Get the file size in bytes if((com_size = fsize(com_fname)) == -1) { err_read(); }
com_size *= 128;
Opening the file: // Read the file into memory if(!(fp = fopen(com_fname, "rb"))) { err_read(); }
Reading its contents into memory: if(fread(com_buf, com_size, 1, fp) != 1) { err_read(); }
What TE COM adaptation are you trying to patch?
The emulator is running CP/M v2 or v3?
Do you have enough TPA?
Have you tried in another emulator?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Hi @Laci1953.
Fixed with commit 239754c.
There was a bug in the function fsize()
from the MESCC library fileio.h
due to different behaviour in CP/M v2 & v3 BDOS 35 Compute file size
.
Now it solved and TECF.COM
works as expected.
Thanks for opening the issue.
I modified TE.CF : ... screen.columns = 120 ...
then tried to use TECF, but got the following error message :
J>tecf patch te.com te.cf TECF: Can't read file.
Why? te.com & te.cf are present:
J>sdir te.*
Directory For Drive J: User 0
TE BAK 2k 9 Dir RW TE CF 2k 9 Dir RW TE COM 20k 149 Dir RW
Total Bytes = 24k Total Records = 167 Files Found = 3 Total 1k Blocks = 23 Used/Max Dir Entries For Drive J: 346/1024
J>
Could this be caused by CP/M being executed in Udo Munk's Z80SIM? I do not know...