mtheall / vram

DS VRAM tools
10 stars 2 forks source link

Generated code can set a bitmap background with nonzero tile base #3

Open NovaSquirrel opened 5 months ago

NovaSquirrel commented 5 months ago

Here's what I did that caused the issue:

  1. Start with https://mtheall.com/vram.html#T0=2&NT0=1024&MB0=0&TB0=1&S0=1&T2=2&NT2=512&MB2=4&TB2=7&S2=2&T3=1&NT3=1024&MB3=2&TB3=3&S3=1
  2. Change background 3 from BgType_Text8bpp to BgType_Bmp8
  3. Change background 3's map base to 3 to resolve the conflict

Though if you directly go to https://mtheall.com/vram.html#T0=2&NT0=1024&MB0=0&TB0=1&S0=1&T2=2&NT2=512&MB2=4&TB2=7&S2=2&T3=5&MB3=3&S3=2 that will also show the bad line in the generated code.

This will put bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 3, 7); into the generated code, which causes an assert to fail.

mtheall commented 5 months ago

I'll take a PR if you can fix it I don't plan on investing any more time into this tool