My first PS1 program - pschip8

Start a work log and update it occasionally with your projects progress
Post Reply
User avatar
Dhust
Interested PSXDEV User
Interested PSXDEV User
Posts: 7
Joined: Jan 09, 2018
I am a: Programming and Electronics Student

My first PS1 program - pschip8

Post by Dhust » January 9th, 2018, 5:36 am

Link to the project: https://github.com/dhustkoder/pschip8
Hello guys, it's my first post. I've found this community in the past days as I was trying to program something for the PS1. I've got some programming experience so its going fine... I'm using PSYQ SDK on a Linux machine with WINE and DOSBOX to compile the project. I also use VirtualBox with Windows XP to test the project in other emulators like Xebra and no$psx those work best on Windows.
I decided to create a chip8 interpreter for the PS1 because its fast to code. I was working on a NES emulator but I have less time to spend on hobbies now, so its halted. The pschip8 already runs chip8 normal games.
I'm just using a simple framebuffer direct to the display area to show graphics, and a timer with milli second resolution using RCntCNT1. I need some help with: increasing the resolution of the timer to micro seconds. And scaling the graphics of the framebuffer to fill all the TV screen. I could write some code to scale it, but maybe theres SDK features that let me do that and I didn't see it yet.

Thank you guys.

Xavi92
Verified
C Programming Expert
C Programming Expert
Posts: 161
Joined: Oct 06, 2012
PlayStation Model: SCPH-5502
Contact:

Post by Xavi92 » January 9th, 2018, 6:06 am

Greetings and welcome to PSXDEV! Your CHIP8 project looks great indeed. I remember there also was another CHIP8 emulator written with PSXSDK, but I'm not sure whether the source code is still available. BTW, could you please provide BIN/CUE image files together with your source code so that those who aren't using PsyQ can still use your emulator?

Thanks a lot!
Xavi

User avatar
Dhust
Interested PSXDEV User
Interested PSXDEV User
Posts: 7
Joined: Jan 09, 2018
I am a: Programming and Electronics Student

Post by Dhust » January 9th, 2018, 7:40 am

Yeah thanks for the tip! :D I've added the ISO image cuz I'm not using bin/cue yet.

User avatar
CosmoGuy
Serious PSXDEV User
Serious PSXDEV User
Posts: 91
Joined: May 30, 2012
I am a: Hell knows who I am
PlayStation Model: SCPH-7502
Location: Polska, Wroclaw
Contact:

Post by CosmoGuy » January 14th, 2018, 1:51 am

Whoah,

Cool thing, keep it going :D
Image

likeabaus
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 133
Joined: Jul 27, 2016

Post by likeabaus » January 14th, 2018, 11:07 pm

This seems pretty neat! I don't have a functioning psx/PSOne at the moment, but would love to try this out on my PS2. Unfortunately, I don't have an optical drive in mine, but I can run it off usb using ps2psxe (epsxe ported to the PS2). I'll give it a shot when I get a chance and report back with my results :)

User avatar
Dhust
Interested PSXDEV User
Interested PSXDEV User
Posts: 7
Joined: Jan 09, 2018
I am a: Programming and Electronics Student

Post by Dhust » January 15th, 2018, 5:56 am

likeabaus wrote: January 14th, 2018, 11:07 pm This seems pretty neat! I don't have a functioning psx/PSOne at the moment, but would love to try this out on my PS2. Unfortunately, I don't have an optical drive in mine, but I can run it off usb using ps2psxe (epsxe ported to the PS2). I'll give it a shot when I get a chance and report back with my results :)
Thanks that would be great! I didn't had the chance to test on real hardware yet.

likeabaus
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 133
Joined: Jul 27, 2016

Post by likeabaus » January 16th, 2018, 12:17 am

I'll let you know when I get a chance. Just keep in mind that it'll being running within an emulator, not real hardware, when I test it lol.

User avatar
Dhust
Interested PSXDEV User
Interested PSXDEV User
Posts: 7
Joined: Jan 09, 2018
I am a: Programming and Electronics Student

Post by Dhust » January 16th, 2018, 1:29 am

likeabaus wrote: January 16th, 2018, 12:17 am I'll let you know when I get a chance. Just keep in mind that it'll being running within an emulator, not real hardware, when I test it lol.
Oh right, I see with epsxe ported to ps2. I was confused since some PS2 can run some PS1 games.

likeabaus
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 133
Joined: Jul 27, 2016

Post by likeabaus » January 21st, 2018, 11:33 pm

Yeah, my console lacks an optical drive, so the only way I can run psx/psone games is through an emulator sadly....

User avatar
Dhust
Interested PSXDEV User
Interested PSXDEV User
Posts: 7
Joined: Jan 09, 2018
I am a: Programming and Electronics Student

Post by Dhust » February 2nd, 2018, 11:51 pm

likeabaus wrote: January 21st, 2018, 11:33 pm Yeah, my console lacks an optical drive, so the only way I can run psx/psone games is through an emulator sadly....
Why you're using epsxe over the POPStarter which loads the PS2 native support for PS1 games through USB or HD. Do your PS2 lacks a mod chip ? or is it an Original PS2 without any mods ? or maybe the epsxe for PS2 is better...

likeabaus
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 133
Joined: Jul 27, 2016

Post by likeabaus » February 8th, 2018, 3:28 am

My console is softmodded (FMHD/FMCB)

User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » February 17th, 2018, 9:12 pm

Hi welcome!
Dhust wrote: January 9th, 2018, 5:36 am I need some help with: increasing the resolution of the timer to micro seconds. And scaling the graphics of the framebuffer to fill all the TV screen. I could write some code to scale it, but maybe theres SDK features that let me do that and I didn't see it yet.
Have you tried changing these defines?
https://github.com/dhustkoder/pschip8/b ... hip8.h#L12

I think for such a basic PS1 app (VRAM/controlers) PSXSDK would have been fine tho

User avatar
Dhust
Interested PSXDEV User
Interested PSXDEV User
Posts: 7
Joined: Jan 09, 2018
I am a: Programming and Electronics Student

Post by Dhust » February 26th, 2018, 7:00 am

gwald wrote: February 17th, 2018, 9:12 pm Hi welcome!
Dhust wrote: January 9th, 2018, 5:36 am I need some help with: increasing the resolution of the timer to micro seconds. And scaling the graphics of the framebuffer to fill all the TV screen. I could write some code to scale it, but maybe theres SDK features that let me do that and I didn't see it yet.
Have you tried changing these defines?
https://github.com/dhustkoder/pschip8/b ... hip8.h#L12

I think for such a basic PS1 app (VRAM/controlers) PSXSDK would have been fine tho
Thanks for the reply. I'm a Linux user and PSXSDK would've been an easier setup for me, but I couldn't get it installed properly. So I tried PSYQSDK... I'll try PSXSDK again some day.
About the scaling, I solved this problem when I learned to use the PSYQSDK GsSPRITE structure.
Now I can load the chip8 buffer into the VRAM and scale it, see here:
https://github.com/dhustkoder/pschip8/b ... tem.c#L423

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests