Comments (7)
I totally agree with @flamewing on the corrected moveq
behaviour.
The way moveq
worked in older AS revisions is completely broken and error-prone. It becomes apparent once you consider this simple example:
moveq #$A0-1, d0 ; copy $A0 words ...
.copy:
move.w (a0)+, (a1)+
dbf d0, .copy
The older versions of AS won't raise any warnings during assembly, while moveq
in this example will set register d0 to a different value than the instruction implies.
Instead of setting d0 to the value of $A0-1
, the compiled instruction will effectively set it to $FFFFFFA0-1
, because moveq #$A0-1
doesn't really exist due to the sign-extension.
This is completely incorrect and misleading behaviour, which leads to all sorts of hard-to-catch errors in your code.
The assembler must issue a warning when you're trying use moveq
with values it cannot represent instead of silently accepting those and producing broken code. Those warnings should be enabled by default.
from s2disasm.
If you end up modifying AS more, please for the love of god go and fix the numerous parsing bugs and some of the strange bugs preventing some projects at all. Such as some that plagued paddin/align on S3K projects where it would break for no reason. Having qn actual usable version of AS would be amazing.
from s2disasm.
I would definitely enjoy a custom version of AS hand-tailored to our needs. I have no idea what features would be good to include, but having something that works better than vanilla AS as well as ASM68K is going to be very helpful.
from s2disasm.
Having examples of those issues would go a long way towards making it fixable.
from s2disasm.
So, I set up CI and daily snapshot autoreleases (for Windows, Linux, and OSX) and started doing some hacking. Please fill out bug reports for AS on that repository I forked, preferably with some example cases and I use for testing and I will try to fix them.
I will also be updating the disassemblies with these custom builds before closing this issue.
from s2disasm.
I don't think your repo has issues enabled. While I'm here, is there a chance you can edit AS to match its older behaviour to make this stuff unnecessary?
from s2disasm.
Hm, weird that issues was disabled. Anyway, enabled now.
Regarding the moveq/sign-extends... I am a bit torn. I like the warning AS generates because it allows catching some silly mistakes and forces you to be more explicit that yes, this is what you want. But on the other hand, it can be quite noisy, and the build setups used in the disassemblies treat warnings basically the same as errors, which is why that commit was needed in the first place.
Maybe an option to silence these kinds of sign-extension warnings would suffice?
from s2disasm.
Related Issues (20)
- Add constants for hardcoded object positions
- clearRAM negative size results in invalid behaviour HOT 1
- Nameless temporary lables should be banned from s2disasm HOT 7
- ASM68k branch
- Build tools are 64bit only
- Buiild Failure with Revision 2 and FixBugs Enabled HOT 1
- Sonic 2 ss HOT 2
- [enhancment]DAC Sample Names
- Knuckles in Sonic 2: Casino Night Zone object layouts HOT 2
- Convert sprite mappings to assembly(?) HOT 6
- I am trying to restore Wood Zone in a similar manner to Clownacy restoring Hidden Palace Zone and I'm attempting to add an extra slot for Wood Zone's background. How do I add to the Off_Level table? You're cool ;) HOT 1
- Broken bugfixes in OptionScreen_Select_Not1P and UpdateWaterSurface HOT 3
- Knuckles in Sonic 2 Broken Jump Sprite when fixBugs is Enabled HOT 1
- Some labels are *way* too verbose HOT 2
- i can't load the sprite Maps & pattern cues HOT 5
- Timer_frames should be renamed HOT 1
- Inaccurate description of bug in SwScrl_WFZ HOT 2
- knuckles in sonic 2 black screen error HOT 12
- hidden palace restoration error HOT 15
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 s2disasm.