Comments (5)
Yeah... That's because declaring negative space is no longer allowed. We used to declare the stack with negative space too, but that got changed.
wWaterRate:: db ; d8a4
wWaterMons:: db ; d8a5
ds wWaterRate - @
wEnemyMons:: ; d8a4
The problem is that wWaterRate
and wEnemyMons
are at the same address, and there's no easy way declare wWaterMons
as the byte after wEnemyMons
since wEnemyMons
uses the party_struct
macro.
Using ds wWaterRate - @
(which evaluates to -2) was the best solution.
from pokered.
0.3.2 added unions (gbdev/rgbds#193) to solve this problem:
UNION
wWaterRate:: db ; d8a4
wWaterMons:: db ; d8a5
NEXTU
wEnemyMons:: ; d8a4
wEnemyMon1:: party_struct wEnemyMon1
wEnemyMon2:: party_struct wEnemyMon2
wEnemyMon3:: party_struct wEnemyMon3
wEnemyMon4:: party_struct wEnemyMon4
wEnemyMon5:: party_struct wEnemyMon5
wEnemyMon6:: party_struct wEnemyMon6
wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d9ac
wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d9ee
ENDU
from pokered.
I'm trying to compile it on OSX Yosemite with the newest version of rgbds and I get the same error, but with a different constant.
ERROR: wram.asm(536):
Constant mustn't be negative: -528
make: *** [wram.o] Error 5
On line 536:
ds wPrinterSerialReceived -@
Anyone knows how to solve this yet? Thanks.
from pokered.
The - @
cases would need to be replaced with unions to work with rgbds 0.3.3. You can see how this was done in pokecrystal here: pret/pokecrystal@63bc19e
Until then, rgbds 0.2.5 will still work. If you have merged #147 locally you will need to remove the linkerscript flag from the Makefile or roll back.
from pokered.
Pokémon Red doesn't have printer support, so I assume you're using Yellow. For that you want pret/pokeyellow#27 (which does both a linkerscript and unions) (though I'll add that I made that PR and I'm not 100% confident with the changes since I really don't know what I'm doing)
from pokered.
Related Issues (20)
- tools/make_patch.c duplicates the last character HOT 2
- Remove empty lines on the top of map header files
- Automatically detect invalid object_event or bg_event text IDs HOT 6
- Use tool to publish documentation of functions such as doctest. HOT 5
- Copy pokecrystal's handling of unused types
- Copy pokecrystal's `map_const` macro
- Comment about UndergroundPathNorthSouth's dimensions
- Distinguish "meta" constants from event constants
- Add constants and table macros for the map sprite sets
- How to open 2bpp file HOT 1
- Fadas to be added HOT 1
- `TrainerDataPointers` is missing `table_width/assert_table_length` macros
- Comment the wave pattern 5 data that happens to be read from SFX HOT 4
- Inaccurate comment in `UpdateNPCSprite`
- Split `hSpriteIndexOrTextID`
- Incorrect reference
- Stadium Checksum HOT 1
- Review and revise some maps' script and text labels
- Rename `wEvosMoves` and get rid of `MAX_EVOLUTIONS` and `EVOLUTION_SIZE`
- Have palfix.py always output grayscale
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokered.