31
Mapping Tips/Guides / Re: SNES mapping - backdrop color solved!
« on: October 27, 2012, 12:54:07 am »
Looks like you didn't try to open Graphics Debugger. And what's "map viewing"?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Nice! It's a shame that SNES emulators still haven't quite caught up to the functionality of even VBA.Did I mention BizHawk is BEING DEVELOPED right now? Probably I forgot to say:
implemented new lua functions vdp.readpalette([line][,count]), vdp.writepaletteline([line,]palettedata), palette.new(), palette.getcolor(palette,index), palette.setcolor(palette,index,color), palette.rawdata(palette), and memory.writebyterange(address,[length,]data)
implemented vdp.writecell lua function, takes address and a vdp cell or table of vdp cells, returns number successfully written, changed return format of vdp.readcell, now returns a lua_integer number of successfully read cells and a table of userdata vdp cells, instead of a table of tables of pixel values, with index 0 as the number of successfully read cells.
p,t=vdp.readpalette(1,1)
c=pal.getcolor(t[1],1)
c.R=255
c.G=0
c.B=255
c.A=255
pal.setcolor(t[1],1,c)
vdp.writepalette(1,t[1])
-- feos, 2012, for Gens-rr
-- Sonic position hacking for mapping levels
-- May be recorded to emulator movie
emu.registerbefore(function()
keys = input.get()
buttons = joypad.get()
-- Uncomment that if you use Sonic 1
--xAddress, yAddress = 0xFFD008, 0xFFD00C
-- Uncomment that if you use Sonic 2
--xAddress, yAddress = 0xFFB008, 0xFFB00C
-- Uncomment that if you use Sonic 3 & Knuckles
--xAddress, yAddress = 0xFFB010, 0xFFB014
memory.writebyte(0xFFFE25, 50)
x = memory.readword(xAddress)
y = memory.readword(yAddress)
if buttons.X then memory.writeword(xAddress, x-3) end -- Right
if buttons.Z then memory.writeword(xAddress, x+3) end -- Left
if buttons.mode then memory.writeword(yAddress, y-3) end -- Up
if buttons.Y then memory.writeword(yAddress, y+3) end -- Down
-- Color zero layer to pink
p, t=vdp.readpalette(3,1)
c=pal.getcolor(t[1],1)
c.R=255
c.G=0
c.B=255
c.A=255
pal.setcolor(t[1],1,c)
vdp.writepalette(3,t[1])
end)