Skip to content

Commit

Permalink
working VERA flasher!
Browse files Browse the repository at this point in the history
  • Loading branch information
FlightControl-User committed Oct 18, 2023
1 parent 5854a79 commit b540724
Show file tree
Hide file tree
Showing 5 changed files with 13,285 additions and 20,220 deletions.
2 changes: 2 additions & 0 deletions src/cx16-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ void system_reset() {
bank_set_bram(0);
bank_set_brom(0);

*((char*)0x9F25) = 0x80;

#ifndef __INTELLISENSE__
asm {
jmp ($FFFC)
Expand Down
4 changes: 4 additions & 0 deletions src/cx16-w25q16.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ unsigned long w25q16_verify(unsigned char verify) {

gotoxy(x, y);

wait_moment(16);
spi_wait_non_busy();
spi_read_flash(0UL); // Start the w26q16 flash memory read cycle from 0x0 using the spi interface

while (w25q16_address < vera_file_size) {
Expand Down Expand Up @@ -330,6 +332,8 @@ unsigned char w25q16_erase() {
unsigned char vera_total_64k_blocks = BYTE2(vera_file_size)+1;
unsigned char vera_current_64k_block = 0;

spi_select();

while(vera_current_64k_block < vera_total_64k_blocks) {
#ifdef __VERA_FLASH
if(!spi_wait_non_busy()) {
Expand Down
Binary file modified target/src/CX16-UPDATE.PRG
Binary file not shown.
Loading

0 comments on commit b540724

Please sign in to comment.