Posted 05 July 2012 - 06:11 PM
- 「いっきまーす」
-
-
Posts:
2081
-
Joined:
11-July 08
-
Gender:Male
-
Project:Writing my own MD/Genesis sound driver :D
-
Wiki edits:7,061
Hi. I read the M68000PRM and MC68000 User's Manual and they're not clear on this issue, so:
d8(aN/pc,[da]N.[bwl]*scale)
Which of these forms are valid on the MC68000? Thanks. (I don't remember if I asked this question before elsewhere but I probably did... meh)
This post has been edited by Andlabs: 05 July 2012 - 06:13 PM
Posted 05 July 2012 - 09:02 PM
-
Posts:
564
-
Joined:
11-October 10
-
Gender:Male
-
Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
-
Wiki edits:12
The index register can never be a b, it must be either a w or a l. Specifically for the MC68000, the MC68008, and the MC68010, scale can't be there. In summary:
d8(aN/pc,[da]M.[wl])
This information is available in the M68000 family programmer's reference manual, by the way.
I assume this is about an assembler?
Aand yeah, you had asked about it on IRC some time ago

.
This post has been edited by flamewing: 05 July 2012 - 09:04 PM
Posted 05 July 2012 - 11:56 PM
- 「いっきまーす」
-
-
Posts:
2081
-
Joined:
11-July 08
-
Gender:Male
-
Project:Writing my own MD/Genesis sound driver :D
-
Wiki edits:7,061
Thanks. This is for an assembler, yes, and I did look in the PRM and didn't immediately notice anything specific about the MC68000 (unless it's in an entirely different section), and I don't remember but I might have asked some people a long time ago as well... eh
Should I just leave the scale bits as zero?
Posted 06 July 2012 - 07:01 AM
-
Posts:
564
-
Joined:
11-October 10
-
Gender:Male
-
Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
-
Wiki edits:12
Yes, the scale bits should be zero; the 3 processors that don't support it should ignore those bits, but an emulator or another might do this wrong -- who knows. And I am sure you know, but the scale bits are how many bits the index register gets shifted left after sign extension (if it is w).
The place where it is in the PRM is page 2-21 (page 62 from the start); it explains the brief extension word format (again) and talks about how it is the only one supported in the early processors, and how the "new" processors also extend it with the scale bits. I agree that it is not in the most obvious places to look; they really were bad at this.