Re: Gens4All with Z80 Emulation
Posted: 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..
Unix epoch is 1970-01-01T00:00:00Z. but AICA calculate time from 1950-01-01T00:00:00ZTapamN 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.
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.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.
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?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..
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.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
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 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.
TapamN wrote: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?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..
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...
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.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
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.
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 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.
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.mrneo240 wrote:Don't feel afraid to reach out
Could have saved you an hour
https://github.com/mrneo240/openmenu/bl ... 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.
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.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..
I will just show a video of itTapamN wrote: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.mrneo240 wrote:Don't feel afraid to reach out
Could have saved you an hour
https://github.com/mrneo240/openmenu/bl ... 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.
I think I'm going to make a thread to post about progress. Having people interested should help motivate me.
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.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..