Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

403 lines (353 sloc) 24.305 kB
ines:
mapper = 0,
mirroring = 1
let K = 1024
bank ram : ram[2 * K]
bank chr : chr[4 * K]
bank prg : prg[16 * K]
in ram, 0x00:
var t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15: byte
var camera_x_lo : byte
var camera_x_hi : byte
var world_ptr_lo, world_ptr_hi : byte
enum:
REDRAW_SPRITES = 0x1,
REDRAW_SCROLL_TILES = 0x2
var redraw_request : byte
enum:
DIRECTION_RIGHT,
DIRECTION_LEFT
let START_DIRECTION = DIRECTION_RIGHT
var camera_direction : byte
var camera_tile_buffer_lo : byte
var camera_tile_buffer_hi : byte
var camera_attribute_buffer_lo : byte
var camera_attribute_buffer_hi : byte
let MAP_WIDTH = 3
var unpress : byte
var controls : byte
in ram, 0x200:
var sprite_buffer : byte[256]
in ram, 0x300:
package scroll
// 8x8 tiles stored in this order:
// AB
// CD
var tile_buffer_left : byte[60]
var tile_buffer_right : byte[60]
// 32x32 attribute tiles.
var attribute_buffer_left : byte[8]
var attribute_buffer_right : byte[8]
end
in prg, 0xC000:
include '../../common/hardware.nel'
include '../../common/tilemap.nel'
def load_palette: begin
a: get #>ppu.PALETTE_BASE, put @ppu.address, get #<ppu.PALETTE_BASE, put @ppu.address
x: get #0
repeat
a: get @palette[x], put @ppu.data
x: inc, cmp #(ppu.PALETTE_SIZE * ppu.PALETTE_TOTAL)
until zero
return
end
// Reads controller and stores the result in controls
// Derived from code posted by blargg on nesdevwiki
def check_controls: begin
// Strobe controller
a: get #1, put @joy.out, get #0, put @joy.out
// Read all 8 buttons
x: get #8
repeat
// Read next button state and mask off low 2 bits.
// Compare with $01, which will set carry flag if
// either or both bits are set.
a: get @joy.in1, and #0x3, cmp #1
// Now, rotate the carry flag into the top of A,
// land shift all the other buttons to the right
@controls: ror
x: dec
until zero
// Remove unpress flag for controls no longer being held.
a: get @unpress, and @controls, put @unpress
// Remove controls that have the unpress flag set.
// (Keep controls that don't have the unpress flag set)
a: get @unpress, xor #0xFF, and @controls, put @controls
return
end
def print_text: begin
let START_X : byte = 10
let START_Y : byte = 13
let TILE_ADDRESS : word = ppu.NAMETABLE_BASE + (START_Y * 32 + START_X)
// Read PPU status to reset its state.
a: get @ppu.status
// Now setup the PPU for copying tiles.
a: get #>TILE_ADDRESS, put @ppu.address, get #<TILE_ADDRESS, put @ppu.address
x: get #0
a: get @message[x]
while not zero do
x: inc
a: put @ppu.data
a: get @message[x]
end
return
end
def buffer_column: begin
a: get @camera_x_hi, cmp #MAP_WIDTH - 1
if < then
a: get #<tile_top_left, put @t0, get #>tile_top_left, put @t1
a: get @world_ptr_lo, put @t2
a: get @camera_x_hi, add #1, add @world_ptr_hi, put @t3
a: get @camera_x_lo, shr, shr, shr, shr, put @t4
a: get #<scroll.tile_buffer_right, put @t5
a: get #>scroll.tile_buffer_right, put @t6
call tilemap.update_tile_buffer
a: get #<tile_attribute, put @t0, get #>tile_attribute, put @t1
a: get @world_ptr_lo, put @t2
a: get @camera_x_hi, add #1, add @world_ptr_hi, put @t3
a: get @camera_x_lo, shr, shr, shr, shr, and #0xE, put @t4
a: get #<scroll.attribute_buffer_right, put @t5
a: get #>scroll.attribute_buffer_right, put @t6
call tilemap.update_attribute_buffer
end
a: get @camera_x_hi, cmp #0
if >= then
a: get #<tile_top_left, put @t0, get #>tile_top_left, put @t1
a: get @world_ptr_lo, put @t2
a: get @camera_x_hi, add @world_ptr_hi, put @t3
a: get @camera_x_lo, shr, shr, shr, shr, put @t4
a: get #<scroll.tile_buffer_left, put @t5
a: get #>scroll.tile_buffer_left, put @t6
call tilemap.update_tile_buffer
a: get #<tile_attribute, put @t0, get #>tile_attribute, put @t1
a: get @world_ptr_lo, put @t2
a: get @camera_x_hi, add @world_ptr_hi, put @t3
a: get @camera_x_lo, shr, shr, shr, shr, and #0xE, put @t4
a: get #<scroll.attribute_buffer_left, put @t5
a: get #>scroll.attribute_buffer_left, put @t6
call tilemap.update_attribute_buffer
end
return
end
def main: begin
// Set necessary processor flags.
p: unset decimal, set interrupt
// Prepare stack.
x: get #0xFF, put s
// Turn off rendering.
x: get #0, put @ppu.ctrl, put @ppu.mask
// Wait for the PPU to be ready to use, which takes 2 vertical blanks.
repeat
repeat
a: bit @ppu.status
until negative
x: inc, cmp #2
until =
x: get #0
repeat
a: get #0x00, put @0x000[x], put @0x400[x]
a: get #0xFE, put @0x200[x]
a: get #2, put @0x300[x]
x: inc
until zero
call load_palette
// Setup the world map pointer.
a: get #<world_map, put @world_ptr_lo, get #>world_map, put @world_ptr_hi
// Init the tileset pointer.
a: get #<tile_top_left, put @t0, get #>tile_top_left, put @t1
// Setup the map pointer for the first screen
a: get @world_ptr_lo, put @t2, get @world_ptr_hi, put @t3
// Nametable 0.
a: get #0, put @t4
call tilemap.load
// We're finally ready to show the screen!
a: get #ppu.CTRL_NMI, put @ppu.ctrl
a: get #(ppu.MASK_LEFTMOST_BG | ppu.MASK_RENDER_BG), put @ppu.mask
a: get #apu.FLAG_SQUARE1, put @apu.flag
a: get #START_DIRECTION, put @camera_direction
repeat
call check_controls
a: get @controls, and #joy.A
if not zero then
a: get @camera_direction, xor #1, put @camera_direction
a: get @unpress, or #joy.A, put @unpress
end
a: get @camera_direction
if zero then
a: get @camera_x_hi, cmp #MAP_WIDTH - 1
if < then
@camera_x_lo: inc
if zero then
@camera_x_hi: inc
end
end
else
a: get @camera_x_lo
if zero then
a: get @camera_x_hi
if not zero then
@camera_x_hi: dec
else
@camera_x_lo: inc // Cancel out decrement.
end
end
@camera_x_lo: dec
end
a: get @camera_direction
if zero then
a: get #<scroll.tile_buffer_right, put @camera_tile_buffer_lo
a: get #>scroll.tile_buffer_right, put @camera_tile_buffer_hi
a: get #<scroll.attribute_buffer_right, put @camera_attribute_buffer_lo
a: get #>scroll.attribute_buffer_right, put @camera_attribute_buffer_hi
else
a: get #<scroll.tile_buffer_left, put @camera_tile_buffer_lo
a: get #>scroll.tile_buffer_left, put @camera_tile_buffer_hi
a: get #<scroll.attribute_buffer_left, put @camera_attribute_buffer_lo
a: get #>scroll.attribute_buffer_left, put @camera_attribute_buffer_hi
end
call buffer_column
a: get @camera_direction
if zero then
a: get @camera_x_hi, cmp #MAP_WIDTH - 1
if < then
a: get @redraw_request, or #REDRAW_SCROLL_TILES, put @redraw_request
end
else
a: get @camera_x_hi, cmp #0
if >= then
a: get @redraw_request, or #REDRAW_SCROLL_TILES, put @redraw_request
end
end
a: get @redraw_request, or #REDRAW_SPRITES, put @redraw_request
repeat
a: get @redraw_request
until zero
end
end
def draw: begin
a: push, get x, push, get y, push
a: get @ppu.status
a: get @redraw_request, and #REDRAW_SPRITES
if not zero then
a: get #>sprite_buffer, put @ppu.oam.address, get #<sprite_buffer, put @ppu.oam.dma
// Done redrawing tiles
a: get @redraw_request, xor #REDRAW_SPRITES, put @redraw_request
end
a: get @redraw_request, and #REDRAW_SCROLL_TILES
if not zero then
a: get @t0, push, get @camera_x_lo, put @t0
a: get @t1, push, get @camera_x_hi, put @t1
a: get @t2, push, get @camera_tile_buffer_lo, put @t2
a: get @t3, push, get @camera_tile_buffer_hi, put @t3
a: get @t4, push, get @camera_direction, put @t4
call tilemap.draw_tile_buffer
a: get @camera_x_lo, put @t0
a: get @camera_x_hi, put @t1
a: get @camera_attribute_buffer_lo, put @t2
a: get @camera_attribute_buffer_hi, put @t3
a: get @camera_direction, put @t4
call tilemap.draw_attribute_buffer
a: pull, put @t4
a: pull, put @t3
a: pull, put @t2
a: pull, put @t1
a: pull, put @t0
// Done redrawing tiles
a: get @redraw_request, xor #REDRAW_SCROLL_TILES, put @redraw_request
end
a: get @camera_x_hi, and #1, or #ppu.CTRL_NMI, put @ppu.ctrl
a: get @camera_x_lo, put @ppu.scroll, get #0, put @ppu.scroll
a: pull, put y, pull, put x, pull
resume
end
def scan: begin
a: push, get x, push, get y, push
a: pull, put y, pull, put x, pull
resume
end
in prg, 0xE000:
def message:
// A null-terminated message.
byte: "HELLO WORLD", 0
def palette:
// Tiles
byte: 0x0F, 0x0C, 0x00, 0x10
byte: 0x0F, 0x11, 0x11, 0x30
byte: 0x0F, 0x05, 0x15, 0x25
byte: 0x0F, 0x09, 0x19, 0x29
// Sprites
byte: 0x0F, 0x00, 0x10, 0x30
byte: 0x0F, 0x00, 0x10, 0x30
byte: 0x0F, 0x00, 0x10, 0x30
byte: 0x0F, 0x00, 0x10, 0x30
in prg, 0xE100:
def tile_top_left:
byte: 0x01, 0x04, 0x24, 0x01, 0x06, 0x11, 0x03, 0x03, 0x08, 0x09, 0x0B, 0x28, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
in prg, 0xE200:
def tile_top_right:
byte: 0x01, 0x05, 0x25, 0x01, 0x07, 0x03, 0x03, 0x12, 0x08, 0x0A, 0x0C, 0x28, 0x09, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
in prg, 0xE300:
def tile_bottom_left:
byte: 0x01, 0x14, 0x01, 0x01, 0x16, 0x21, 0x03, 0x03, 0x18, 0x09, 0x0B, 0x28, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
in prg, 0xE400:
def tile_bottom_right:
byte: 0x01, 0x15, 0x01, 0x01, 0x17, 0x03, 0x03, 0x22, 0x18, 0x0A, 0x0C, 0x28, 0x09, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
in prg, 0xE500:
def tile_attribute:
byte: 0x01, 0x03, 0x03, 0x03, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
in prg, 0xE600:
def world_map:
byte:
0x00, 0x00, 0x00, 0x05, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
0x00, 0x00, 0x05, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00,
0x00, 0x05, 0x06, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x06, 0x04, 0x07, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
0x00, 0x00, 0x04, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x04, 0x04, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x09, 0x0A, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x09, 0x0A, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04,
0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03
in prg, 0xE700:
byte:
0x06, 0x06, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x06, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x06, 0x07, 0x00, 0x0B,
0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x06, 0x07, 0x00, 0x00, 0x0B,
0x04, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04,
0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
0x0D, 0x06, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x06,
0x08, 0x05, 0x06, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0C,
0x0B, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x09, 0x0A, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03
in prg, 0xE800:
byte:
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x07,
0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x05, 0x06, 0x06, 0x06, 0x06,
0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x06, 0x06,
0x04, 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06,
0x00, 0x00, 0x00, 0x05, 0x08, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0B, 0x09, 0x0A, 0x04, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0C, 0x0C, 0x09, 0x0A, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00,
0x04, 0x04, 0x04, 0x00, 0x0B, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0B, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03
in prg, 0xFFFA:
word: draw, main, scan
in chr, 0x0000:
embed '../../common/scroller_tiles.chr'
Jump to Line
Something went wrong with that request. Please try again.