Vamiga: Sword of Sodan graphics errors

Created on 26 May 2019  路  15Comments  路  Source: dirkwhoffmann/vAmiga

vAmiga hangs as soon as this disc is inserted, but the disk works with other emulators.
I tried with or without sloram etc. but the incompatibility starts as soon as this disc is inserted.
It looks like nothing is loaded, either it's a format problem or something in the bootblock.
Insert in DF0: do not load from WB.

Report:
report.txt

Adf:

Simple text_test.adf.zip

Bug

All 15 comments

You did run into an intentional crash in function pokeDSKSYNC:

void
DiskController::pokeDSKSYNC(uint16_t value)
{
    assert(false);
    debug(DSK_DEBUG, "pokeDSKSYNC(%X)\n", value);
    dsksync = value;
}

The DSKSYNC register is not implemented properly yet. Because of this, I decided to let the emulator crash (doing so let's me collect test-cases using this register). I'll get back to this when DSKSYNC has been implemented.

  for (int i = currentPixel; i < 2 * agnus->diwHstop; i++) {
        assert(i < sizeof(rasterline));
        rasterline[i] = openR;
    }

馃槸 This game writes an unusually high value into DIWSTOP (right side of display window). I'll look into it ...

No more write accesses outside the visible screen area 馃槂:

Screenshot 2019-06-06 at 17 01 50

Yeeeeeeessssss, I remember that one. Horizontal scrolling at it's best 馃槑:

Screenshot 2019-06-06 at 17 02 18

Oh no... 馃檲

Screenshot 2019-06-06 at 17 02 34

With release 0.29 the intro menu is not more visible:
Schermata 2019-07-18 alle 00 29 23

...the game starts pressing some Fx keys but there are some graphic errors in the upper left corner:

Schermata 2019-07-18 alle 00 34 17

Intro screen got broken by commit b18a277 (July 1st)

Intro is good again 馃槑.

Bildschirmfoto 2019-08-08 um 12 55 36

When the intro screen comes up, DIWSTRT and DIWSTOP are set to unusual coordinates ($00 and $FF, respectively) and trigger an "out of bounds" condition in vAmiga. Removing the check solves the issue. However, I think that I added the bound check because some vAmigaTS test was failing without the check. I need to doublecheck all DIW related test cases and probably write more of them.

The game itself seems to work fine now:

Bildschirmfoto 2019-08-08 um 12 51 09

A little bit bloody though 馃槵

Bildschirmfoto 2019-08-08 um 12 52 14

Anyway, let's see what comes next 馃

Bildschirmfoto 2019-08-08 um 12 52 50

Oooups 馃檮

Bildschirmfoto 2019-08-08 um 12 53 08

Hmmm, all games I tested so far seem to have gotten more difficult over time. Probably some kind of mysterious ageing issue with ADF files? 馃

Could you let us to download a the new beta release ?

Could you let us to download a the new beta telease ?

Coming soon. I want to walk through all existing vAmigaTS tests first. To implement display hierarchy (sprites before or behind playfields), I had to overhaul the complete graphics backend. Unfortunately, this has broken some existing functionality.

BTW, did you get back the recapped A2000 mainboard yet?

I have sent my A2000 MoBo to a repair center...
At the moment they have not told me anything.
I have to wait...

Findings:

DIW settings in the intro:

[1070] ( 12, 24)  0601A8 BCB-D- 606C 0000 [074014] Agnus: pokeDIWSTRT<Copper>(2801)
[1070] ( 12, 26)  0601A8 BCB-D- 606C 0000 Agnus: setDIWSTRT(2801)
[1070] ( 12, 26)  0601A8 BCB-D- 606C 0000 Agnus: newDiwVstrt = 40 newDiwHstrt = 1
[1070] ( 12, 26)  0601A8 BCB-D- 606C 0000 Agnus: newDiwHstrt is too small
[1070] ( 12, 28)  0601A8 BCB-D- 606C 0000 [074018] Agnus: pokeDIWSTOP<Copper>(30FF)
[1070] ( 12, 30)  0601A2 BCB-D- 606C 0000 Agnus: setDIWSTOP(30FF)
[1070] ( 12, 30)  0601A2 BCB-D- 606C 0000 Agnus: newDiwVstop = 304 newDiwHstop = 511
[1070] ( 12, 30)  0601A2 BCB-D- 606C 0000 Agnus: newDiwHstop is too large

According to my model, only the bg color can be drawn. Indeed, when the particular values for DIWSTART and DIWSTOP are replicated in a test case, the screen remains black in SAE (as predicted by the model).

TODO: Check other parameters such as the DDF settings and replicate them in the test case.

Added tests diw9, diw10, diw11 to vAmigaTS repo.

The three tests provide strong evidence for my hypothesis that the DIW H flip-flop is automatically set at the beginning of each frame. I am pretty sure this fixes the Sword of Sodan intro bug. We'll see once it's implemented...

Fixed in V0.32

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KenDFish picture KenDFish  路  3Comments

Alessandro1970 picture Alessandro1970  路  4Comments

dirkwhoffmann picture dirkwhoffmann  路  3Comments

dirkwhoffmann picture dirkwhoffmann  路  4Comments

dirkwhoffmann picture dirkwhoffmann  路  3Comments