Search found 69 matches

by Yagotzirck
March 12th, 2019, 2:38 am
Forum: Input/Output
Topic: How to get controller state?
Replies: 14
Views: 433

Re: How to get controller state?

I suppose that the Examples (Psy-Q) section should do. As for whether it's good or not to post it, that's highly subjective - I for one would say to go for it and let people judge for themselves (even though like I said in a previous post the code is a bit messy and with a lot of room for improvemen...
by Yagotzirck
March 11th, 2019, 11:51 pm
Forum: Input/Output
Topic: How to get controller state?
Replies: 14
Views: 433

Re: How to get controller state?

If the code's structure hasn't changed from the project you hosted it's pretty easy to figure out the issue: int main(void) { initialize(); while(1) { update(); draw(); display(); } } That piece of code is located in initialize(), which means it's executed only once at startup and never executed aga...
by Yagotzirck
March 10th, 2019, 10:33 am
Forum: Input/Output
Topic: How to get controller state?
Replies: 14
Views: 433

Re: How to get controller state?

Ah, glad you sorted it out :) It could've been deduced from LIBOVR46.PDF that PadGetState is meant to be used with PadInitDirect and not with PadInit(even though it wasn't specified in an explicit manner), but I didn't read it thoroughly enough to figure that out :shrug As for the noob part, that's ...
by Yagotzirck
March 10th, 2019, 9:09 am
Forum: Input/Output
Topic: How to get controller state?
Replies: 14
Views: 433

Re: How to get controller state?

OK, it looks like PadGetState() isn't liked by emulators at all - the best I could achieve was with no$psx using an original BIOS instead of nocash BIOS clone and it gave no errors, but still freezes at a black screen nonetheless :/

I'll try it on a real psx tomorrow and see what happens.
by Yagotzirck
March 10th, 2019, 4:47 am
Forum: Input/Output
Topic: How to get controller state?
Replies: 14
Views: 433

Re: How to get controller state?

That's a rather redundant way to check if controllers are connected, I'd advise to replace it with this: con_a = PadGetState(0) != PadStateDiscon; con_b = PadGetState(0x10) != PadStateDiscon; Notice that I used 0x10 since that's the correct code for pad 2 (you used 1 which is actually the code for M...
by Yagotzirck
March 10th, 2019, 3:29 am
Forum: Input/Output
Topic: How to get controller state?
Replies: 14
Views: 433

Re: How to get controller state?

Rhetorical question: did you bother to check the documentation LameGuy addressed you to? :? int PadGetState(int port) [...] Return value: [...] Value Macro (libpad.h) Controller connection state 0 PadStateDiscon Controller disconnected It took me literally 5 seconds to find it :roll:
by Yagotzirck
February 13th, 2019, 11:20 pm
Forum: Graphics/GPU
Topic: Convert TIM to BMP and Retain Semi-Transparency Data
Replies: 2
Views: 349

Re: Convert TIM to BMP and Retain Semi-Transparency Data

http://www.psxdev.net/forum/viewtopic.php?f=51&t=953 If the only transparencies involved are either full or 50%(mode 0) it should be trivial to code an ad-hoc converter (I could do it myself later on); if it has only full transparency all you'd have to do is check the palette's index corresponding t...
by Yagotzirck
January 31st, 2019, 11:46 am
Forum: General Chat / Messaging
Topic: Needed Help With VAG Playback!
Replies: 2
Views: 593

Re: Needed Help With VAG Playback!

That example definitely needs some fixing - aside from the fact that it's meant to be used with xploder + caetla, even after adjusting it for emulators by embedding the .VAG file in the exe it works only with pedobear.vag, for the simple reason that it uploads the file to SPU RAM starting from offse...
by Yagotzirck
December 18th, 2018, 1:26 am
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 3863

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

How are tpri->code[0]'s lower 2 bytes undefined (Unless the "xxxx" part means something else)? I initially guessed that you used LUI instruction, but AFAIK it zeroes out the lower 2 bytes :shrug Anyway, any clue about how it got fixed, or did a simple recompilation without changing anything fix it? ...
by Yagotzirck
December 18th, 2018, 12:11 am
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 3863

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

And there was also an instance where performing an OR operation behaved like I was doing an = operation instead: // To avoid confusion, these are from homebrew libs of my own that follow Sony's syntax typedef struct { unsigned int tag; unsigned int code[1]; } DR_TPAGE; DR_TPAGE *tpri = (DR_TPAGE*)n...
by Yagotzirck
December 17th, 2018, 8:31 am
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 3863

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

I'm not the best C coder, but isn't do while(1); an infinite loop? I think he means that the compiler discards the dummy multiplication/addition operations followed by the two calls to somefunc(), rather than doing a 1:1 assembly translation... It's hard to guess since he didn't post the code for s...
by Yagotzirck
December 13th, 2018, 9:48 am
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 3863

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

I know, I was wondering if he declared the hardware register he was talking about as volatile and the compiler still optimized it away, or if he declared it as a "normal" variable and had to resort to the kludge he mentioned... in the latter case I wouldn't call it a compiler-related bug, more like ...
by Yagotzirck
December 10th, 2018, 10:32 pm
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 3863

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

Well, the only compiler related bug I've encountered was having a while() statement that waits for a specific hardware register to change with no code in it would sometimes produce an indefinite loop (branch instruction jumping to itself) but that was fixed by putting some dummy logic into said whi...
by Yagotzirck
December 5th, 2018, 9:40 pm
Forum: Homebrew (General)
Topic: Quadrilateral Conundrum
Replies: 5
Views: 1120

Re: Quadrilateral Conundrum

Aside from putting function definitions inside another .c file rather than inside headers, you should also put include guards in your header files to avoid problems such as the one mentioned by Xavi. It's no hassle at all, e.g. in DRW.H you should put something like this at the beginning of the file...
by Yagotzirck
November 12th, 2018, 2:40 am
Forum: Programming/CPU
Topic: SERIOUS TOPIC : What about a full tutorial ?
Replies: 28
Views: 3666

Re: SERIOUS TOPIC : What about a full tutorial ?

For Yagotzirck, I just propose to do a full tutorial BECAUSE I can't find it on the internet (this is too specific). And it's not "for me", but for beginners, because if they learn with the tutorial, they will want to try themselves to make a game with what they learn. You think I'm just someone as...
by Yagotzirck
November 9th, 2018, 11:18 am
Forum: Programming/CPU
Topic: SERIOUS TOPIC : What about a full tutorial ?
Replies: 28
Views: 3666

Re: SERIOUS TOPIC : What about a full tutorial ?

You didn't ask for help; asking for help would have been along the lines of "I tried everything I could to achieve X but I couldn't find a way around it, what can I do?" What you did instead was asking for someone else to do all the heavylifting for you without giving any hint about what your curren...
by Yagotzirck
June 30th, 2018, 2:13 am
Forum: Sound/SPU
Topic: How Can I Rip Resident Evil 3 Background Theme ?
Replies: 1
Views: 956

Re: How Can I Rip Resident Evil 3 Background Theme ?

You can't rip it as a sound since it's sequenced music(think of MIDI with a custom soundfont), and you won't find any tool that automatically extracts it; the process to extract PSFs is a bit complicated . The good news though is that RE3's OST has been ripped already: link You'll need one of those ...
by Yagotzirck
June 22nd, 2018, 2:17 am
Forum: General Chat / Messaging
Topic: hoping to start psxdev as a hobby
Replies: 12
Views: 2527

Re: hoping to start psxdev as a hobby

I don't think anyone was being 'discouraging' here, just giving real advice . It's not 1998, PC/mobile/web development is a lot easier now, even embedded development is 'child friendly'. And C, even in embedded development its regarded as old. Android developer, generally means java, which is what ...
by Yagotzirck
June 20th, 2018, 10:18 am
Forum: General Chat / Messaging
Topic: hoping to start psxdev as a hobby
Replies: 12
Views: 2527

Re: hoping to start psxdev as a hobby

I don't mean to discourage you or anything but if you have a hard time making games for android, making them for the psx is probably going to be an even bigger challenge since unlike android, abstraction is pretty much nonexistent and you're forced to interact with the hardware at a low level even f...
by Yagotzirck
April 9th, 2018, 8:02 am
Forum: Work Logs / Projects
Topic: Project Scarlet - My very own 3D engine for the PSX
Replies: 21
Views: 6973

Re: Project Scarlet - My very own 3D engine for the PSX

That's some commitment over there - well done :clap