When I use exe for debug on my psx emulator when running cd type function
In the development librarys will the exe be able to get the library’s like if it was using the cd but virtually or will I have to use a program to turn the files or modify the files to be read by the exe and if so can someone point me in the right direction
Cd functions when using exe
-
Administrator Verified
- Admin / PSXDEV
- Posts: 2689
- Joined: Dec 31, 2012
- I am a: Shadow
- PlayStation Model: H2000/5502
If you're using an emulator, you can read the files from the CD (be it via malloc or a hard coded memory location). Otherwise, you will need to include them as raw binary data in the EXE itself which wastes a lot of BSS room. If you're making a game, I'd recommend using some malloc routines when using the CD so you can load data into the heap, use it as needed and then free that heap space for other stuff later.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.
PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.
PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.
-
Verified
- C Programming Expert
- Posts: 161
- Joined: Oct 06, 2012
- PlayStation Model: SCPH-5502
- Contact:
If using fread(3) to read CD-ROM data, a more space-efficient (although possibly a bit slower) alternative is buffered I/O. This means the underlying libc implementation stores a sector-sized (i.e., 2048 byte) cache in order to allow applications to read from memory (which is faster than CD-ROM access) as long as it resides within the same sector. I keep a forked copy of PSXSDK where I have implemented this.Shadow wrote:I'd recommend using some malloc routines when using the CD so you can load data into the heap, use it as needed and then free that heap space for other stuff later.
If using buffered I/O, applications do not need to allocate a large amount of memory to read a complete file, but only the exact amount of bytes that are needed, and let the libc implementation do the rest. This is an example from a video game I am working on, where small amounts of memory are allocated on the stack to read a TIM file from CD-ROM to GPU.
Who is online
Users browsing this forum: No registered users and 6 guests