 |
|
 |
|
| Posts by Kernigh |
|
|
|
|
|
|
|
|
This month, I began with SNES emulation. I now have one emulator, Snes9x for Unix; one script, ips.pl, to apply patches; and three ROM images:
1. Super Mario World (verified clean by online tools of SMWcentral)
2. Super Mario TKO, demo 1
3. Every Level Iggy!
Nintendo's controllers do not fit into USB ports. Therefore, I must control Mario with my keyboard. My problem is how Mario games feel much more difficult with a keyboard than with a traditional controller. I will explain my difficulty.
Super Mario World, with a real SNES and controller, is an easy game because I have so much practice. I wander the map, replaying courses, accumulating tens of extra lives. When I switched to Snes9x and keyboard, Super Mario World became a challenge, as if I had never before played Mario. I lost many lives by missing simple jumps in Yoshi's Island 3. (I also skipped Yellow Switch Palace, which would have helped.) I eventually defeated Iggy, saved the game, and retained some insight about the difficulty of Super Mario World to a new player.
Then I played Super Mario TKO with a keyboard. I have not played any new Mario stages since I went everywhere in New Super Mario Bros. for Nintendo DS, until I played Super Mario TKO. I reached Game Over during the first stage, Plain Plains. I tried again, passed Plain Plains, and reached Game Over during the second stage, Ivy Groove. My third attempt reached the first save point at Grassy Save Hut. I lost many lives by missing simple jumps in the first monument, Flint Hearth. After many Game Overs, I eventually passed Flint Hearth.
I failed to reach the first save point in Every Level Iggy! I go as far as the third stage, Iggy's Fortress, before I reach Game Over and must restart the entire game. (For now, I try to use save points placed in game by hackers, and try not to cheat using snapshot saves of Snes9x.)
Finally, I grabbed the Nintendo DS and replayed New Super Mario Bros., 1-1 through 1-castle. Enemies hit Mario only about four times. Mario never lost any lives, though I accidentally grabbed the Mini Mushroom in 1-4, because I forgot that it was there.
I now have enough practice at keyboard to return to Plain Plains when Mario needs extra lives in TKO. However, the keyboard tires me faster than a controller would, and I miss using the Control Pad to aim Mario. Should I continue to practice with these controllers, or is there some better way to control Mario?
These are my controls in Snes9x
Keyboard S = X
Keyboard X = Y (run) (I often hold this key down.)
Keyboard D = A (spin jump)
Keyboard C = B (jump)
Space bar = SELECT
Return key = START
Arrow keys = Control Pad (move, duck)
Do other emulators use different controls? Is it better to put space bar as B (jump) and adjacent key as Y (run)? Can I visit a switch palace and press a switch to change the connectors on every Nintendo controller to USB?
Is there a better way to control Mario in the emulator?
|
|
|
|
Originally posted by KyoseronI recommend lowering it to about 50 FPS, which is noticably slower, but will not really ruin the gameplay experience - this is especially useful in harder hacks. Then go up to 55, readjust, and when you think you've got it down, up it to 60 FPS.
Thank you for this suggestion. I found the equivalent setting in Snes9x in readme_unix.txt document. Snes9x measures frame time in milliseconds; I must hold SHIFT and press -/_ or =/+ to subtract or add 1ms. This math should convert your frames per second from SNESGT to frame time for Snes9x:
1000 / 50 fps = 20 ms
1000 / 55 fps = 18 ms
1000 / 60 fps = 16 ms
The emulator seems to start at 16 ms. (It starts at 16.7 ms, but the control messages only show integers.) So when I follow the recommendation from Kyoseron, then I would start at 20 ms, then 18 ms, then return to 16 ms.
I would only use a slow frame rate in (clean) Super Mario World too practice. I would always play hacks at the default 16 ms to avoid cheating (unless I start some very hard hack).
Originally posted by KyoseronAs for my controls on SNESGT, I use:
A = Z
B = X
X = C
Y = V
L = S
R = D
To try these controls, I had to again read the documentation of Snes9x. To remap buttons, I need to write a config file. I put the following lines in zxcv.conf
Code[Unix/X11 Controls]
K00:Z = Joypad1 A
K00:X = Joypad1 B
K00:C = Joypad1 X
K00:V = Joypad1 Y
K00:S = Joypad1 L
K00:D = Joypad1 R
(The first line "[Unix/X11 Controls]" must be present, or else Snes9x would ignore the other lines.) Then I start the emulator from command line as snes9x -conf zxcv.conf smw-clean.smc
The nice feature of these controls is that I can put four fingers on ZXCV and reach all four buttons ABXY; but it was so strange that B is not next to Y.
Originally posted by PangaWell, my controls seem to fit me very well...
SNES Controller A (Spin Jump) - Keyboard D
SNES Controller B (Regular Jump - Keyboard S
SNES Controller Y (Run) - Keyboard A
SNES Controller X (Switch Direction Flight) - Keyboard W
SNES Controller Left - Keyboard Z
SNES Controller Right - Keyboard C
I put these controls in asd.conf as
Code[Unix/X11 Controls]
K00:D = Joypad1 A
K00:S = Joypad1 B
K00:A = Joypad1 Y
K00:W = Joypad1 X
K00:Z = Joypad1 L
K00:C = Joypad1 R
I put three fingers on ASD to reach YBA. These controls feel nice; B is next to Y, and my finger can hold the Y button more easily with these controls than with default controls of Snes9x.
For now, I will stay with the default controls of Snes9x, where SDXC is XAYB, because I have the most practice with these controls. Also, a real SNES or DS has XAYB in a square shape, and SDXC has a square shape, so I guess that SDXC feels more like a real controller than ZXCV or ASD.
Originally posted by MarioHaxorHow about a standard USB gamepad for your computer for the emulator? I have one for my computer and have it assigned on emulators. I find it much better and easier to use than a keyboard. It is also more comfortable too.
If I would have a USB gamepad, then I would use it instead of learning the keyboard. However, I have not any USB gamepad, and I fear that a USB gamepad might not have the same Control Pad and buttons as a SNES or DS.
Originally posted by PangaDon't worry. You will soon get used to your settings and be able to play like you are playing on the real SNES.
That is good to read; I was worrying that Mario would be unplayable with keyboard.
My keyboard skills already improved faster than I hoped. I finished the third stage of Every Level Iggy! with seven lives, then I never saw another Game Over. I completed the hack and reached the credits! I also managed to clear Bullet Time, the optional difficult stage of Mario TKO, after very many deaths.
|
|
|
|
Originally posted by PangaAnybody have a youtube account?
Who here is an LP'er/TAS'er?
As of 6 February 2009,
* I do not have a YouTube account
* I do not make Lets Play
* I do not make Tool-Automated Speedruns
Here are my answers to the poll (Super Mario World)...
[X] I have the SNES one (Specify if emulated or not, or both)
[ ] I have the GBA one
[X] I have brawl
[ ] I have the demo in Brawl unlocked
[ ] I have it on the Virtual Console on Wii
[ ] I have all four
I played Super Mario World (U) with a real SNES, but I skipped all other versions of SMW. I also played Super Mario World (U) above SNES emulation, but only to make ready for SMW hacks. I have put on the record that I played Super Smash Bros. Brawl.
[X] I have beaten the SNES one
[ ] I have beaten the GBA one
[ ] I have beaten Yoshis Island 3 in the demo in Brawl
[ ] I have beaten the VC one
[ ] I have beaten all of the above
I beat Super Mario World by defeating Bowser and playing the credits. That was with the real SNES! I only played as far as #1 Iggy's Castle above emulation.
[X] I have obtained all 96 exits on the SNES one
[ ] I have obtained all 96 exits on the GBA one
[ ] I have obtained all 96 exits on the VC one
[ ] I have obtained all 96 exits all three
I do not remember for sure, but my last two exits might be Cheese Bridge, then Soda Lake. I had to grab a cape and ditch Yoshi at Cheese Bridge, then complete Soda Lake.
[ ] I have gotten 9999990 points on the SNES version
[ ] I have gotten 9999990 points on the GBA version
[ ] I have gotten 9999990 points on the VC version
[ ] I have gotten 9999990 points on all three
The SNES version resets the score when loading file, thus I never achieved a very high score. I know a glitch in Forest of Illusion 1 that enables a very high score, but I would not claim such a score, whether or not I reached 9999990 points.
[ ] I have the Princess Coins in the GBA version
[X] I have the effects after the Special World is beaten on the SNES
[ ] I have the effects after the Special World is beaten on the GBA
[ ] I have the effects after the Special World is beaten on the VC
[ ] I have the effects after the Special World is beaten on all three
I also pressed all four switches at all four switch palaces.
[ ] I have beaten Kaizo Mario World
[ ] I have beaten Kaizo Mario World without slowdowns
[ ] I have obtained all exits in Kaizo Mario World
[ ] I have beaten Kaizo Mario World 2
[ ] I have beaten Kaizo Mario World 2 without slowdowns
[ ] I have obtained all exits in Kaizo Mario World 2
Through YouTube, I saw Kaizo Mario World (also known as Super Kaizo World or Asshole Mario) and its sequel. These games seem to be most popular at YouTube, because a search for "Yellow Switch Palace" yields mostly videos of Kaizo Mario World. I have not played these games, because there are too many better SMW hacks.
I believe that players of Kaizo Mario World should not use tools such as slow frame rate or savestates (to undo actions). This would make the game almost impossible, as the videos for Asshole Mario do demonstrate. The example from Asshole Mario, and the presence of midway checkpoints in the stages, suggest that the developers intended gameplay without such tools. It is better to repeatedly die in frustration than to reach the goal tape. I expect to never put 'X' in box for "beaten Kaizo Mario World".
[ ] I have all of the above
[ ] I have none of the above
|
|
|
|
There is the genre of roguelike games. These games follow the pattern set by Rogue (1981). Roguelike games tend to be drawn using ASCII characters, but that is not the difficult part. Roguelike games tend to have some or all of three features from Rogue that increase the difficulty of the game.
Consider NetHack (1987-2003), a fantasy game with elves, orcs, hobbits and such. The plot is that you enter the dungeon to recover the Amulet of Yendor for your god, but the monsters want to kill you. Nethack has all four features from rogue
NetHack has all three features; they are:
1. Permanent death. There are no extra lives. If they kill you, then you restart the game from the very beginning. Imagine that when you die in Super Mario World, the game deletes your save file, and you have to repeat Yoshi's Island and Iggy's Castle. NetHack is exactly like that. NetHack deletes the save file at load, so there is also no going back to a previous save point.
2. Random levels. So you restarted Super Mario World, and Yoshi's Island 2 is different. All the terrain features, holes and enemies moved. When you restart NetHack, it generates a new dungeon. You are not replaying the same levels, but you also cannot predict the locations of monsters and traps.
3. Unidentified items. You found a red mushroom, but it might be a powerup, or grant an extra life, or be poisonous. Do you try to use the red mushroom? NetHack has items like this. Instead of finding a healing potion, you might find a red potion. If you drink it, then it might heal you, or cause blindness, or do something else, good or bad.
It is funny to watch videos of extra-difficult SMW hacks, and notice that said hacks do not have any of the features that make NetHack so difficult. You try to imagine Kaizo Mario with permanent death and random levels.
Yes, NetHack is difficult. Many players use spoilers, like the one for how to identify items. But NetHack is worse than that. Some players resort to using NetHack's source code as a reference. Yes, I have played NetHack. It is so hard that I had to take a break to suspend the sequence of permanent deaths. I would play Wesnoth, or Oberin, or SMW hacks instead of NetHack.
However, NetHack is not the most difficult game that I have ever played. Given roguelike games, some players say that ADOM or Crawl is more difficult than NetHack. I tried both games. Then there is SLASH'EM, the result of adding more stuff to NetHack, for a yet harder game. I guess that SLASH'EM is the most difficult game that I ever played.
I have never won any roguelike game. There is an entire genre of roguelike games and I have not any victory in any of them.
|
|
|
|
Originally posted by MasterPenguinI bought a SNES Controller + USB Adapter, works perfectly.
My internet searches found Amazon pages for the RetroPort and SmartJoy adapters, which (I guess) adapt SNES controllers into standard USB HID controllers. I have not ordered an adapter yet but I might buy one, if it works as well as you say.
Meanwhile, I changed emulators. The old X11 port of Snes9x 1.51 (which was my emulator) was difficult to configure. The emulator did not have a menu bar or a preferences dialog, and I had to make "[Unix/X11 Controls]" files. Now I have the newer GTK/X11 port of Snes9x. This one has a menu bar and a preferences dialog, so I can set controls the easy way: "Click an entry and then press the desired keys or joystick button"
It should now be easy to set up a USB controller, if I get one.
|
|
|
|
Every Level Iggy!:
In the first stage called Iggy's Plains, how do I carry the P switch to the pipe to the underground room?
As I carry the P switch, I jump from platform to platform toward the pipe. Between the two highest platforms, I always jump too high and land on the higher ground that bypasses the pipe. I hold Right and Y button (to hold the switch) and press B to jump. I release B as soon as I can, but Mario's jump remains too high. I would use spin jump, but Mario cannot spin jump while holding a P switch.
|
|
| (restricted) |
|
|
Originally posted by UltimaximusSuper Mario: Hunter's Revenge 3 Demo doesn't work. Yes, I've checked the ROM, and it's clean. Yes, I used Lunar IPS to patch it to the ROM. Yes, I loaded the .smc and not the .ips in ZSNES. The checksum doesn't fail, but I get a black screen. I've played other hacks and they work fine.
Yes, all true. I have a different emulator and patcher than you. (Emulator is snes9x-gtk 1.51/64, patcher is ips.pl.) But when I start the game, I get the black screen.
Originally posted by metalgearhunterYou need to patch the N-SPC patch.
But I cannot find the N-SPC patch in the patches section, so where to obtain it?
|
|
|
|
No, I am not making a translation patch for this game. I have not tried to fit my translations into the message box.
I did not find any translation of Super Mario Océan from French to English, so I now do present my first draft. I only translate the message boxes and stage names. The game does not use accent marks, so I guessed where to put accent marks.
The translated message boxes might help if you try this game and want to know what to do. This translation contains spoilers.
(February 25: I modified the translation, using hints and suggestions from the users who replied to this thread, including from yoshicookiezeus and from yogui.)
----
STAGE NAMES
Maison Abandonné = Abandoned House
Île Bossu = Bumpy Island (note 1)
Océan Magitique = Magitic Ocean (note 2)
Île Téba = Téba Island (note 3)
Château 1 = Castle 1
Mer de Glace = Sea of Ice
Île de Glace 1 = Frozen Island 1 (note 4)
Île de Glace 2 = Frozen Island 2
Épave = Sunken Ship (note 4)
Château 2 = Castle 2
Forteresse = Fortress
Île Forêt 1 = Forest Island 1
Île Forêt 2 = Forest Island 2
Île Forêt 3 = Forest Island 3
Mare Étrangé = Strange Lake
Grotte Mirage = Cave of Delusion (note 4)
Et Maintenant? = And Now What? (note 4)
SECRET EXIT FROM ILE TEBA
Pont Cheep-Cheep = Cheep-Cheep Bridge
Île Carré = Square Island
Île Dispersé = Scattered Isles (note 4)
SECRET EXIT FROM OCEAN MAGITIQUE
Île Tuyaux 1 = Pipe Island 1
Île Tuyaux 2 = Pipe Island 2
Île Rocheuse 1 = Rocky Island 1
Île Rocheuse 2 = Rocky Island 2
Île Bautée (Île Beauté) = Island of Beauty (note 5)
Île Inconnue = Island of the Unknown (note 4)
Route Étoilé = Star Road
SECRET EXIT FROM ILE ROCHEUSE 1
Iceberg = Iceberg
Île Inconnue = Island of the Unknown (note 4)
Route Étoilé = Star Road
Épreuve 1 = Challenge 1 (note 4)
Épreuve 2 = Challenge 2
Épreuve 3 = Challenge 3
(I am yet to reach two more stages after Épreuve 3.)
----
MESSAGE BOXES

Français: Bowser a capturé Peach une nouvelle fois, et alors que Mario le poursuivais, il se sont retrouver dans un océan inconnue.
English: Bowser has kidnapped Peach once again, and when Mario goes after her, he finds himself in an unknown ocean. (note 6)

Français: Il n'y a plus personne ici. Tu es piègé dans cet océan et il n'y a aucun moyen de rentrer chez toi... ou pas.
English: There is nobody here anymore. You are trapped in this ocean and there is no way to return home... or there might be. (note 6)
(I wrote "trapped and this ocean", yoshicookiezeus caught the error.)

Français: Vous avez vu le mont TÉHO? Montez tout en haut pour trouver la sortie, mais la sortie secrète se trouve encore plus haut.
English: Have you seen TÉHO Mountain? Climb up to the top to find the exit, but the secret exit is yet higher. (note 3)

Français: Ce château est vraiment étrangé, non? Vous trouvez pas sa bizzare?
English: This castle is truly strange, is it not? Do you not find that it is bizarre?
(yoshicookiezeus suggests using, "Don't you find it bizarre?")

Français: Mario, nous somme toujour coincer ici? Peut-tu trouver un moyen de quitter cet océan. Cherche les sorties secrètes, peut-être que...
English: Mario, are we always stuck here? Can you find a way to leave this ocean? Perhaps if you find the secret exits...
(I translated the last sentence, "Seek the secret exits, can you..." I changed the sentence to the translation from yoshicookiezeus.)

Français: Voici le monde étoilé, un monde secret plain de mystère. Peut-être est-ce le seul chemin possible pour retourner à la maison?
English: This is the Star World, a secret world revealed from mystery. Can it be the only possible way to return home?

English: This is a Ghost House. Can you find the exit? Hee, hee, hee... Don't get lost!
----
NOTES OF TRANSLATION

(note 1) Larousse gives "la bossu" = "hunchback", "bossu" = "hunchbacked"; WordNet gives "kyphosis, humpback, hunchback" = "an abnormal backward curve to the vertebral column". For example, the English version of the French novel Notre-Dame de Paris (Our Lady of Paris) has the title The Hunchback of Notre Dame (Le Bossu de Notre-Dame). The Île Bossu (shown in above screenshot) does not seem to have an abnormal backward curve to its vertebral column, so I follow "la bosse" = "bump".
(note 2) The name of "Oceán Magitique" resembles the name of a real ocean. Compare the Océans Atlantique, Pacifique, Arctique.
(note 3) The accent marks in "Téba" and "Tého" are my guess. Téba Island is the site of Tého Mountain. yogui, the creator of the hack, explains that these names are contractions of "t'es bas" (you are low) and "t'es haut" (you are high).
(note 4) Literal translations:
Île de Glace = Island of Ice
Épave = Shipwreck
Grotte Mirage = Mirage Cave
Et Maintenant? = And Now?
Île Dispersé = Scattered Island
Île Inconnue = Unknown Island
Épreuve = Test
(note 5) I failed to translate the word "bautée". One dictionary gave le bauté as a "mantelet de femme", a type of woman's clothing worn on the arms and shoulders. I changed the name of the island to "Grass Island". Then yogui explained that the word should be "beauté", so the name of the island is "Island of Beauty".
(note 6) Literal translations:
* Bowser has captured Peach a new time, and then as Mario would pursue her, he finds himself in an unknown ocean.
* It has there not any more persons here. You are trapped in this ocean and it has there no means of returning to your home... or not.
|
| Last edited on 2009-02-25 04:40:19 PM by Kernigh. |
|
|
|
Originally posted by yoshicookiezeusOriginally posted by KernighYou are trapped and this ocean and there is no way to return home...
Change the first "and" to "in".
Thank you for catching that mistake. I tried to edit that post to fix it. I only have a basic understanding of French, but I should know that "dans" = "in". I am a native English speaker from USA.
Originally posted by yoshicookiezeusOriginally posted by KernighYou do not find that it is bizarre?
Don't you find it bizarre? would sound so much better here.
I prefer "You do not find that it is bizarre?" or alternatively "Do you not find that it is bizarre?" I almost put, "You do not find it bizarre?" but I felt that the phrase "that it is bizarre" would be a less bizarre use of English grammar. I also like to avoid contractions such as "don't". So I prefer my wording, though it is bizarrely longer than the original French, "Vous trouvez pas sa bizzare?"
Your wording might be better for the context of the message box in the game, and also better match the original French. I guess that contracting "Vous ne trouvez pas" to "Vous trouvez pas" is like using "don't". The one word that I do not understand in the French is the "sa" before "bizzare". I believe that "sa" is the possessive pronoun (its/his/her), so I wonder why "sa" is before the adjective "bizzare".
Originally posted by yoshicookiezeusOriginally posted by KernighMario, are we always stuck here? Can you find a way to leave this ocean. Seek the secret exits, can you...
In this case, I believe "toujours" should be translated into "still". Also, the second sentence should have a question mark instead of a period, and I believe that "Perhaps if you find the secret exits..." would be a more accurate translation of the third sentence.
Mario rescues Peach during "Grotte Mirage". Peach speaks to Mario in this message from "Et Maintenant?". I read this message as that Mario and Peach will always remain in that ocean, so I like my use of "always". I might have a problem, because I originally misunderstood the message at "Maison Abandonné", so I learned that Mario was stuck at the ocean at "Et Maintenant?".
The lack of a question mark might mean that Peach spoke without increasing the pitch of her voice.
I did not understand "peut-être" so I might have ruined the third sentence. As I now check the English-French dictionary of Larousse, it does translate "peut-être" to English adverb "perhaps". My use of "can you" creates a question; the French sentence was not a question. I might change my sentence later.
|
|
|
|
(30 August 2009) Status of this ROM hack...
* wiki page for Find 40th Fibonacci Number
* 65816 version for SNES: complete at 6 June 2009.
* SPC-700 version for SNES: complete at 30 August 2009.
(23 February 2009) I want to learn ROM hacking and to become a ROM hacker, so that I can hack ROM images.
I wanted a simple idea for my first ROM hack for the Super NES. I would use ASM to cause the ROM to perform a simple calculation. Then I would need to write the answer to save-RAM, and extract the answer from the save-RAM file. This is simpler than learning graphics to draw the answer on the screen, and probably easier than fitting a custom block into Super Mario World. So I created an idea and designed a program:
Calculation: Find the 40th number in the Fibonacci sequence (1, 1, 2, 3, 5, 8, 13, 21, ...).
Answer: Write to save-RAM, an ASCII text file inside a cpio archive.
Extraction: Read the cpio archive in the save-RAM image with the existing Unix command pax(1).
I chose the cpio archive format, so that I can use pax(1) instead of writing a new extraction program. I am new to 65816 assembly language, so I needed to try my design in a different language so that I can learn the cpio archive format.
So I planned three versions of the program:
1. in C language, for OpenBSD or other Unix systems. Finished, with one source file: find40th.c
2. in PowerPC assembly language, for OpenBSD systems. Finished, with four source files: cpio-powerpc.s, find40th-powerpc.s, format-powerpc.s, system-powerpc.i
-----> and README.powerpc (655 lines) to explain PowerPC assembly language
3. in 65816 asssembly language, for Super NES emulators. (6 June 2009) Complete and working, with four source files: cpio-65816.s, find40th-65816.s, format-65816.s, system-65816.i (28 August 2009: I changed the links from HTTPS to HTTP.)
The first two versions use a memory-mapped file in place of save-RAM.

(Screenshot of February 24: At the Unix command line, I run the PowerPC assembly version of the program and extracted the result. The 40th Fibonacci number is 102334155.)
I wrote in C language, to learn cpio archive format and to verify my design. Then I ported the program to PowerPC assembly language, because I already knew some PowerPC instructions and I already had the correct assembler and tools. To port this program, I needed to learn new instructions, especially for comparisons and conditional branches.
The calculation to find the 40th Fibonacci number was simple for C language:
Code int_fast32_t a, b;
a = 1; /* the first two numbers of the sequence */
b = 1;
/*
* Compute two more numbers per iteration.
*
* An optimizing compiler might run this loop at compile
* time, and store the answer within the object file.
*/
for (count = 4; count <= 40; count += 2) {
a = a + b;
b = a + b;
}
The same calculation was moderately simple for PowerPC assembly language:
Code ## the first two numbers in the sequence
li %r29, 1
li %r30, 1
## compute two more numbers per iteration
li %r0, (40 - 2) / 2
mtctr %r0 # number of loop iterations
5: add %r29, %r29, %r30
add %r30, %r29, %r30
bdnz 5b # loop ctr times
PowerPC has 32 registers (%r0 through %r31); programs can use %r14 through %r31 for local variables. When this loop finishes, %r29 is the 39th Fibonacci number and %r39 is the 40th Fibonacci number. Addition is easy; add %target, %op1, %op2 does %target = %op1 + %op2 with 32-bit arithmetic.
The same calculation would be more difficult for 65816 assembly language. It seems that the 65816 does not have so many registers, and has 16-bit addition but not 32-bit addition. The answer would overflow 16 bits. I might need to put variables in the direct page, instead of registers; and use the carry bit with addition. It seems well that I wrote the program in PowerPC assembly language before I would try 65816 assembly language.
To write the answer, I need to convert an integer to ASCII decimal. Also, the cpio archive headers have some fields in ASCII hexadecimal. My C program uses snprintf(3) for the conversion. My PowerPC assembly program uses my custom format routine for the conversion. The routine uses a loop that needs to divide by 10 and take the remainder. I use a formula that requires multiplication, subtraction, and right shift.
Code ## Formula (suggested by gcc) to divide by 10, is to
## 0xcccccccd
## multiply by ----------- = 0.100000000005821
## 0x800000000
## which is to multiply by 0xcccccccd, then shift right 35.
##
...
mulhwu %r9, %r5, %r4 # %r9 <= ((%r5 * %r4) >> 32)
...
srwi %r9, %r9, 3 # %r9 <= (%r9 >> 3)
mulli %r6, %r9, 10
sub %r6, %r5, %r6 # %r6 digit <= remainder
I plan to port this routine to 65816 assembly language, but I understand that the 65816 cannot multiply. Some time ago, I read some documents about the Super NES, so I remember various options that I might have:
1. to use the hardware registers for multiplication in the Super NES. I would have to write the factors, then wait, then read the product; but I know not how to wait.
2. to use the multiply instruction of the SPC700. This would be very difficult. I would have to learn SPC700 assembly language, upload a program to the SPC700, and use hardware registers to communicate between the 65816 and the SPC700; but I would use the registers to indicate when the product becomes available.
3. to write some custom code for multiplication. I might be able to code multiplication with repeated addition and left shift. I would need code to multiply by 0xcccccccd and code to multiply by 10. I predict that I will choose this option.
4. The 65816 has a decimal flag, but I do not know what this flag does or whether it might help me. (February 24: I learned that the decimal flag affects ADC and SBC, and treats hexadecimal digits as decimal digits, so $1234 would be 1234, and $08 + $02 would be $10 instead of $0a. To divide by ten, I would shift right by four. There is no conversion between decimal and binary, so I would have to compute the Fibonacci sequence in decimal, using 48-bit arithmetic. I predict that I will choose this option.)
I wonder how games like Super Mario World do display the score in decimal.
Meanwhile, I need an assembler. I used GNU as (from GNU binutils) for PowerPC, but I need something for 65816. I read a rumour that XKAS cannot relocate sections or resolve undefined symbols, so I might use WLA.
|
| Last edited on 2009-08-30 04:42:12 PM by Kernigh. |
|
|
|
I recently installed xkas 0.12 from http://byuu.cinnamonpirate.com/programming/
It came with binaries for Windows or Linux/i386, but I am using OpenBSD/powerpc, so I did run cc.sh to compile xkas from source code. Then I installed xkas.
This version of xkas seems not to work with patches from SMWcentral. For example, I tried to apply (xkas) Powerdown from the patches section to a copy of a clean ROM of SMW, I received an error:
Code$ xkas ../smw-powerdown.smc powerdown.asm
xkas error: pass 1, line 2.2: "Powerdown"
So I looked at the top of powerdown.asm and saw this comment:
Code;;;
; Powerdown
;
;
; found in SMwiki, Submitted by aiyo
It seems wrong to use semicolons for comments. I checked the documentation xkas/doc/xkas.html and the examples xkas/test/*.asm and they all use // not ; to start comments. I also tried the xkas source code and found this in xkas/libxkas/libxkas.cpp:
Code for(unsigned l = 0; l < count(line); l++) {
int pos = qstrpos(line[l], "//");
if(pos >= 0) line[l][pos] = 0; //strip comments
...
qsplit(block, ";", line[l]);
for(unsigned b = 0; b < count(block); b++) {
This looks like // is the only type of comment and ; is for splitting things like clc; adc.
I also noticed that READ BEFORE YOU ASK QUESTIONS! (REVISION 13) states to apply patches like so:
Quotexkas patch.asm rom.smc
However my copy of xkas works the other way:
Code$ xkas
xkas v0.12
usage: xkas output.bin input.asm
So I guess that I have the wrong version of xkas. There must be some other version of xkas that uses semicolons for comments and wants patch.asm before rom.smc.
Am I correct that I have the wrong version of xkas? Is version 0.12 too old? Where do I fetch the version of xkas that uses semicolons for comments?
|
|
|
|
Originally posted by yoshicookiezeusOriginally posted by KernighMario, are we always stuck here? Can you find a way to leave this ocean. Seek the secret exits, can you...
Also, the second sentence should have a question mark instead of a period, and I believe that "Perhaps if you find the secret exits..." would be a more accurate translation of the third sentence.
Now I decided to change the last sentence to your wording, and add that question mark. Thank you, yoshicookiezeus, for your help with the translation.
Originally posted by yoguiHello, it's yogui, the creator of Super Mario Océan. (hum... it's my first post in this forum ^^).
Thanks to play my game, and thanks you to try to translate my game. Maybe I can translate my hack and resubmit it!
Wow, I am lucky that the creator of the hack posted in this thread.
I do not oppose anyone who wants to use my translation to make a translation patch or an English version of the hack. I cannot make a translation patch because I have not learned how to change message boxes or stage names in Super Mario World. (Also, my computer is not compatible with Lunar Magic, so I would need to learn to use XKAS or WLA.)
Originally posted by yoguiTéba island and Tého island is a play on words, because Téba it pronounced like that "t'es(tu es) bas" (you'r down/low), ans Teho like that "t'es(tu es) haut" (you'r up/high). And I have no idea how to translate that ^^. Maybe by "Yurdown" and "Yup", or "Yulow" and "Yuhigh".
It might work in English to use "lo" and "hi", so maybe "Yulo Island" and "Yuhi Mountain". My translation now uses the original "Téba" and "Tého", but "Yulo" and "Yuhi" might help the English player to understand the play on words.
One problem is that "Yuhi" might sound like "you he" instead of "you hi". Maybe "Yuhai Mountain" is better. Maybe "Yurlo Island" and "Yurhi Mountain" is better. The mountain in Super Mario World is "Cookie Mountain", but the tallest mountain is "Mount Everest", so "Mount Yuhi" or "Mount Yuhai" or "Mount Yurhi" or "Mount Yurhai" might work.
I like "Yuhi" and "Yulo". What does anyone else think?
|
|
|
|
Originally posted by HyperHackerThe typical way to multiply is bit shifting and addition. e.g. to multiply by 10:
y = x << 3 ;multiply by 8
x = x << 1 ;multiply by 2
x = x + y
So something like:
LDA $00
ASL
ASL
ASL
STA $01
LDA $00
ASL
STA $00
ADC $01
Thank you for the example. I might have missed that 'ASL' exists. Now that I check the instruction set (in my copy of w65c816s.pdf), 'ASL' does shift left.
The instruction set does not have 'ASR'. If I wanted to do shift right, then I would have to use 'AND' to clear the low bits, then use 'ROR' to do rotate right?
Originally posted by Vanilla Lake 2(while the hardware registers do multiplication) just use NOPs to burn the time if you don't have something to do in between. the worst case scenarios are 8 cycles for mult and 16 for div. 3 NOPs and one LDA $4xxx would mean 9 cycles would have elapsed and the product is ready to be read.
I know that 'NOP' does nothing but wait, but I did not learn about cycles yet. From your example, I guess that one 'NOP' waits 3 cycles.
My primary references to the Super NES are anything by Anomie at romhacking.net. Anomie's Register Doc has:
Code4202 wb++++ WRMPYA - Multiplicand A
4203 wb++++ WRMPYB - Multiplicand B
mmmmmmmm
Write $4202, then $4203. 8 "machine cycles" (probably 48 master cycles)
after $4203 is set, the product may be read from $4216/7. ...
I will not soon try multiplication. First I need to try addition in my ROM.
Originally posted by Ersanio(offtopic) I dunno why but all.log is gone from the documents section. I don't know WHO removed it or WHY. It was rude not to inform us about the removal or I overlooked something. Whatever. Any clarification would be appreciated.
Meanwhile I put up all.log here:
http://ersan00b.googlepages.com/disassembly.rar
(offtopic reply) I also wondered about all.log, after I read about its disappearance in the ASM help thread. I downloaded your copy, Ersanio. I might use it later if I would hack SMW. Maybe you should post your URL in the ASM help thread, also?
--------------------
To start my 65816 hack, I had two choices:
1. Place my code and a 'JSL' in the Super Mario World ROM.
2. Place my code in a new ROM.
I chose a new ROM. I started my project, using WLA as my assembler. WLA can assemble a complete, new ROM with the Super NES header, including the checksum and the pointer to the reset handler. I configured the header for two banks of loROM and $800 bytes of save-RAM.
Inside the Super NES, my memory map seems to be:
$700000 through $7007ff: save-RAM
$7e0000 through $7effff: work-RAM
$808000 through $80ffff: first ROM bank
$818000 through $81ffff: second ROM bank
This should be exactly like Super Mario World, except that SMW uses more RAM and ROM, and I added $80 to my ROM banks.
The Super NES accesses its stack, its direct page and its reset handler through bank $00, so I use the mirrors:
$000000 through $001fff: mirror of $7e0000 through $7e1fff
$008000 through $00ffff: mirror of $808000 through $80ffff
Given this memory map, I put the reset handler in bank $80, and I split bank $7e between the stack and the direct page:
$7e0000 through $7e1eff: stack
$7e1f00 through $7e1fff: direct page
I wrote some WLA assembler directives for this memory map, and then I began to program my project. I made some early mistakes like this:
Code ;; nvmxdizc
.define P_MSELECT %00100000
...
sep #P_MSELECT
lda #$1eff.w ; this code is WRONG
I needed some time to find why my ROM was broken. The cause was my backward use of P_MSELECT. The correct way is to set the flag for 8-bit A, and reset the flag for 16-bit A, so rep #P_MSELECT before lda #$1eff.
WLA also came with a list of mnemonics, which I use as a reference. I use the list to code like so:
Code lda #0
sta 9,s ; no stz 9,s
...
txa
sta 13,s ; no stx 13,s
I needed some way to check if my ROM reached some code. In the current version of my ROM, I have:
Code ;; cpio points to save-RAM at $700000
;; (test) put '$61 $73' in the save-RAM
lda #$7361
sta cpio + $400.l
...
(assign arguments for cpio_header)
...
jsl cpio_header
;; (test) put '$62 $74' in the save-RAM
lda #$7462
sta cpio + $402.l
After I run my ROM, I look at the .srm file:
Code$ hexdump -C find40th.srm
00000000 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 |````````````````|
*
00000400 61 73 60 60 60 60 60 60 60 60 60 60 60 60 60 60 |as``````````````|
00000410 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 |````````````````|
*
00000800
$
(This hex viewer uses '*' to skip identical lines.) I see '61 73' but not '62 74', so I know that my ROM became stuck. If I comment out the 'jsl cpio_header', then I also see '62 74'. Thus I know that my ROM becomes stuck somewhere in 'cpio_header'.
To use this check, I must delete my .srm file before I run my ROM, so that my .srm file does not contain leftover bytes from earlier runs.
I have some code in 'cpio_header' that accesses a 16-bit address, but I forgot to set the data bank register, so that must be one of my problems.
'cpio_header' is unusual because I try to allocate a stack frame for local variables:
Codecpio_header:
;; allocate stack frame
tsc
sec
sbc #16
tcs
...
;; free stack frame
tsc
clc
adc #16
tcs
rtl
So after I fix the data bank register, then if I would have more problems, then I might check for problems with the stack.
|
|
|
|
Originally posted by Vanilla Lake 2arithmetic shift right can be done with just:
that's all, carry flag will be set based on sign bit and you'll have the bit rotated in conveniently.
I forgot that ROR uses the carry bit, but I understand now. If I remember about CMP from the recent ASM Workshop, then CMP #$80 tests (unsigned) A >= #$80 to set the carry flag.
During the Workshop, I learned that 'LSR' exists. I guess that 'LSR' is for unsigned right shift. Previously, I believed that there was no right shift because I did not find 'SRA' or 'ASR'.
Originally posted by Vanilla Lake 2NOP is just 2 cycle, 3 NOPS amount to 6 cycles and by the time the opcode and operand for the LDA $4xxx is read more than 8 cycles have passed.
So cycles are more difficult to understand than I guessed.
Meanwhile, I fix mistakes in my code. For example, I had this:
Code ;; set stack pointer to #$1eff
lda #$1eff
txa ; this is so WRONG
I wrote 'TXA' (transfer X to A) but I wanted 'TCS' (transfer 16-bit A to S). My code might have other mistakes like this.
(March 2) I found my worst mistake yet. I searched for a problem in my ROM. The accumulator had $1efc. Subtraction of 16 gave $1eec. The accumulator had $1eec. Addition of 16 gave $2562. How does $1eec + 16 = $2562?
I simplified my code, but the problem remained.
Code lda #$1eec ; a9 ec 1e
clc ; 18
adc #16 ; 69 10 00
sta cpio + $3dc.l ; 8f d0 03 70
This computes $1eec + 16 and writes the answer to $7003d0. I ran my ROM, then looked at x03d0 in my .SRM file, and saw '62 25' = $2562. I read the hex in my ROM, and the assembly was correct. Then I recalled that the decimal flag affects 'ADC'.
So I checked my hardware reset handler.
Code ;; nvmxdizc
.define P_MSELECT %00100000
.define P_XSELECT %00010000
.define P_DECIMAL %00001000
sep #P_DECIMAL ; another MISTAKE
rep #P_MSELECT | P_XSELECT
This code does set the decimal flag but I meant to reset this flag. I am changing my code to
Code rep #P_MSELECT | P_XSELECT | P_DECIMAL
(April 15) I now have working code that actually computes the 40th Fibonacci number. The num1 and num2 are labels in RAM. I still have the direct page in range $7e1f00..$7e1ffff, so I need to use the < sign to grab the low byte ($00..$ff) to use the direct page.
Code ;; num1, num2 = 1 in decimal mode
lda #1
sta <num1
sta <num2
stz <num1 + 2
stz <num2 + 2
stz <num1 + 4
stz <num2 + 4
;; compute 40th Fibonacci number
ldx #(40 - 2) / 2 ; number of loop iterations
sed ; set decimal mode
_fib_loop:
;; num1 = num1 + num2
lda <num1
clc
adc <num2
sta <num1
lda <num1 + 2
adc <num2 + 2 ; carry
sta <num1 + 2
lda <num1 + 4
adc <num2 + 4 ; carry
sta <num1 + 4
;; num2 = num1 + num2
lda <num2
clc
adc <num1
sta <num2
lda <num2 + 2
adc <num1 + 2 ; carry
sta <num2 + 2
lda <num2 + 4
adc <num1 + 4 ; carry
sta <num2 + 4
dex
bne _fib_loop ; loop X times
cld ; clear decimal mode
I also learned to use mvn. I had some trouble with wla-65816. My mvn did not work until I reversed the operands.
Code ;; Copy answer from format_buffer to cpio_pos.
;;
;; Attention! WLA-65816 reverses the operands of "mvn", which
;; moves a string of bytes from bank $ss to bank $dd:
;; mvn $ss, $dd ; standard syntax
;; mvn $dd, $ss ; wla-65816 syntax
;;
;; Our banks are
;; $ss == dp[format_buffer + 2] == answer >> 16
;; $dd == dp[cpio_pos + 2] == cpio >> 16
;;
ldx <format_buffer ; x = source address
ldy <cpio_pos ; y = destination address
lda <format_bufsiz
dec a ; a = length - 1
mvn cpio >> 16, answer >> 16
I checked my assemblers:
xkas-v0.12 accepts the standard syntax, mvn $ss, $dd
wla-65816, version 9.5, requires backward syntax, mvn $dd, $ss
xkas-v0.06 requires mvn $ssdd
(June 6) My 65816 hack, Find 40th Fibonacci Number, is complete.
Four source files: cpio-65816.s, find40th-65816.s, format-65816.s, system-65816.i (28 August 2009: I changed the links from HTTPS to HTTP.)
The generated find40th.srm provides the correct number, 102334155:
Code$ make find40th.sfc
wla-65816 -o cpio-65816.s cpio-65816.o
wla-65816 -o find40th-65816.s find40th-65816.o
wla-65816 -o format-65816.s format-65816.o
wlalink -r find40th-65816.link find40th.sfc
$ snes9x-gtk find40th.sfc
$ pax -rvf find40th.srm
result
pax: sv4crc vol 1, 1 files, 2048 bytes read, 0 bytes written.
$ cat result
102334155
$
|
| Last edited on 2009-08-28 01:33:42 PM by Kernigh. |
|
|
|
Originally posted by SagittaireB1=(232/16)= 14.5 (E)
B2=(14x16)= 224
B3=(232-224)=8
232=E8.
Unfortunately, the 3 equations are only good up to 256.
If D >= 256, then B1 becomes too large. The most obvious way to proceed is to convert B1.
Here I try D = 909
B1=(909/16)=56+13/16
B11=(56/16)=3+8/16 => 3
B12=(3x16)=48
B13=(56-48)=8 => 8
B2=(56x16)=896
B3=(909-896)=13 => D
Result 909=38D
The most difficult step is computing 909/16. I wonder if there is some easier way that does not compute 909/16.
|
|
|
|
We lost a few posts in this thread when the administrators reset SMWcentral during early March 2009.
I am reposting the following text because it is the answer to my question from page 79. This was post 1/1 from account 5018, username byuu:
Originally posted by byuuQuoteThis looks like // is the only type of comment and ; is for splitting things like clc; adc.
Hi. For xkas v0.10+, I changed the code split from " : " to ";" (so as to allow all parsing to be LL(1)), and thus comments needed to be changed from ";" to something else -- I chose "//". I'm sorry that it broke backward compatibility, but it was necessary for future enhancements.
If you need to compile sources with ";", your only option is to use xkas v0.06. It's in the discontinued section of my downloads. I hear that *nix users get errors about strlwr / strlower missing. It's fairly easy to make such a function if you need to:
void strlower(char *s) {
while(*s) { if(*s >= 'A' && *s <= 'Z') *s += 0x20; s++; }
}
void strlwr(char *s) { strlower(s); }
It seems that byuu, the author of xkas, registered a new account 5018 during March 2009, to write the above answer to my question. The reset must have deleted the account because http://www.smwcentral.net/?p=profile&id=5018 now belongs to someone else.
|
|
|
|
Originally posted by Amileia KazeirassaidaI would like to learn (C language); does anybody have any suggestions on where to start?
I learned Java language. Then I learned C++ language as a variant of Java. Then I learned C language as C++ with fewer features. The simpler way is to start with C language. (My username has no connection to the K&R book; I would rather talk about Ruby language.)
Read the previous posts, because they link to tutorials and software that might be useful.
You need a text editor and a C compiler for your computer. Most computers have a text editor that edits plain text, like Microsoft's Notepad, KDE's Kate or Xfce's Mousepad. The most popular C compiler seems to be GCC and its variants. MinGW is the variant of GCC for Microsoft Windows. C code is plain text. C compiler converts plain text to a runnable program.
Here is an example program. The parabola program computes some values from the parabola
Y = 2X2 + 3X + 4
You might copy and paste the C program to your text editor, run the C compiler, then run the program. Here is the code:
Code/* parabola.c */
#include <stdio.h>
int
square(int base)
{
return base * base;
}
int
parabola(int x)
{
return 2 * square(x) - 3 * x + 4;
}
int
main()
{
printf(" X => Y\n");
printf("-2 => %d\n", parabola(-2));
printf("-1 => %d\n", parabola(-1));
printf(" 0 => %d\n", parabola(0));
printf(" 1 => %d\n", parabola(1));
printf(" 2 => %d\n", parabola(2));
return 0;
}
If you run this parabola program, then it prints the following output:
Code X => Y
-2 => 18
-1 => 9
0 => 4
1 => 3
2 => 6
A C program consists of one or more functions. This program has three functions: square, parabola and main.
Each function contains a sequence of statements, which happen in order. Every statement ends with a semicolon ;. You may type one statement per line, or multiple statements in one line, or one long statement across multiple lines, but you must put a semicolon after each statement.
Each function takes zero or more parameters, and returns a value. For example, function square takes parameter base (so that it can square different numbers) and returns the base squared.
Statements can contain operators and function calls. The special return statement ends a function and returns a value. The function parabola has only one statement, the return statement; and it uses the operators for addition, subtraction and multiplication; and it has a function call to square.
Codeint
parabola(int x)
{
return 2 * square(x) - 3 * x + 4;
}
The code 2 * square(x) - 3 * x + 4 is an expression of the return value. There is an order of operations. Multiplication happens before addition or subtraction.
Code/* these act the same */
2 * square(x) - 3 * x + 4
(2 * square(x)) - (3 * x) + 4
/* this acts different */
2 * (square(x) - 3) * (x + 4)
Operators (and function calls) can use constants or variables. The number 2 is a constant, so 2 never varies, but constantly has the value of two. The identifier x is a variable, which can change values. The name x identifies somewhere in memory to store the value of the variable.
Every variable must have a type. x has type int, which is the integer type. An int has no fractional part, so the calculation 3 / 4 would yield zero (not 0.75). An int also has limited range, so the calculation of a very large number (like the 100th Fibonacci number) would overflow and yield a smaller wrong number.
Code/* how to write a function */
return_type
name_of_function(type1 parameter1, type2 paramter2, type3 parameter3)
{
/* statements go here */
}
If I use a variable, then I must declare the variable with a type. If the C compiler gives an error for an undeclared variable, then I either forgot to declare the variable, or I wrote a typo in the name of the variable.
Codeint
parabola(int x)
{
return 2 * square(x) - 3 * x + 4;
}
square identifies a function and not a variable, because there is a left paren ( after the name. This is a function call with one argument x. The value of x becomes the first parameter to the function square.
To operate in order, the computer calls the function square and replaces the call with the return value. Then it replaces the multiplication with the product. Then it replaces the addition or subtraction with the answer. Like most operations, addition or subtraction happens left to right. (The C compiler might know that some operations are associative, and employ a different order if it gives the same answer.)
Code/* suppose that x is -2 */
2 * square(x) - 3 * x + 4
2 * 4 - 3 * x + 4 /* step 1 */
8 - 3 * x + 4 /* step 2 */
8 - (-6) + 4 /* step 3 */
14 + 4 /* step 4 */
18 /* step 5 */
If you have the parabola program in your text editor, then you can change the code, run the C compiler again and run the changed program. You might change the program to perform another computation, like a different parabola, or a cubic. C language has no exponent operator, but simple multiplication can work:
Codeint
cube(int base)
{
return base * base * base;
}
The function printf does two important tasks; it prints a string of characters to the screen, and it can convert numbers to strings. The escape sequence \n starts a new line. These escape sequences begin each with a backslash and work in any C string.
printf is special because it also takes conversion specifications, which begin each with a percent sign. The conversion %d takes an extra parameter of type int to convert an integer to a string.
Codeint
main()
{
printf("2 + 2 is %d, 3 * 5 is %d\n", 2 + 2, 3 * 5);
return 0;
}
Amileia Kazeirassaida, please do tell the thread if you have obtained a text editor and C compiler. Maybe someone has the same text editor and C compiler as you, and it can help you. (If I find a computer with Microsoft Windows, then I would look at messiaen's Dev-cpp link, because it has MinGW with a text editor.)
|
|
|
|
Our RAM Map now provides the quoted information, but without values for these addresses.
Originally posted by RAM MapAddress (Length) Type Description
$7E:0072 (1 byte) Misc. Mario's image while in the air.
$7E:0F30 (1 byte) Misc. Timer Frame Counter
$7E:0F31 (3 bytes) Misc. Timer
$7E:0F34 (3 bytes) Misc. Mario Score
$7E:0F37 (3 bytes) Misc. Luigi Score
I wanted to check whether Mario is in the air, or on the ground. I found a hint (at ROM Map $00:F878) to use $7E:0072 for this check. I then wrote a custom routine for Level $103 (Yoshi's Island 3), using my local variant of Ersanio's LevelASM, to check if $72 is nonzero, and change the timer.
Thus I learned that $7E:0072 is nonzero while Mario is in the air, but is zero while Mario is on the ground. (Should I try $7E:0077 instead?) I do not know the meanings of the different nonzero values.
I first intended to set the timer to 300 if Mario is in the air, or to 600 if Mario is on the ground. I would set the Mario Score, but I already had a hack to set the Mario Score to the level number. When I tried to set the timer, I met trouble. After several tries, I found the format of the timer.
The format of the timer is very strange. The timer consists of three decimal digits, and each byte seems to contribute one digit. The three bytes come in big-endian order, instead of the usual little-endian order. Am I correct? Other hackers must already know the format of the timer.
The Mario Score seems to be an ordinary 24-bit little-endian integer, though I have only checked values in the range of $000015 through $0001ff. (Donut Plains 1 has score 210, and the goal of Yoshi's Island 4 has score 5110. The game draws an extra 0 after the score.)
If I set the Timer Frame Counter to $00, then the game will immediately decrement the timer, unless the timer has stopped. So if I store $0100 to 7E:0F30 and store $0000 to 7E:0F32, then the timer will read 99 but stop at 100 (and the 100 alarm will sound many times). I guess that the game decrements this counter during each frame, but I still do not know the number of frames for one game second.
I suggest these additions to the descriptions in the RAM Map.
Address (Length) Type Description
$7E:0072 (1 byte) Misc. Mario's image while in the air. This value is nonzero when Mario is in the air, but is zero when Mario is on the ground.
$7E:0F30 (1 byte) Misc. Timer Frame Counter. After this reaches $00, then the game decrements the timer.
$7E:0F31 (1 byte) Misc. Timer, hundreds' digit ($00 through $09)
$7E:0F32 (1 byte) Misc. Timer, tens' digit ($00 through $09)
$7E:0F33 (1 byte) Misc. Timer, ones' digit ($00 through $09)
$7E:0F34 (3 bytes) Misc. Mario Score. 1 here = 10 points, because the game draws an extra 0 after the score.
$7E:0F37 (3 bytes) Misc. Luigi Score
|
|
|
|
Originally posted by kyurelI downloaded snes9x 1.4
Download the latest version: snes9x 1.5.1
|
|
|
|
|
|
|
|
|
|
 |
|
 |
The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.
Copyright © 2005 - 2013 - SMW Central Legal Information - Link To UsTotal queries: 27
|
|
|
|