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

Mode1 bg3 text management does not work without calling consoleSetTextOffset #289

Closed
RetroAntho opened this issue Jul 29, 2024 · 6 comments

Comments

@RetroAntho
Copy link
Collaborator

Hi,

As discussed on discord, the text system available with PVSneslib works on background 3 (Mode 1) only if this instruction is called:

consoleSetTextOffset(0x0000);

The case appears with a recent commit in pvsneslib.

Also, i recommend to harmonize the function names by replacing:
consoleSetTextVramAdr to consoleSetTextGfxPtr => as it is for bgSetGfxPtr
consoleSetTextVramBGAdr to consoleSetTextMapPtr => as bgSetMapPtr

See you !

alekmaul added a commit that referenced this issue Feb 24, 2025
alekmaul added a commit that referenced this issue Feb 24, 2025
@alekmaul
Copy link
Owner

I did the refacto, but regarding your 1st point @RetroAntho "As discussed on discord, the text system available with PVSneslib works on background 3 (Mode 1) only if this instruction is called", what is the issue?

@RetroAntho
Copy link
Collaborator Author

Thanks for the improvement !

The text does not appear on the screen if consoleSetTextOffset(0x0000); is not called. I think the value is not initiated correctly because in my case, the function should not be used.

Here is a minimal code to reproduce it:

hello_world.zip

@alekmaul
Copy link
Owner

ah ok. The value is initialized to 0x0100, this is the reason why you needed to change it.
It is more a documentation issue rather than a code bug. I leave it open as we need to update documentation.

@RetroAntho
Copy link
Collaborator Author

Why initialise it to 0x0100 instead of 0x0000?

i think the default behaviour should be aligned on a standard/most common usage. If i use the font engine with specific addresses for map and graphics, i find strange to change the text offset to have it working

@alekmaul
Copy link
Owner

In some examples, we have graphics before the font if I remember well :)

@RetroAntho
Copy link
Collaborator Author

Yes i agree with you but 0x0100 depend of the content before the font. For others, it will be 0x0200 and so on… that is why i find the default value is not consistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants