As title
During the course of running a program fopen can start failing to open files.
Why? What can I do?
Thoughts on how to fix? Known issue?
These are simple files on a CD that are in a 2nd level folder and have names like "file.dat"
fopen fails to open files on CD sometimes
-
- DCEmu Freak
- Posts: 86
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Wed Mar 14, 2018 12:22 am
- Has thanked: 16 times
- Been thanked: 19 times
-
- DCEmu Freak
- Posts: 86
- Joined: Wed Mar 14, 2018 12:22 am
- Has thanked: 16 times
- Been thanked: 19 times
Re: fopen fails to open files on CD sometimes
further info, you can see the directory listing mysteriously fails after failing to open pak4.pak
Code: Select all
Added packfile /cd/data/goldcup/pak1.pak (23 files)
Reading: /cd/data/goldcup
config.cfg / 2252
gfx.wad / 112828
launcher.cfg / 329
pak0.pak / 4111097
pak1.pak / 3074991
pak2.pak / 1508324
pak3.pak / 7331896
progs.dat / 487752
qcr.txt / 6065
rally.cfg / 3675
readme.txt / 209
Complete!
Added packfile /cd/data/goldcup/pak2.pak (5 files)
Reading: /cd/data/goldcup
config.cfg / 2252
gfx.wad / 112828
launcher.cfg / 329
pak0.pak / 4111097
pak1.pak / 3074991
pak2.pak / 1508324
pak3.pak / 7331896
progs.dat / 487752
qcr.txt / 6065
rally.cfg / 3675
readme.txt / 209
Complete!
Added packfile /cd/data/goldcup/pak3.pak (74 files)
Reading: /cd/data/goldcup
Complete!
[Sys_FileOpenRead] Error opening /cd/data/goldcup/pak4.pak: Success
Couldn't open /cd/data/goldcup/pak4.pak
Playing registered version.
COM_FindFile: Looking to find |gfx.wad|
PackFile: /cd/data/goldcup/pak0.pak : gfx.wad
Console initialized.
Exe: 15:21:33 Apr 3 2019
8.0 megabyte heap
COM_FindFile: Looking to find |gfx/palette.lmp|
COM_FindFile: searching: |/cd/data/goldcup/gfx/palette.lmp|
[Sys_FileTime]
Reading: /cd/data/goldcup
Complete!
[Sys_FileTime] Error opening |/cd/data/goldcup/gfx/palette.lmp| errno=9 | Bad file number
fopen: Bad file number
Not Found!
PackFile: /cd/data/id1/pak2.pak : gfx/palette.lmp
COM_FindFile: Looking to find |gfx/colormap.lmp|
COM_FindFile: searching: |/cd/data/goldcup/gfx/colormap.lmp|
[Sys_FileTime]
Reading: /cd/data/goldcup
Complete!
- BB Hood
- DC Developer
- Posts: 189
- Joined: Fri Mar 30, 2007 12:09 am
- Has thanked: 41 times
- Been thanked: 10 times
Re: fopen fails to open files on CD sometimes
Solution from the discord:
Max files you can open from CD is 8
kos/kernel/arch/dreamcast/include/dc/fs_iso9660.h : #define MAX_ISO_FILES 8
Hey BlueCrab maybe we can bump up this value up to 16?
Max files you can open from CD is 8
kos/kernel/arch/dreamcast/include/dc/fs_iso9660.h : #define MAX_ISO_FILES 8
Hey BlueCrab maybe we can bump up this value up to 16?