Pocket Station image display/conversion problem

General Programming help in C, C++ or ASM, Compiling / Debugging, and R3000A Central Processing Unit (CPU) information
Post Reply
fifth
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: Jul 14, 2016

Pocket Station image display/conversion problem

Post by fifth » July 14th, 2016, 7:53 pm

I recently started to study how to program stuff for Pocket Station. Thanks to username Orion_ for a helpful dev kit, I've managed to get a nice start in this journey. But now I've ran into a small problem, and I am not sure what is causing it.

I'm trying to import my image to Pocket Station code. The test image I am using looks like this:
Image

Above image is an 1 bit BMP file (32x32px). It needs to be converted to .bin file in order to be able to import to Pocket Station. I've done that with the "bmp2ps1b.exe" tool that came with the dev kit. The conversion is succesful and the compiler does not give any errors whatsoever.

However, when I bring that picture to my Pocket Station code, complile the code and run in emulator, the picture looks warped half way through, like this:

Image

So any idea why this is happening? Is it because the bmp2ps1b tool or what? I'm guessing the tool messes up something in the conversion process or that my import method in code is somehow flawed.

I have not programmed anything in C before, yet alone for an actual playstation device, so this is all new to me :D

User avatar
nocash
Verified
PSX Aficionado
PSX Aficionado
Posts: 548
Joined: Nov 12, 2012
Contact:

Post by nocash » July 15th, 2016, 2:48 am

Maybe a misaligned memory address? Doing 32bit reads/writes are working only at 4-byte aligned addresses, else the ARM is doing some weird rotations and/or ignoring the address LSBs.
You could also try to enable warnings (in no$gba's "Xcept" setup page), maybe that shows more info, it should trap those misalignments for example.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests