I was going to release this example last year but I forgot where I placed it until now. Unlike the memory card examples that came with the Psy-Q SDK which used _bu_init() and open() which tends to be unreliable, this one uses libmcrd which is a lot more reliable and is easier to use.
This example demonstrates the basics of handling Memory Cards such as detecting whether or not a card is attached, listing the files inside a card and creating a test save block. It does not display the title names and icons of save blocks though but it shouldn't be too difficult to implement it yourself.
Basic Memory Card Example
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
Basic Memory Card Example
You do not have the required permissions to view the files attached to this post.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
- kostasvs
- What is PSXDEV?
- Posts: 2
- Joined: Dec 28, 2018
- I am a: Gamedev Enthusiast
- PlayStation Model: SCPH-101
- Location: Greece
- Contact:
Sorry for the old bump (AFAIK there's no rule against it). In case anyone needs a psymake-compatible "makefile.mak", here's what worked for me:
If you get "Symbol [...] not defined" errors, you must add "libmcrd.lib" in the second line of C:\psyq\bin\PSYQ.INI. The one in "C:\psyq\psyq\PSYQ.INI" did not have any effect for me.
Finally, if you are testing with PSXeven, you have to "format" your memory cards using Tools --> Memcard Manager --> Format. The example tries to format them, but the changes don't seem to remain in the emulator if you don't format the cards manually.
LameGuy64, thank you so much for all your examples and posts. They have helped me a lot, and I'm sure they've helped everyone else too.
Code: Select all
# -----------------------------------------
# PlayStation 1 Psy-Q Makefile
# -----------------------------------------
all:
del memcard.exe
del memcard.cpe
cls
ccpsx -Xo$80010000 -O3 -Wall memcard.c -omemcard.cpe
cpe2x /ce memcard.cpe
Finally, if you are testing with PSXeven, you have to "format" your memory cards using Tools --> Memcard Manager --> Format. The example tries to format them, but the changes don't seem to remain in the emulator if you don't format the cards manually.
LameGuy64, thank you so much for all your examples and posts. They have helped me a lot, and I'm sure they've helped everyone else too.
- MrQuetch
- Active PSXDEV User
- Posts: 42
- Joined: Apr 01, 2018
- I am a: Programmer and artist.
- Motto: You can accomplish anything.
- Location: United States
I'm aware this is old, but thank you so much, kostavs! Your one and only post is legendary! You have saved me tons of hours. I had already spent a half-hour to an hour figuring out why I was receiving that error. It's strange the SDK developers didn't just stick that in - it would've been so fast and easy to.kostasvs wrote: ↑January 13th, 2019, 1:51 am Sorry for the old bump (AFAIK there's no rule against it). In case anyone needs a psymake-compatible "makefile.mak", here's what worked for me:If you get "Symbol [...] not defined" errors, you must add "libmcrd.lib" in the second line of C:\psyq\bin\PSYQ.INI. The one in "C:\psyq\psyq\PSYQ.INI" did not have any effect for me.Code: Select all
# ----------------------------------------- # PlayStation 1 Psy-Q Makefile # ----------------------------------------- all: del memcard.exe del memcard.cpe cls ccpsx -Xo$80010000 -O3 -Wall memcard.c -omemcard.cpe cpe2x /ce memcard.cpe
Finally, if you are testing with PSXeven, you have to "format" your memory cards using Tools --> Memcard Manager --> Format. The example tries to format them, but the changes don't seem to remain in the emulator if you don't format the cards manually.
LameGuy64, thank you so much for all your examples and posts. They have helped me a lot, and I'm sure they've helped everyone else too.
Who is online
Users browsing this forum: No registered users and 4 guests