Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"DNA Warrior" game border bug - Commodore 64 #1341

Open
QuakerRUS opened this issue Oct 7, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@QuakerRUS
Copy link

commented Oct 7, 2018

In "DNA Warrior" game there is border bug - progressing wrong picture offset (with all border modes). I see same bug with WinVICE emulator with "none" border mode, but it works properly with other border modes. Maby it's a reason of bug?

And a little offtop: why Commodore 64 core works so slow? It works less than 100% emulation speed on my not so old computer. ZX Spectrum core with higher CPU frequency works more than 100% speed for my computer.

@QuakerRUS QuakerRUS changed the title Border bug - Commodore 64 "DNA Warrior" game border bug - Commodore 64 Oct 7, 2018

@Asnivor

This comment has been minimized.

Copy link
Contributor

commented Oct 8, 2018

Not really sure about the border bug. Maybe its a game that is updating the border at very specific times but the emulation isnt handling it properly? If the C64 is anything like the Spectrum you actually have to be updating specific border pixels are very specific T-States within the frame in order to get proper accuracy. However, I really know very little about the C64 in general so probably can't help with this.

Regarding the core speed, don't know I'm afraid. The emulated hardware is completely different, so probably the component implementations are not as performant (and/or there are more components emulated).

I mean, compared to other cores the ZXHawk core is actually pretty slow. It has quite a bit going on with video generation in order to accurately generate border effects. The screen buffer is pretty much writen to every CPU cycle (so in the case of the 48k spectrum, 69888 times per frame - or 3494400 times per second). I can only guess that the C64 core is doing something similar (or the MOS implementations are slow).

@QuakerRUS

This comment has been minimized.

Copy link
Author

commented Oct 8, 2018

Maybe its a game that is updating the border at very specific times but the emulation isnt handling it properly?

Maybe. I don't know.

@SaxxonPike

This comment has been minimized.

Copy link
Contributor

commented Oct 17, 2018

So, normally the visible area is a maximum of 320x200 pixels. However, the border logic in the C64's video processor can be messed with by very carefully writing registers at specific times. This enabled some game developers to put sprites outside of the usual visible area. I-Xera, for example, puts the score in the bottom border by actually tricking the video processor into not enabling the border at all. Some games will also offset the whole display by up to 8 pixels so that it may perform smoother scrolling. That's a decision made by developers of any particular game.

The solution is not to use small borders for games like this. Unfortunately, for most games, leaving full borders on is a waste of screen space. The solution is to choose the border you like for any particular game, or leave full borders on at all times.

As for speed, the floppy drive is emulated at 16mhz, VIC is emulated at 8mhz and the SID is emulated at 1mhz. Generally, for the sake of speed, other emulators will take some shortcuts - such as caching frame changes and rendering larger portions at a time. Some of them render scanlines at a time. The C64 core does not currently have these optimizations.

@QuakerRUS

This comment has been minimized.

Copy link
Author

commented Oct 18, 2018

It don't works properly even in Full border mode.

@Asnivor

This comment has been minimized.

Copy link
Contributor

commented Oct 18, 2018

Full border mode was throwing exceptions a while ago. My recent 'fix' to this may or may not have something to do with the issue you are seeing.

@QuakerRUS

This comment has been minimized.

Copy link
Author

commented Oct 18, 2018

If you about this
#1272
then I tried with this fix.

Asnivor added a commit that referenced this issue Dec 6, 2018

@Asnivor

This comment has been minimized.

Copy link
Contributor

commented Dec 6, 2018

So i've re-enabled the full border mode in the latest dev build.

Unfortunately it looks like the same issue occurs in this mode.

So either the issue is not as @SaxxonPike mentioned, or I made a mistake ages ago in getting Full Border working (rather than just throwing an exception).

@SaxxonPike

This comment has been minimized.

Copy link
Contributor

commented Dec 6, 2018

I'll have a look.

@SaxxonPike SaxxonPike self-assigned this Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.