grumpycoders / grumpycoders/pcsx-redux

[psyqo] wrong aspect ratio (presumably on PAL systems)

Open
#1,770 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C++
Stars
994
Forks
151
Avg merge
1d 15h
Merged PRs (30d)
18

Description

The aspect ratio seems wrong in some cases on real HW.

Repro:
```cpp
#include
#include
#include
#include
#include
#include
#include

namespace
{

class Game final : public psyqo::Application {
void prepare() override;
void createScene() override;

public:
psyqo::Trig<> m_trig;
};

class GameplayScene final : public psyqo::Scene {
void frame() override;

psyqo::Prim::Quad quad2d{{.r = 255, .g = 0, .b = 255}};
};

// We're instantiating the two objects above right now.
Game game;
GameplayScene gameplayScene;

} // namespace

void Game::prepare()
{
psyqo::GPU::Configuration config;
config.set(psyqo::GPU::Resolution::W320)
.set(psyqo::GPU::VideoMode::AUTO)
.set(psyqo::GPU::ColorMode::C15BITS)
.set(psyqo::GPU::Interlace::PROGRESSIVE);
gpu().initialize(config);
}

void Game::createScene()
{
pushScene(&gameplayScene);
}

void GameplayScene::frame()
{
// draw
psyqo::Color bg{{.r = 0, .g = 64, .b = 91}};
game.gpu().clear(bg);

quad2d.pointA.x = 160;
quad2d.pointA.y = 160;
quad2d.pointB.x = 200;
quad2d.pointB.y = 160;
quad2d.pointC.x = 160;
quad2d.pointC.y = 200;
quad2d.pointD.x = 200;
quad2d.pointD.y = 200;

gpu().sendPrimitive(quad2d);
}

int main()
{
return game.run();
}
```

Emulators:
![image](https://github.com/user-attachments/assets/e700e9b2-57be-4ca7-9d1b-ee9d75b428af)
On HW:
![image](https://github.com/user-attachments/assets/5881cce3-0fc6-4c9d-bcb1-e568c7a9e8a0)
(measured with ruler - it's 13x11 cm)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.