Comments (13)
Ok, I'll have look at this. Its good to have a test case to analyse.
Thanks.
from webmsx.
In e.g. renderLineModeG4():
var realLine = (currentScanline - startingActiveScanline + register[23]) & 255;
I think instead of subtracting startingActiveScanline there, you should initialise currentScanline to -startingActiveScanline. So something like:
startingScanline = -16 - addBorder - verticalAdjust;
startingVisibleTopBorderScanline = -8;
startingActiveScanline = 0;
startingVisibleBottomBorderScanline = activeHeight;
startingInvisibleScanline = startingVisibleBottomBorderScanline + 8 + addBorder;
finishingScanline = frameVideoStandard.totalHeight + startingScanline;
That way the realLine is no longer affected immediately by a signal metrics change, that only happens in beginFrame(). This is also how it works in the 1chipMSX’s VHDL code.
from webmsx.
from webmsx.
Hey, It has been some time!
I am finally trying to solve this problem.
But I got suck in a question...
How does the Vertical Adjust value (r18) affect the line interrupts?
I was able to solve the rendering issue on you attached overscan test. It uses Vertical Adjust = 2
But my simulation still breaks in Sex Bomb Bunny game by Matra. It uses Vertical Adjust = -6.
The line interrupts happens too early on this game, and the overscan does not happen properly.
I wonder if this is caused by the Vertical Adjust value?
Paulo
from webmsx.
These posts may provide some further insight:
from webmsx.
Nice... I will read it all!
But... Do you have any clue why the line int happens so early in Sex Bomb Bunny (on WebMSX)?
from webmsx.
I tried the demo version of Sex Bomb Bunny in openMSX… There too it currently does not work (probably due to that bug). But I checked what the game does with the debugger :).
Sex Bomb Bunny uses a split on line 200 and line 230 to get the overscan. The maximum vertical interrupt line is 234 in 60 Hz 192 line mode. If adjust affects the maximum line (which it shouldn’t), then an adjust of -6 would probably put it on line 236 effectively, causing it to be missed. Or something along those lines.
A simple test would be to do “set adjust(0, 6)” on that machine, and then boot Sex Bomb Bunny. If the game runs normally, then indeed you’re incorrectly letting the maximum split line be affected by the adjust.
from webmsx.
from webmsx.
Hmm. It’s past bed-time but let me write down some thoughts;
startingScanline = -16 - addBorder - verticalAdjust;
startingVisibleTopBorderScanline = -8;
startingActiveScanline = 0;
startingVisibleBottomBorderScanline = activeHeight;
startingInvisibleScanline = startingVisibleBottomBorderScanline + 8 + addBorder;
finishingScanline = frameVideoStandard.totalHeight + startingScanline;
And
if (currentScanline >= finishingScanline) finishFrame();
finishingScanline
here depends on startingScanline
, which depends on verticalAdjust
. But we established already that the vertical adjust does not affect the last scan line, so that can’t be right.
Quoting a bit from the forum thread:
Given that the maximum interrupt line doesn’t change with the vertical adjustment, I thought maybe IL wasn’t affected by vertical adjust, but it is and openMSX emulates that correctly. But I did notice on my real MSX that the top lines repeat when the adjust is 7 while overscanning (except for the last), openMSX doesn’t do this.
I think this could be explained by the VDP resetting its internal line counter up to seven lines later than usual (so the first few get an old value), rather than immediately after top erase with an offset. Which would explain the maximum interrupt line not changing.
In other words, vertical adjust changes the line on which the line counter is reset, rather than the value the line counter is reset to.
Something along those lines.
I’ll have to think a bit more about what this means exactly in the WebMSX code.
from webmsx.
from webmsx.
Problem solved!
Sex Bomb Bunny working perfectly.
I'll explain it later, after more tests!
Thanks,
Paulo
from webmsx.
Well, the problem was that I was calculating the starting of the bottom border considering the entire frame structure and metrics of the screen as specified on page 147 of the Tech Data Book.
That made a window of only 10 lines after line 192 for the overscan trick, not 20, because the way I saw it, 10 lines of the extra 20 would be at the top, and 10 at the bottom.
But it seems that the bottom border is started in relation to the REAL starting active line, in fact 192 or 212 lines AFTER the real starting active line, and not on the frame "position" it would be in a normal frame where you don't change LN mid-frame, giving really 20 extra lines of active rendering.
Is that correct the way you see it?
I still have to test and validate it a bit more, but games that use overscan started to work now.
Grauw... Another related question for you...
Regarding the TOP border finishing line and starting of the active screen. Could we do the same LN trick to bypass the starting of the active screen? That would make the entire screen stay in the border section. Like the opposite effect of the overscan technique.
Is that possible?
If so, how all the line counting would happen then? Would line interrupts even happen?
Paulo
from webmsx.
Well, I think it's fixed!
Please, try again the new version 5.3 (already online)!
Thanks for the information!
from webmsx.
Related Issues (20)
- Add support for OPL4-FM HOT 4
- DSK limited to 80 sectors HOT 2
- Why is CHANNEL_VOLUME_CURVE_POWER = 30? HOT 9
- GET DATE format does not seem to match format specified in &H2B for certain machines
- Feature Request: A single .ZIP file for machine config HOT 1
- WebMSX stopped working on Chrome HOT 8
- SymbOS 3.1 & G9K -> Mouse cursor location seems wrong HOT 3
- Different sprite results in MSX-Basic compared to OpenMSX & Real Hardware
- Bug in concurrent copy in screen 8 HOT 2
- CPU_PANA_TURBO Auto mode (-1) is not active by default on MSX2+ machines as docs state
- how can i add new machine to CONFIG_URL ? HOT 1
- V9990 bug related to R#22 HOT 2
- Feature request: ObsoNet emulation
- Feature request: MSXBAS2ROM MegaROMs must be detected as Konami SCC ROM format
- realfun3 missing vocals HOT 3
- Feature request: Add VGM recording function. HOT 3
- Video9000: programmatically activate superimpose HOT 4
- I am a complete and total noob about MSX both emulation and actual hardware HOT 21
- Star Soldier Enhanced disappearing sprite. Transparancy bit not working? HOT 7
- 0x4000-0xffff (48 KB) ROMs do not work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webmsx.