PS1/2 BatteryCheck - PS2

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,418
Trophies
2
XP
14,853
Country
Germany
Sorry for the very slow reaction, @Archerite. Doing anything that requires concentration is impossible at times. Again: Sorry.

Finally I got around to do some quick tests. Question: Is there any difference between v0.3.2 and v0.3.3 besides the video modes?

Did not experience any crashes. Runs smoothly.
The PAL 576i looks considerably worse than the others on my plasma TV with intense flickering. Maybe I can even record this with a camera. Flickering is also present in the NTSC 480i mode on the areas with wall tiles (water areas). The 480p version looks by far the best with no flickering whatsoever. All three versions tested with a component cable.

I will hook up a PS2 to my huge beast of a CRT on the attic as well to test composite and RGB-Scart (If I can find a cable in my mess).

Good luck for finishing this game! It would be a major homebrew application.
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,480
Country
Netherlands
Sorry for the very slow reaction, @Archerite. Doing anything that requires concentration is impossible at times. Again: Sorry.

Finally I got around to do some quick tests. Question: Is there any difference between v0.3.2 and v0.3.3 besides the video modes?

Did not experience any crashes. Runs smoothly.
The PAL 576i looks considerably worse than the others on my plasma TV with intense flickering. Maybe I can even record this with a camera. Flickering is also present in the NTSC 480i mode on the areas with wall tiles (water areas). The 480p version looks by far the best with no flickering whatsoever. All three versions tested with a component cable.

I will hook up a PS2 to my huge beast of a CRT on the attic as well to test composite and RGB-Scart (If I can find a cable in my mess).
Don't worry about it:D

No, there is no difference other than the video modes. I just made them because niuus could not test it on his CRT with the 480p video output. The next version will either auto-detect or have a config file where you can change this.

I am glad you had no crashes either....as I have had a ton of them fixing the bugs! hahaha:lol: The flickering in the PAL and NTSC modes might come from the fact that the signal is interlaced. It does indeed looks awful in the water areas on the tiles. The same happens on the wii if you use composite cables I think. Great to hear that besides the flickering all versions worked for you. :D

It would really be awesome if I had the space to permanently keep a big CRT hooked up! I have one in storage since a few months though...so some day it will happen!:D
Good luck for finishing this game! It would be a major homebrew application.
Thanks, it may take a few more years to complete at the current rate of progress. But it will be awesome when finished!
 
  • Like
Reactions: niuus

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
The next version will either auto-detect or have a config file where you can change this.
Not sure how auto will work out, but just in case, a small tip: there is a common error made by some devs where they assume that detecting video output just based on the type of cable is the best way. But! I could be using component output for sweet crisp 240p (both on CRT & LCD), 480i, as well as nice 480p on the same LCD TV. I've seen a lot of users suffer because of that choice, specially on Gamecube, for those lucky enough with component cables coupled with CRT TVs.

I think the middle ground tends to be, in the case of having an option inside a menu in-game, is starting in 480i so the user selects whichever is best for the display, since that resolution will always be supported.

The PAL 576i looks considerably worse than the others on my plasma TV with intense flickering. Maybe I can even record this with a camera. Flickering is also present in the NTSC 480i mode on the areas with wall tiles (water areas). The 480p version looks by far the best with no flickering whatsoever. All three versions tested with a component cable
Of course there will be flickering on progressive displays, it's an interlaced video signal (480i).
 

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,480
Country
Netherlands
Not sure how auto will work out, but just in case, a small tip: there is a common error made by some devs where they assume that detecting video output just based on the type of cable is the best way. But! I could be using component output for sweet crisp 240p (both on CRT & LCD), 480i, as well as nice 480p on the same LCD TV. I've seen a lot of users suffer because of that choice, specially on Gamecube, for those lucky enough with component cables coupled with CRT TVs.

I think the middle ground tends to be, in the case of having an option inside a menu in-game, is starting in 480i so the user selects whichever is best for the display, since that resolution will always be supported.
I was thinking about detecting the console region to select a safe value between NTSC and PAL when launching the first time. I was also thinking to just "borrow" the setting used in uLaunchELF from the memorycard as the "safe value". Then an in-game configuration could change it and write that to my own config file. It's a complex subject and I will look into it in more detail later for all consoles I release this game on. For now I just want the "demo's and preview" to use a simple default that works. If for the PS2 that means compiling three versions for now that would be "ok". :)

Right now I was working on making the collectables work again with the new "event system" I had created. While a ton of helper functions provide a bit of readability...there is still a lot of stuff that needs to be added for such a simple thing as "remove battery from map. add +1 to counter!" Now imagine what's needed for complex stuff like the conveyors, elevators and battery holders!!!! hahahaha:rofl2:

I was also playing around with the sound on the PS2. As usual it works in the emulator....but crashes on the hardware!! It looks like libmikmod is doing something it should not be doing....or I am forgetting something. The emulator does give an error and continues into the game and it plays the background music just fine! The sound effect's don't work as the old libmikmod version that's provided in PS2DEV is 15 YEARS OLD!!!! And it does not have the function to load a sample from memory...only from files! maybe it does support it but not as convenient as the newer version does! So...yeah....sound is going to be a while on the PS2. Because besides the issues with libmikmod just loading the samples into memory gives graphics corruption for some reason! It might be using to much memory or something. There is ofcourse only 32MB of ram for everything on the PS2! ^_^

Thanks for the tip on the video detection. I'll try to keep it in mind, but I am sure you will tell me again if things are broken. :yay:
 

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,418
Trophies
2
XP
14,853
Country
Germany
[…]Of course there will be flickering on progressive displays, it's an interlaced video signal (480i).
I only mentioned the flickering because it seemed to be noticeably more than on commercial games with the same console, cable and TV. The 480p version doesn't flicker, looks crisp and clear – picture as good as on commercial games.


[…] Because besides the issues with libmikmod just loading the samples into memory gives graphics corruption for some reason! It might be using to much memory or something. There is ofcourse only 32MB of ram for everything on the PS2! ^_^
Are you trying to load everything to RAM at the beginning? Being not a developer (I can write some very simple programs in BASIC, C, C++, Java), I have really no clue how to do such things. 32 MB should suffice to run the game though as the official minimum requirement for Jazz Jackrabbit 2 was 16MB (while Windows 95 is loaded…)
Again: Totally naive way of looking at this. I have really no clue how a game organizes data.¹

I still have the huge Box in which the Jazz 2 came back then (requirements at the very bottom)
Jazz.jpg



________________________
¹ From experimenting and from listening I can say that many PlayStation 1 games stream their music from CD, even those which do not have CDDA tracks which can be played in a 1980s CD player. The music quality is often next to perfect, even on good HiFi equipment, while sound effects and sometimes voice acting may sound compressed or muffled. This makes me think that the needed sound effects for a level are indeed loaded to the small PS1 RAM – makes sense since sound effects must be available instantly and cannot wait for CD drive seeking.
 

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,480
Country
Netherlands
Are you trying to load everything to RAM at the beginning? Being not a developer (I can write some very simple programs in BASIC, C, C++, Java), I have really no clue how to do such things. 32 MB should suffice to run the game though as the official minimum requirement for Jazz Jackrabbit 2 was 16MB (while Windows 95 is loaded…)
Again: Totally naive way of looking at this. I have really no clue how a game organizes data.
Yes, as weird as it might seem to load everything into RAM there is actually very good reason for it. Loading data from a storage device is extremely slow compared to main RAM. The original game files are compressed and in a specific format that can't be used directly. I need to copy every sprite you see on screen into a temporary bitmap that's later converted into a texture that can be loaded into the GPU's VRAM. This means it's essentially in RAM three times while loading: the original, the temporary bitmap and the converted GPU texture. It's not "fair" to compare the original's memory requirements directly to my remake....the original game could possibly use specific tricks that work in DirectDraw on windows to minimize it's memory usage. But yeah...I do have to agree that 32MB should be enough to run this game though!:D^_^

I think a part of the problem is actually memory fragmentation caused by loading many small buffers into memory and when they are freed it leaves tiny holes in the used memory. It's a very complex issue and I have only a basic understanding of what's actually happening. I tried many times to find a tool to visualize the fragmentation but I never found anything that I could use. Only once I found a screenshot of an application that comes very close but could not find a download or more info anywhere. If I really want this I need to write it myself I am afraid!

There are many things that I need to optimize and memory management is just one of them. I have just been lucky that on most newer systems it was not that big of an issue. But it seems the PlayStation 2 demands a little more effort to do these things correctly. This might be one of the factors that developers meant when they say the PS2 is hard to program for. :)

I never said my game engine was efficient right? ^_^:D


EDIT: Looked up the specs from the BatteryCheck CD and the minimum requirements are a 486 or Pentium with 16MB of RAM. That's even less than what Jazz 2 needs. ^_^
 
Last edited by Archerite,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,480
Country
Netherlands
While still not a very good version...I did make some progress and fixes here and there. But the main reason for this "extra" version is actually a little surprise... :D

Notable changes since v0.3.3:
- One way platforms are working perfectly!
- Battery, Super battery and extra life can be collected again! Without counting them more than once! ^_^
- Enemies are shown again. (no AI yet so they just hang there ^_^)
- The little surprise mentioned above....:P
- Maybe something I forgot...

Like I said earlier I had been experimenting with libmikmod for the background music, which worked in the emulator. But crashes on hardware! So it's disabled and there is no sound at all for now until I recompile the latest libmikmod myself to see if that helps! I was kind of planning to do this anyway so I can add all the drivers for the systems I support with my game engine.
There are many more code changes that don't affect gameplay directly. I have been working on adding the "change battery in holder" animations but it's not finished/working yet so not in this version.
I went with a 7z archive this time as there are three nearly identical elf files in there: 480P, NTSC and PAL that are each almost 2MB on their own and 7z compresses it better. ^_^

PLEASE BE AWARE THIS IS A PROOF-OF-CONCEPT DEMO!

- Instructions mostly the same as before
- Just choose the 480P, PAL or NTSC version in the attached 7Z file.

THANK YOU! :D



Should I release this same version for the Wii, GameCube and 3DS in the respective threads just to show some progress after two years of silence??? Or make a blog post with these "intermediary" demo versions? :unsure:
 

Attachments

  • batterycheck-ps2-v0.3.4-ALPHA.7z
    249.8 KB · Views: 120
Last edited by Archerite,
  • Like
Reactions: KleinesSinchen

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,418
Trophies
2
XP
14,853
Country
Germany
Notable changes since v0.3.3:
- One way platforms are working perfectly!
- Battery, Super battery and extra life can be collected again! Without counting them more than once! ^_^
- Enemies are shown again. (no AI yet so they just hang there ^_^)
- The little surprise mentioned above....:P
- Maybe something I forgot...
[…]
Yay! Not much more to say.
Not much more is:
  • No music/sound is a bit of a bummer.
  • Pressing to the direction of a wall while falling lets Batteryman sink gradually lower with walking animation and he can even infinitely wall jump straight up again. Definitely a glitch, but a cool one. Should be available as cheat code.
  • It already feels similar to the original game. Graphics are perfect (480p mode) and the walking and jumping feels good.
The PS2 can output 1080i. At least Gran Turismo 4 used it. What would happen if you enabled 1080i for Batterycheck?

Edit: Seems to work
Test.jpg


Should I release this same version for the Wii, GameCube and 3DS in the respective threads just to show some progress after two years of silence???
Let me think about this… YES!
Why not show the progress on other platforms as well?
 
Last edited by KleinesSinchen,
  • Like
Reactions: niuus and Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,480
Country
Netherlands
Yay! Not much more to say.
Not much more is:
  • No music/sound is a bit of a bummer.
  • Pressing to the direction of a wall while falling lets Batteryman sink gradually lower with walking animation and he can even infinitely wall jump straight up again. Definitely a glitch, but a cool one. Should be available as cheat code.
  • It already feels similar to the original game. Graphics are perfect (480p mode) and the walking and jumping feels good.
Thanks! :D
  • I am really sorry about the music and sound not being there yet. Stupid sound libraries that have barely been updated in 15 years seem to be the reason here. I'll definitely look into it when more of the bugs are fixed and it look's and feels more like an upgrade from v0.3 I released 2 years ago on the other platforms. ^_^
  • yeah, it's a glitch alright. Hahahah. Not sure if I can keep it as a cheatcode though...I am not even sure what's causing it! I think the "Wall" and "floor" detection are fighting over the speed and direction of batteryman. The effect is kind of cool and useful when debugging too. You can now climb to places that are normally out of reach. But I did already have a button for an invisible floor to do that, I think it's triangle on the PS2.
  • I am guessing you're talking about "the surprise" that makes it feel similar to the original right?^_^ Otherwise, you're too kind...so many bugs in this version that I even hate it at the moment. Hahaha:lol: Especially the drawing order is messed up! Batteryman walks behind objects sometimes when he should move in front of them!
The PS2 can output 1080i. At least Gran Turismo 4 used it. What would happen if you enabled 1080i for Batterycheck?

Edit: Seems to work
View attachment 263080
About the video modes, I am really not sure how to fix it in a good way on the PS2 yet. A configuration file is definitely an option but it takes time to implement and test this. Also: store it on USB or memory card? Both? Which one to take if they both exist? I never really though about 1080i actually as that feels like "too much pixels" but if the gameplay is just "upscaled" by the GPU it might be alright I guess. How did you force it to run at this resolution though???? I could not find an option in uLaunchELF to do something like that!

Let me think about this… YES!
Why not show the progress on other platforms as well?
Hahaha, I was not sure if it was a good idea...but I'll look into it then.:D It's not exactly an upgrade since the last version, contains many new bugs, and somethings don't even work anymore! It's not going to be a release "for everyone" since it will come without the installer I think. New players will just have to use to older installable version first and hunt the internet for the installation files and then "upgrade" to this new version I guess. ^_^

It should only take a few hours to make the other platform versions ready, but you never know what kind of issues to run into! I definitely need to add some "saftey checks" to disable certain things when compiling for the PlayStation 2...like the sound effects and background anmimation's. That last one I REALLY want to fix soon! It's probably just something stupid that makes it crash when this is enabled!

Thanks for you're feedback. I really appreciate it. :yayps3:
 
  • Like
Reactions: KleinesSinchen

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,418
Trophies
2
XP
14,853
Country
Germany
[…]
  • I am guessing you're talking about "the surprise" that makes it feel similar to the original right?^_^ Otherwise, you're too kind...so many bugs in this version that I even hate it at the moment. Hahaha:lol: Especially the drawing order is messed up! Batteryman walks behind objects sometimes when he should move in front of them!
No, I'm not too kind. It is about the walking speed(s) and jumping physics. This feels correct. The collision detection is still… not very good.

About the video modes, I am really not sure how to fix it in a good way on the PS2 yet. A configuration file is definitely an option but it takes time to implement and test this. Also: store it on USB or memory card? Both? Which one to take if they both exist? I never really though about 1080i actually as that feels like "too much pixels" but if the gameplay is just "upscaled" by the GPU it might be alright I guess. How did you force it to run at this resolution though???? I could not find an option in uLaunchELF to do something like that!
The FreeMCBoot installer came as something called Noobie Package. And there is a program named GSM 038 (Graphics Synthesizer Mode Selector 0.38). It even forces commercial games in other modes. I tried it with Rayman 3 – but only got a distorted, windowed image in the upper right corner.
Somehow I hoped forcing 1080i would zoom out and show more of the level at a time (would be a bit cheating and nullify the need to memorize the maze).
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,480
Country
Netherlands
No, I'm not too kind. It is about the walking speed(s) and jumping physics. This feels correct. The collision detection is still… not very good.
Thank you! :shy:....the worst part of the entire collision detection is that this is actually "the new and improved" one I have been talking about all this time!!! :cry: It's based on the description on the Sonic Physics Guide how collision detection worked in the old sonic games. And that really means "based on" in the sense that I have implemented the so called "sensors". But I guess that my implementation of it just kind of sucks! :sad:

The walking and jumping speeds are indeed close to what they are in the original. The animations do need some work though ^_^
The FreeMCBoot installer came as something called Noobie Package. And there is a program named GSM 038 (Graphics Synthesizer Mode Selector 0.38). It even forces commercial games in other modes. I tried it with Rayman 3 – but only got a distorted, windowed image in the upper right corner.
Somehow I hoped forcing 1080i would zoom out and show more of the level at a time (would be a bit cheating and nullify the need to memorize the maze).
Obviously I have used the FreeMCBoot installer before but I did not do a lot of research into how it works yet, or how they packaged it for that matter. But if I understand correctly you need to patch the ELF with the video mode you want it to run with? Or do you launch it after each other or something? Either way, it's cool you can force a game or app to use another video mode than it was originally programmed for.;)

Hahaha, yeah I don't think that will work without REALLY patching my ELF file to render to that resolution. :rofl2: When I was just starting on this project I created a bunch of tools to see if I correctly read the file format documentation and that the images and objects where correct. One of those exported the entire level and tileset into something that I could open into the Tiled Level Editor....here is a tiny screenshot of the entire level to give you an idea of how huge it really is...:D:
upload_2021-5-16_16-21-9.png
And if you really want to see the entire level a bit more interactively...that is what v0.1 was like on the Wii if you remember. ;)

There are still a bunch of changes I need to commit into GIT since I have not done that for about 8 months! I should really just do that so much more often....makes it a lot easier to fix stupid mistakes if you can go back to a known state right? It's like your signature warns about....make backups!! I do that...the source code is on my NAS that takes snapshots every three hours. And the important stuff is synced to a second NAS at night all automatically. :D But it's so much easier to do with source code control in GIT directly. ;)

Just cleaning up the mess, and hope to do better in the future. :)

It took a while to "cleanup the mess" since I did try to kind of make meaningful commits. Not that I intent in making the current state of the code public anytime soon. These are just development snapshots basically. ;) Now taking a little break before testing it on the Wii, GameCube and 3DS....but I do intent to upload v0.3.4 for those platforms today. Probably within about 4 hours! :D
 
Last edited by Archerite,

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
A configuration file is definitely an option but it takes time to implement and test this.
I wouldn't mind testing it and using it while you enhance your code later. It is a useful manual switch.

Also: store it on USB or memory card? Both? Which one to take if they both exist?
In my opinion, just USB (and maybe Hard Drive for those users too?) should be more than enough. I mean, most people would want to keep their FreeMCMoot card clean of other things and away from possible corruption, or at least with necessary utilities like wLaunchELF, Memory Card formatter, etc., and optimally using the limited space. (at least i do)

How did you force it to run at this resolution though???? I could not find an option in uLaunchELF to do something like that!
I have never seen wLaunch ELF capable of things other than executing stuff, and moving/copying files, of course. He's using GSM.

Obviously I have used the FreeMCBoot installer before but I did not do a lot of research into how it works yet, or how they packaged it for that matter. But if I understand correctly you need to patch the ELF with the video mode you want it to run with?
Well, that utility is old, and also totally straightforward. It was even incorporated into Open PS2 Loader. A quick explanation from the original forums:

GSM intends to make on-the-fly conversion from the original graphic mode of PS2 game (or application) choosen by user, to the ones he/she wants to force.

One of benefits of using GSM is have a progressive scan output for a game originally designed to use interlace output. Or have a VGA output in your CRT/LCD Monitor for your preferred games. It seems great, isn't ii?

Well, GSM just makes a simple upscaling. It doesn't making interpolation (i.e. it doesn't add extra pixels / lines). So it doesn't increase the internal (=original=source) resolution, only the output (=forced=target) one.

So, there is no miracle here... The greater the quality of source (original) resolution of the game, the better will be the results that will be displayed on target (forced) resolutions - specially on the higher ones, where the images naturally tend to be pixelized. BTW, see "List of games using your PS2 to the maximum" topic below

And a nice FAQ here.

Just cleaning up the mess, and hope to do better in the future. :)
I will always be interested in testing it whenever/wherever i have my consoles available. Keep up the good work! :yayps3:
 
Last edited by niuus,
  • Like
Reactions: Archerite

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/IihvJBjUpNE?si=CsvoEbwzNKFf0GAm cool