If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!
Lua:Toobin' (NES)
Jump to navigation
Jump to search
This page contains Lua scripts for the game Toobin' (NES).
To do: Make this a patch and do a writeup in the main page. |
This script enables Sound Test to be used in the title screen.
if rom.readbyte(128066)==198 and rom.readbyte(128067)==96 then rom.writebyte(128066,234) rom.writebyte(128067,234) end emu.registerbefore(function() if memory.readbyte(768)==3 and memory.readbyte(798)==40 then memory.writebyte(798,39) memory.writebyte(800,41) memory.writebyte(801,34) memory.writebyte(802,24) memory.writebyte(803,0) memory.writebyte(804,40) memory.writebyte(805,25) memory.writebyte(806,39) memory.writebyte(807,40) memory.writebyte(808,255) memory.writebyte(809,3) memory.writebyte(810,35) memory.writebyte(811,36) memory.writebyte(812,38) memory.writebyte(813,29) memory.writebyte(815,28) memory.writebyte(816,40) memory.writebyte(817,0) memory.writebyte(818,35) memory.writebyte(819,38) memory.writebyte(820,0) memory.writebyte(821,32) memory.writebyte(822,25) memory.writebyte(823,26) memory.writebyte(824,40) memory.writebyte(825,0) memory.writebyte(826,23) memory.writebyte(827,28) memory.writebyte(828,21) memory.writebyte(829,34) memory.writebyte(830,27) memory.writebyte(831,25) memory.writebyte(832,39) memory.writebyte(833,0) memory.writebyte(834,39) memory.writebyte(835,35) memory.writebyte(836,41) memory.writebyte(837,34) memory.writebyte(838,24) memory.writebyte(839,255) memory.writebyte(840,3) memory.writebyte(841,35) memory.writebyte(842,68) memory.writebyte(843,21) memory.writebyte(844,0) memory.writebyte(845,40) memory.writebyte(846,35) memory.writebyte(848,36) memory.writebyte(849,32) memory.writebyte(850,21) memory.writebyte(851,45) memory.writebyte(852,15) memory.writebyte(853,0) memory.writebyte(854,22) memory.writebyte(855,0) memory.writebyte(856,40) memory.writebyte(857,35) memory.writebyte(858,0) memory.writebyte(859,39) memory.writebyte(860,40) memory.writebyte(861,35) memory.writebyte(862,36) end if memory.readbyte(728)==1 then gui.text(121,193,memory.readbyte(1344)) if AND(memory.readbyte(56),192)==128 and AND(memory.readbyte(56),192)~=AND(memory.readbyte(58),192)then memory.writebyte(1344,(memory.readbyte(1344)+1)%68)elseif AND(memory.readbyte(56),192)==64 and AND(memory.readbyte(56),192)~=AND(memory.readbyte(58),192)then memory.writebyte(1344,(memory.readbyte(1344)-1)%68)end if AND(memory.readbyte(56),3)==1 and AND(memory.readbyte(56),3)~=AND(memory.readbyte(58),3)then if memory.readbyte(1361)~=0 then memory.writebyte(1361,0)end if memory.readbyte(6)==9 and({[4]=true,[8]=true,[10]=true,[11]=true,[12]=true,[13]=true,[14]=true,[15]=true})[memory.readbyte(1344)]then memory.writebyte(6,0)elseif memory.readbyte(6)==0 and({[5]=true,[6]=true,[7]=true,[9]=true,[16]=true,[17]=true,[18]=true,[19]=true})[memory.readbyte(1344)]then memory.writebyte(6,9)end memory.writebyte(1360,15) elseif AND(memory.readbyte(56),3)==2 and AND(memory.readbyte(56),3)~=AND(memory.readbyte(58),3)then if memory.readbyte(1345)~=0 then memory.writebyte(1345,0)end if memory.readbyte(1361)~=1 then memory.writebyte(1361,1)end memory.writebyte(1360,0) end end end)