aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Kingston <patrick@pkingston.xyz>2026-02-14 21:49:56 -0500
committerPatrick Kingston <patrick@pkingston.xyz>2026-02-14 21:49:56 -0500
commitaa76c61e2feac971ae22b43b14e14d1fa88638d5 (patch)
tree7621a58d7f09bce4f5c2d566c4206fbfd3c6fcf7
parent079c9b078b144ee21f62a5ca40299052c664edf0 (diff)
Create setting screen uninteractive
-rw-r--r--main.fab86
-rw-r--r--nEs.nesbin40976 -> 40976 bytes
-rw-r--r--nEslabels.mlb34
-rw-r--r--spritesheet.chrbin8192 -> 8192 bytes
4 files changed, 91 insertions, 29 deletions
diff --git a/main.fab b/main.fab
index 8b52021..dcf985c 100644
--- a/main.fab
+++ b/main.fab
@@ -3,7 +3,7 @@ vars /ecavars
U curr_gen = 0 // Swap these offsets back and forth per generation
U next_gen = 32
UU drawing_row_offset = 0 // Use this to track which row we're drawing
- U current_rule = 73
+ U current_rule = %01001001
fn init_eca_state()
// Scroll to attributes
@@ -117,10 +117,6 @@ nmi eca_nmi()
mode eca_main()
: nmi eca_nmi
: vars /ecavars
- nmi
- nmi
- nmi
- nmi
// Initialize the screen
init_eca_state()
// Wait 60 frames before beginning
@@ -130,21 +126,63 @@ mode eca_main()
while true
nmi
update_pads()
- if pads[0].held & BUTTON_START
+ if pads[0].released & BUTTON_START
goto mode settings()
: preserves /ecavars
calc_and_advance_gen()
-//charmap settingsscreen("E", 48)
+charmap settingsmap(".E!@#I$T%R^&*L()_i{}|ta:01", 47) //Back up to 47 to grab a blank space
+
+data /settingsscreen
+ // Initing settings to Initial Rule which is 73 %01001001
+ [] settingschars
+ ("................................"
+ "................................"
+ "................................"
+ "....E!I$.R^L(..................."
+ "....@#T%.&*)_..................."
+ "................................"
+ "................................"
+ "....111....110....101....100...."
+ ".....0......1......0......0....."
+ "................................"
+ "....011....010....001....000...."
+ ".....1......0......0......1....."
+ "................................"
+ "................................"
+ "................................"
+ "................................"
+ "....E!I$.i{t...................."
+ "....@#T%.}|:a..................."
+ "................................"
+ "................................"
+ "00000000000000000000000000000000"
+ "................................"
+ "................................"
+ "................................"
+ "................................"
+ "................................"
+ "................................"
+ "................................"
+ "................................"
+ "................................"settingsmap)
vars /settings_vars
U slow_counter = 0
+ U editing_rule = 1 // Start off editing the rule
+ U rule_pos = 0 // Start off on highest bit
+ U generation_pos = 0
+ U cursor_x = 0
+ U cursor_y = 0
+ U cursor_frame = 0
+ U loaded = 0
nmi settings_nmi()
// Turn on rendering sprites and bg
ppu_upload_oam_poll_pads(0)
- {PPUMASK}(PPUMASK_ON | PPUMASK_NO_CLIP)
+ if loaded
+ {PPUMASK}(PPUMASK_ON | PPUMASK_NO_CLIP)
ppu_reset_scroll(0, 0)
@@ -152,20 +190,36 @@ mode settings()
: nmi settings_nmi
: vars /ecavars
: vars /settings_vars
- nmi
- nmi
- nmi
- nmi
+
+ // Turn rendering off while we load the screen
+ {PPUMASK}(~PPUMASK_ON)
+
+ ppu_reset_addr($2000)
+ // Load the settings screen
+ CCC/settingsscreen settingsp = @settingschars
+ for UU i = 0; i < 960; i += 1
+ {PPUDATA}(settingsp{i})
+
+ for UU i = 0; i < 64; i += 1
+ {PPUDATA}(%00000000)
+
+ loaded = 1
+
+ {PPUMASK}(PPUMASK_ON)
+
+ // Set the init to the current generation and set the rule to the current rule
+ // TODO ^
+
while true
nmi
update_pads()
//update_cursor()
//upload_cursor()
- if pads[0].held & BUTTON_START
+ if pads[0].released & BUTTON_START
goto mode eca_main()
: preserves /ecavars
-charmap (".#-=n!@~E$%^S&*(C)_+A{}|12345678qwertyuiop<asd>")
+charmap titlemap(".#-=N!@~E$%^S&*(C)_+A{}|12345678qwertyuiop<asd>")
data /titlescreen
[] title
@@ -177,7 +231,7 @@ data /titlescreen
".........##############........."
".........##..........##........."
".........##..........##........."
- ".........##..n!E$S&..##........."
+ ".........##..N!E$S&..##........."
".........##..@~%^*(..##........."
".........##....C)....##........."
".........##...._+....##........."
@@ -199,7 +253,7 @@ data /titlescreen
"................................"
"................................"
"................................"
- "................................")
+ "................................"titlemap)
vars /titlescreen
UU wipeline = 0
diff --git a/nEs.nes b/nEs.nes
index 14d5359..c915bf2 100644
--- a/nEs.nes
+++ b/nEs.nes
Binary files differ
diff --git a/nEslabels.mlb b/nEslabels.mlb
index 6b3797a..dab4ef8 100644
--- a/nEslabels.mlb
+++ b/nEslabels.mlb
@@ -1,16 +1,17 @@
-NesPrgRom:000B21:calc_next_cell@0_0:
-NesPrgRom:000A15:calc_and_advance_gen@0_0:
-NesPrgRom:000A1E:calc_and_advance_gen@0_0_entry:
-NesPrgRom:000A9F:eca_nmi@0_1:
-NesPrgRom:000988:eca_main@0_0:
-NesPrgRom:000BE6:settings_nmi@0_1:
-NesPrgRom:000BC3:settings@0_0:
-NesPrgRom:000826:main_nmi@0_1:
-NesPrgRom:000829:main_nmi@0_1_entry:
+NesPrgRom:001015:calc_next_cell@0_0:
+NesPrgRom:000E88:calc_and_advance_gen@0_0:
+NesPrgRom:000E91:calc_and_advance_gen@0_0_entry:
+NesPrgRom:000F12:eca_nmi@0_1:
+NesPrgRom:000F94:eca_main@0_0:
+NesPrgRom:0010B7:settings_nmi@0_1:
+NesPrgRom:00076D:settings@0_0:
+NesPrgRom:000CCE:main_nmi@0_1:
+NesPrgRom:000CD1:main_nmi@0_1_entry:
NesPrgRom:000279:main@0_0:
NesPrgRom:000238:ppu_upload_oam_poll_pads@0_1:
-NesPrgRom:000B8E:update_pads@0_0:
-NesPrgRom:00076D:ppu_upload_palette@0_0:
+NesPrgRom:001082:update_pads@0_0:
+NesPrgRom:000C15:ppu_upload_palette@0_0:
+NesPrgRom:000855-000C14:settingschars@0_0:
NesPrgRom:00038D-00076C:title@0_0:
NesPrgRom:007FFA-007FFF:runtime_vectors@0_0:
NesPrgRom:00011C-00012F:runtime_nmi@0_1:
@@ -32,13 +33,20 @@ NesPrgRom:0001E3-000228:runtime_mul8@0_2:
NesPrgRom:000100-00010F:runtime_shl4_table@0_0:
NesPrgRom:000110-000117:runtime_shl5_table@0_0:
NesPrgRom:000118-00011B:runtime_shl6_table@0_0:
-R:031F:buf@0__slow_counter@0:
+R:0326:buf@0:
R:000D:curr_gen@0:
R:0010:next_gen@0:
R:000E:drawing_row_offset@0:
R:000F:drawing_row_offset@1:
R:0011:current_rule@0:
-R:0014:wipeline@0:
+R:031F:slow_counter@0:
+R:0325:editing_rule@0:
+R:0320:rule_pos@0:
+R:0321:generation_pos@0:
+R:0322:cursor_x@0:
+R:0323:cursor_y@0:
+R:0324:cursor_frame@0:
+R:0014:loaded@0__wipeline@0:
R:0015:wipeline@1:
R:0200:oam@0:
R:0319:pads@0:
diff --git a/spritesheet.chr b/spritesheet.chr
index fe7a52c..f690654 100644
--- a/spritesheet.chr
+++ b/spritesheet.chr
Binary files differ