Gens4All with Z80 Emulation

Place for discussing homebrew games, development, new releases and emulation.

Moderators: pcwzrd13, deluxux, VasiliyRS

User avatar
Ian Micheal
Developer
Posts: 5994
Contact:

Re: Gens4All with Z80 Emulation

Post#161 » Wed Jan 12, 2022 7:26 am

NO idea whats going on there using rca leads Phantasy Star iv it goes black screen when you load it.. ON vga cable it works flawless from a cdr as well..

User avatar
megavolt85
Developer
Posts: 1787

Re: Gens4All with Z80 Emulation

Post#162 » Wed Jan 12, 2022 10:13 am

TapamN wrote:I noticed that my build of KOS seems to have a bug when calculating the date for the save file, which results messed up dates (like the year 2042 or something). It seems to be a bug in newlib for converting unix time to human readable. I started on a work around, but it looked like it would take more than 5 minutes to figure out how to safely override KOS's timestamp, so I put it off for now.


Unix epoch is 1970-01-01T00:00:00Z. but AICA calculate time from 1950-01-01T00:00:00Z
use rtc_unix_secs() function

mrneo240
Rank 9
Posts: 926

Re: Gens4All with Z80 Emulation

Post#163 » Wed Jan 12, 2022 11:50 am

TapamN wrote: I haven't accomplished that yet, and I've been wasting too much time doing "support" stuff (working on a scripting system, better PVR driver, etc.) or side projects (Gens4All, SimCity Classic) to actually get anywhere. so I've decided to just kind of drop everything and focus on making an actual 3D game of some kind.

...
But if someone else wants to work on improving Gens4All in the mean time, I could still give advice.


I don't think of it as wasted at all, you've learned lots of information and helped share that with many people. Very helpful and a great resource to the scene.

On the topic of the "support stuff" will any of that work be shared? It sounded throughout the year you were making great progress on that alternative library/driver.

I wish you the best and I hope you find peace while working on your game. Thank you!

Cass
MegaDeath
Posts: 225

Re: Gens4All with Z80 Emulation

Post#164 » Wed Jan 12, 2022 12:49 pm

Thanks for all your work on GENS4ALL TapamN - it's great. Good luck with whatever you do next.

TapamN
letterbomb
Posts: 149

Re: Gens4All with Z80 Emulation

Post#165 » Wed Jan 12, 2022 4:45 pm

Ian Micheal wrote:NO idea whats going on there using rca leads Phantasy Star iv it goes black screen when you load it.. ON vga cable it works flawless from a cdr as well..

But can you display the in-game menu? Is the video mode being set incorrectly, preventing anything from being displayed, or is it an issue with the VDP rendering? Is there sound? Did the entire emulator freeze, or is it visual? If there's no in-game menu visible, can you still exit the game blindly and switch to another game?

I guess if other games work in interlaced modes, then it shouldn't be the video mode setting since it should always work the same...

megavolt85 wrote:Unix epoch is 1970-01-01T00:00:00Z. but AICA calculate time from 1950-01-01T00:00:00Z
use rtc_unix_secs() function

Oh, I picked a random year as an example, but I picked a bad one. I can see why you would point that out, with a year 20 years off from now. Looking at my VMU, I have Gens4All saves with the years 2085, 1974, 1963, 2023, 2004, and 2048. I've definitely never had my DC's clock set to earlier than 1998. KOS automatically calculates the timestamp when writing to the VMU, but it's own code calculates it wrong.

The problem seems to be with newlib's localtime generating garbage. When working on a utility for viewing data stored in flash, I tried using localtime to convert the timestamps stored in flash (I would compensate for the different epoch manually), but localtime would convert the timestamp to some different random date every time it's called.

Actually, I THINK I got newlib to convert the time correctly once. But I think it was the first time I called localtime since boot. It's not "first time I execute the ELF from dcload", but "first time since I powered on the DC". I didn't try going back into the BIOS from dcload, then booting back into dcload and running the ELF again.

It doesn't really make sense. Maybe it's accessing uninitialized memory or something that KOS doesn't clear out? I'm not sure if it's an issue with GCC miscompiling newlib, or newlib itself it broken.

mrneo240 wrote:On the topic of the "support stuff" will any of that work be shared? It sounded throughout the year you were making great progress on that alternative library/driver.

I'm planning to use my PVR driver, but instead of working directly on the driver, like I was before, I'm going to focus on the game and make adjustments to the driver when I find I need to change or fix something. I plan on releasing the driver once I've had the chance to "battle test" it and get a better idea of how the user-visible interface should work. The variable width font rendering, based on BMFont, used in Gens4All was originally for my Micropolis/SimCity Classic port. A lot of the other support stuff is too half-finished or niche (like a statically-typed Forth interpreter) for them to really be of use to someone else.

mrneo240
Rank 9
Posts: 926

Re: Gens4All with Z80 Emulation

Post#166 » Wed Jan 12, 2022 5:01 pm

Don't feel afraid to reach out ;)
Could have saved you an hour
https://github.com/mrneo240/openmenu/blob/master/ui/dc/font_bmf.c

I hope to see sneak peeks or such on the game! Great to see you aren't leaving but rather refocusing into a single thing.

MastaG
Quad Damage
Posts: 204

Re: Gens4All with Z80 Emulation

Post#167 » Wed Jan 12, 2022 5:32 pm

Yeah bro and not only that, you brought us an even more perfected genesis emulator which never existed before.
Never thought I'd be playing the classic Sonic games with perfect sound and no frameskipping on my freaking dreamcast.
Hell even Sega didn't pull this off with their Smash Pack release.

Perhaps you should consider setting up a patreon account, same goes for you mrneo240 and megavolt85.
Imo you guys shouldn't feel pressured to do monthly updates or anything to satisfy the community.
Personally I don't care even if it takes years for you guys to release something.
It's just that you guys have a skill and passion when it comes to developing for the Dreamcast.
And even if it's just a hobby without having the time for doing commercial projects, I'd be happy to donate a few bucks per month just for the efforts :)
I'm sure the more hardcore members of this forum would agree with me as well.

User avatar
Ian Micheal
Developer
Posts: 5994
Contact:

Re: Gens4All with Z80 Emulation

Post#168 » Wed Jan 12, 2022 5:41 pm

TapamN wrote:
Ian Micheal wrote:NO idea whats going on there using rca leads Phantasy Star iv it goes black screen when you load it.. ON vga cable it works flawless from a cdr as well..

But can you display the in-game menu? Is the video mode being set incorrectly, preventing anything from being displayed, or is it an issue with the VDP rendering? Is there sound? Did the entire emulator freeze, or is it visual? If there's no in-game menu visible, can you still exit the game blindly and switch to another game?

I guess if other games work in interlaced modes, then it shouldn't be the video mode setting since it should always work the same...

megavolt85 wrote:Unix epoch is 1970-01-01T00:00:00Z. but AICA calculate time from 1950-01-01T00:00:00Z
use rtc_unix_secs() function

Oh, I picked a random year as an example, but I picked a bad one. I can see why you would point that out, with a year 20 years off from now. Looking at my VMU, I have Gens4All saves with the years 2085, 1974, 1963, 2023, 2004, and 2048. I've definitely never had my DC's clock set to earlier than 1998. KOS automatically calculates the timestamp when writing to the VMU, but it's own code calculates it wrong.

The problem seems to be with newlib's localtime generating garbage. When working on a utility for viewing data stored in flash, I tried using localtime to convert the timestamps stored in flash (I would compensate for the different epoch manually), but localtime would convert the timestamp to some different random date every time it's called.

Actually, I THINK I got newlib to convert the time correctly once. But I think it was the first time I called localtime since boot. It's not "first time I execute the ELF from dcload", but "first time since I powered on the DC". I didn't try going back into the BIOS from dcload, then booting back into dcload and running the ELF again.

It doesn't really make sense. Maybe it's accessing uninitialized memory or something that KOS doesn't clear out? I'm not sure if it's an issue with GCC miscompiling newlib, or newlib itself it broken.

mrneo240 wrote:On the topic of the "support stuff" will any of that work be shared? It sounded throughout the year you were making great progress on that alternative library/driver.

I'm planning to use my PVR driver, but instead of working directly on the driver, like I was before, I'm going to focus on the game and make adjustments to the driver when I find I need to change or fix something. I plan on releasing the driver once I've had the chance to "battle test" it and get a better idea of how the user-visible interface should work. The variable width font rendering, based on BMFont, used in Gens4All was originally for my Micropolis/SimCity Classic port. A lot of the other support stuff is too half-finished or niche (like a statically-typed Forth interpreter) for them to really be of use to someone else.



Problem only happens on rca leads like i said... It works perfect on vga since i dont use rca leads it's not a problem for me but users..
the emulator does not crash and you can go back to the menu there is no sound ether on rca leads when this happens, other games works fine just a few that do this.. The problem game as i said this happens on few others..

the same games that do this on rca leads work perfect on a vga cable.. And the same games work fine on demul all the time ..


Does not crash
only happens on some games
there is no sound ether when this happens
you can go back to the menu
all other games work on rca leads

this above does not happen on vga

Game works on vga black screen on rca leads

it's the weirdest problem i have seen it seems to only effect some games on rca leads but not on vga..

thank you for your work i was only asking for users as it has no impact on me at all the black screen games work on vga

TapamN
letterbomb
Posts: 149

Re: Gens4All with Z80 Emulation

Post#169 » Wed Jan 12, 2022 5:56 pm

mrneo240 wrote:Don't feel afraid to reach out ;)
Could have saved you an hour
https://github.com/mrneo240/openmenu/blob/master/ui/dc/font_bmf.c

I hope to see sneak peeks or such on the game! Great to see you aren't leaving but rather refocusing into a single thing.

The timestamps on my backups for my BMFont code start in 2017. I guess I could've saved you an hour if I posted it. :P

I think I'm going to make a thread to post about progress. Having people interested should help motivate me.

Ian Micheal wrote:Problem only happens on rca leads like i said... It works perfect on vga since i dont use rca leads it's not a problem for me but users..
the emulator does not crash and you can go back to the menu there is no sound ether on rca leads when this happens, other games works fine just a few that do this.. The problem game as i said this happens on few others..

Huh. I guess the issue is probably with the emulator core, then. I have no idea how the cable type could cause that. If I manage to get my setup changed so that I can test on NTSC easier, I might go back and take a look at it.

User avatar
Ian Micheal
Developer
Posts: 5994
Contact:

Re: Gens4All with Z80 Emulation

Post#170 » Wed Jan 12, 2022 6:10 pm

TapamN wrote:
mrneo240 wrote:Don't feel afraid to reach out ;)
Could have saved you an hour
https://github.com/mrneo240/openmenu/blob/master/ui/dc/font_bmf.c

I hope to see sneak peeks or such on the game! Great to see you aren't leaving but rather refocusing into a single thing.

The timestamps on my backups for my BMFont code start in 2017. I guess I could've saved you an hour if I posted it. :P

I think I'm going to make a thread to post about progress. Having people interested should help motivate me.

Ian Micheal wrote:Problem only happens on rca leads like i said... It works perfect on vga since i dont use rca leads it's not a problem for me but users..
the emulator does not crash and you can go back to the menu there is no sound ether on rca leads when this happens, other games works fine just a few that do this.. The problem game as i said this happens on few others..

Huh. I guess the issue is probably with the emulator core, then. I have no idea how the cable type could cause that. If I manage to get my setup changed so that I can test on NTSC easier, I might go back and take a look at it.

I will just show a video of it

Now it's not working for me any more i give on this

  • Similar Topics
    Replies
    Views
    Last post

Return to “New Releases/Homebrew/Emulation”

Who is online

Users browsing this forum: No registered users