lunoka
Gun-headed
Diving into retrodev
Posts: 55
Homebrew skills: art, music
Fave PCE Shooter: Burning angels
Fave PCE Platformer: Ninja Spirit
Fave PCE Game Overall: Valis 3
Fave PCE RPG: Neutopia
|
Post by lunoka on Jul 13, 2023 20:45:55 GMT
Hello/
I'm adding a bunch of binary file songs in my main. I use farmemget(buffer,music+cursor,12) to retreive chunks of 12 bytes to the file to read my notes.
When the file is in the first #incbin, everything works, but if it's the last file and I assume the file is overlaping 2 banks and it crashes.
I don't really know what farmemget() does under the hoods so my first guess would be to set manually each file in each bank to avoid splits.
Is it possible?
|
|
|
Post by elmer on Jul 14, 2023 16:13:15 GMT
I don't really know what farmemget() does under the hoods so my first guess would be to set manually each file in each bank to avoid splits. Is it possible? Instead of looking for a simple hack to get around your lack of understanding, I'd SERIOUSLY recommend that you actually take a look at what farmemget() is doing, and try to understand the PC Engine's banking capabilities and how HuC uses them. IIRC there's a discussion of farmemget() or one of HuC's other data-access functions in the Dev tools: MAPeD-SPReD (win/linux) thread. Yes, you can control exactly which bank your incbin goes into ... if you use assembly-language, or even if you just drop into assembly-language to add a few lines of code into your C file. But then you'd need to know a bit more about how the banking works. At the end of the day, if you don't get at least a minimal understanding of 6502 assembly-language programming, you're going to find yourself very limited in the problems that you can diagnose in your project's HuC code.
|
|