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

4 & 8 bit texture issue #1

Open
conker64 opened this issue Sep 9, 2017 · 1 comment
Open

4 & 8 bit texture issue #1

conker64 opened this issue Sep 9, 2017 · 1 comment

Comments

@conker64
Copy link
Owner

conker64 commented Sep 9, 2017

When the texture is 2KB size (64x64x4bit) or (64x32x8bit) won't be displayed or properly loaded.

Functions involved (rdp.c):

  • rdp_load_tlut(uint8_t _pal_bp, uint8_t _pal_num, uint16_t *_palette)
  • __rdp_load_texpal(sprite_t *sprite, int sh, int th )
  • rdp_draw_textured_rectangle_scaled( int tx, int ty, int bx, int by, double x_scale, double y_scale, int flags )

It could be the way the data is loaded to the RDP (rdp.c):

  • __rdp_ringbuffer_send( void )
  • __rdp_ringbuffer_queue( uint32_t data )

Needs research to find the issue.

@conker64
Copy link
Owner Author

conker64 commented Dec 4, 2017

Work around, 64x64x4bit can be used now, however they bug palettes 0 and 1.

While the problem is fixed, could be safe to set:

  • rdp_select_palette( 2 );
  • rdp_load_palette( 2 , 15, palette ); // TMEM second palette, 16 colors upload (0-15), palette struct

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

1 participant