bochs-emu / Bochs

Bochs - Cross Platform x86 Emulator Project
https://bochs.sourceforge.io/
GNU Lesser General Public License v2.1
892 stars 107 forks source link

No text in SimCity #187

Closed Vort closed 10 months ago

Vort commented 10 months ago

After loading SimCity game and clicking START NEW CITY, screen without text appears: bochs_simcity

This is how it should look: vbox_simcity

Test files: SimCity.zip Version: b63b1225a8507f7677e8576c019a3d069d9ad0c0

vruppert commented 10 months ago

I tried your image and I don't see an issue. The text is displayed correctly.

Vort commented 10 months ago

Oops, my mistake, sorry. I was using latest VGABIOS-lgpl-latest.bin. So it's a very recent regression.

Vort commented 10 months ago

Regression happened because of commit https://github.com/bochs-emu/VGABIOS/commit/1bff26a9beebb5e8d117c40b3ce6abf085fe1f2d.

vruppert commented 10 months ago

I can confirm this issue with the debug version only - VGABIOS-lgpl-latest.bin works correctly. I'll have a closer look at the printf() stuff, since the modified VBE code isn't used by this game.

Vort commented 10 months ago

I'll have a closer look at the printf() stuff, since the modified VBE code isn't used by this game.

Glitch appears not because of printf, but because of push bp and pop bp additions: https://github.com/bochs-emu/VGABIOS/blob/b3ddbb59cf7b0bea7c244d39946ec1a5aa64e252/vgabios/vgabios.c#L317 https://github.com/bochs-emu/VGABIOS/blob/b3ddbb59cf7b0bea7c244d39946ec1a5aa64e252/vgabios/vgabios.c#L431

vruppert commented 10 months ago

The font functions are using the return value ES:BP for the pointer to the ROM font. So we should only preserve BP when we use it internally. I'll try to fix it tomorrow. I think after fixing this issue it's time to update the binaries in the Bochs tree.

Vort commented 10 months ago

Problem is solved with https://github.com/bochs-emu/VGABIOS/commit/61efb5ce491a26b850eac7d836d06ef697682fe3.

I think after fixing this issue it's time to update the binaries in the Bochs tree.

I agree.