a891307efc
- Remove extraneous semi-colons - Remove spaces after opening paren on functions - Remove trailing spaces on lines - Add newlines as last byte of file where applicable
19 lines
620 B
Lua
19 lines
620 B
Lua
-----------------------
|
|
-- Name: Log Parallax
|
|
-- Author: spiiin
|
|
-----------------------
|
|
-- Draws a red line over each scanline that CPU writes to $2005 occurred
|
|
-----------------------
|
|
|
|
PPUSCROLL = 0x2005
|
|
colorCode = 0x4000FF00
|
|
|
|
function onScroll(address, value)
|
|
local state = emu.getState()
|
|
emu.log("Scrolling change. Scanline: "..state.ppu.scanline.." Value:"..value)
|
|
local color = colorCode + state.ppu.scanline
|
|
emu.drawLine(0, state.ppu.scanline, 256, state.ppu.scanline, color, 1)
|
|
end
|
|
|
|
emu.addMemoryCallback(onScroll, emu.memCallbackType.cpuWrite, PPUSCROLL)
|
|
emu.displayMessage("Script", "Log Parallax")
|