Bonnox
Time (wasting) Lord
- 47
- Posts
- 9
- Years
- Age 29
- Fiction: Gallifrey; Actual: Italy
- Seen Oct 19, 2021
Good morning people, I?m sadly asking for help due to a rather strange problem that occurs during GBA programming.
The problem relates to the bitmap mode.
First, I follow this guide: https://www.coranac.com/tonc/text/first.htm
This document explains how to compile a simple first program. And that worked well.
The problem is that, if I use the main function alone, compiled with the simple command arm-none-eabi-gcc mthumb mthumb-interwork and then call the injected binary with a callasm, the bitmap mode is not correctly working. The pixels are still at the right place, but appears a black band at the left edge of the screen, whith the effect of shifting the entire canvas to the right. However, if I open the map editor tool, the image is well formed in the emolator?s memory, just shifted.
I thought it was fault of the BG OFS registers, but sadly, after setting them to zero, nothing changed. I don't reckon the map scrolling functions to be the culpript, because after the call, my code is taking all the machine resources, therefore no game freak code is executing.
I?m not that interested in bitmap mode, but who knows, and if it worked straight would be great. Also because this is driving me insane, I would like to know where?s the problem.
Could you please point me in the right direction? thanks
The problem relates to the bitmap mode.
First, I follow this guide: https://www.coranac.com/tonc/text/first.htm
This document explains how to compile a simple first program. And that worked well.
The problem is that, if I use the main function alone, compiled with the simple command arm-none-eabi-gcc mthumb mthumb-interwork and then call the injected binary with a callasm, the bitmap mode is not correctly working. The pixels are still at the right place, but appears a black band at the left edge of the screen, whith the effect of shifting the entire canvas to the right. However, if I open the map editor tool, the image is well formed in the emolator?s memory, just shifted.
I thought it was fault of the BG OFS registers, but sadly, after setting them to zero, nothing changed. I don't reckon the map scrolling functions to be the culpript, because after the call, my code is taking all the machine resources, therefore no game freak code is executing.
I?m not that interested in bitmap mode, but who knows, and if it worked straight would be great. Also because this is driving me insane, I would like to know where?s the problem.
Could you please point me in the right direction? thanks