GithubHelp home page GithubHelp logo

Comments (5)

dannye avatar dannye commented on May 10, 2024

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.

yenatch avatar yenatch commented on May 10, 2024

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.

phramos07 avatar phramos07 commented on May 10, 2024

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.

yenatch avatar yenatch commented on May 10, 2024

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.

Pokechu22 avatar Pokechu22 commented on May 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.