diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-03-27 15:09:16 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-03-27 15:09:16 +0300 |
commit | cf225f9b3f338cc8af34bac93b7aff0e2b958dc1 (patch) | |
tree | 422cbdd3f5b4561010f47d3af6bf40f098ad8139 | |
parent | 94c3dd4c32b5d88479523210cfcd0639665c7153 (diff) |
Refactoring
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Mapper/WarfaceMapper.v | 18 | ||||
m--------- | tools_sources/nesasm | 0 |
4 files changed, 17 insertions, 10 deletions
diff --git a/.gitmodules b/.gitmodules index f6f8dd0..68a0e3c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "tools_sources/NesTiler"] path = tools_sources/NesTiler url = https://github.com/ClusterM/NesTiler.git +[submodule "tools_sources/nesasm"] + path = tools_sources/nesasm + url = https://github.com/ClusterM/nesasm.git @@ -399,7 +399,11 @@ $(SYMBOLS_PATTERN_BIN) $(SYMBOLS_PALETTE_BIN): $(SYMBOLS_IMAGE) $(TILER) -i0 $(SYMBOLS_IMAGE) --enable-palettes 0 --out-pattern-table0 $(SYMBOLS_PATTERN_BIN) --out-palette0 $(SYMBOLS_PALETTE_BIN) --bgcolor #000000 $(MUSIC_ASM): $(MUSIC) - printf "NSF_LOAD_ADDR .equ `hexdump $(MUSIC) --skip 8 --length 2 --format '"$$%X"'`\nNSF_INIT_ADDR .equ `hexdump $(MUSIC) --skip 10 --length 2 --format '"$$%X"'`\nNSF_PLAY_ADDR .equ `hexdump $(MUSIC) --skip 12 --length 2 --format '"$$%X"'`" > music.asm + printf \ + "NSF_LOAD_ADDR .equ `hexdump $(MUSIC) --skip 8 --length 2 \ + --format '"$$%X"'`\nNSF_INIT_ADDR .equ `hexdump $(MUSIC) --skip 10 --length 2 \ + --format '"$$%X"'`\nNSF_PLAY_ADDR .equ `hexdump $(MUSIC) --skip 12 --length 2 \ + --format '"$$%X"'`" > music.asm $(MUSIC_BIN): dd if=$(MUSIC) of=music.bin bs=1 skip=128 diff --git a/Mapper/WarfaceMapper.v b/Mapper/WarfaceMapper.v index 7a3b497..0b434cf 100644 --- a/Mapper/WarfaceMapper.v +++ b/Mapper/WarfaceMapper.v @@ -67,19 +67,19 @@ begin if (timer != 0)
begin
timer = timer - 1'b1;
- if (timer == 0) timer_elapsed = 1;
+ if (timer == 0) timer_elapsed = 1;
end
if (romsel && !cpu_rw && cpu_a13 && cpu_a14) // write to $6000-$7FFF
begin
if (!cpu_a0)
- begin // even
- prg_bank[2:0] = cpu_data[2:0];
- if (cpu_data[7]) timer = 4095;
- timer_elapsed = 0;
- end else begin // odd
- chr_auto_switch = cpu_data[7];
- chr_bank[4:0] = cpu_data[4:0];
- end
+ begin // even
+ prg_bank[2:0] = cpu_data[2:0];
+ if (cpu_data[7]) timer = 4095;
+ timer_elapsed = 0;
+ end else begin // odd
+ chr_auto_switch = cpu_data[7];
+ chr_bank[4:0] = cpu_data[4:0];
+ end
end
end
diff --git a/tools_sources/nesasm b/tools_sources/nesasm new file mode 160000 +Subproject 60f30143daa40677d6ab5560a44672f31b8ec42 |