add first batch of commands to shell

This commit is contained in:
optixx
2009-09-22 20:25:50 +02:00
parent 105575bc37
commit ec68a9a1a1
8 changed files with 122 additions and 73 deletions

View File

@@ -29,8 +29,11 @@
#include "info.h"
#include "irq.h"
#include "usbdrv.h"
#include "rle.h"
#include "loader.h"
extern uint32_t req_bank_size;
extern const char _rom[] PROGMEM;
void usb_connect()
{
@@ -81,3 +84,54 @@ void set_rom_mode()
info_P(PSTR("Set SNES hirom \n"));
}
}
void boot_startup_rom(uint16_t init_delay)
{
info_P(PSTR("Fetch loader rom\n"));
info_P(PSTR("Activate AVR bus\n"));
avr_bus_active();
info_P(PSTR("IRQ off\n"));
snes_irq_lo();
snes_irq_off();
snes_lorom();
rle_decode(&_rom, ROM_BUFFER_SIZE, 0x000000);
info_P(PSTR("\n"));
#if DO_CRC_CHECK_LOADER
dump_memory(0x010000 - 0x100, 0x010000);
uint16_t crc;
crc = crc_check_bulk_memory((uint32_t)0x000000,0x010000, 0x010000);
info(PSTR("crc=%x\n"),crc);
#endif
snes_irq_lo();
snes_irq_off();
snes_hirom();
snes_wr_disable();
snes_bus_active();
info_P(PSTR("Activate SNES bus\n"));
send_reset();
_delay_ms(init_delay);
}
void banner(){
uint8_t i;
for (i=0;i<40;i++)
info_P(PSTR("\n"));
info_P(PSTR(" ________ .__ __ ________ ____ ________\n"));
info_P(PSTR(" \\_____ \\ __ __|__| ____ | | __\\______ \\ _______ _/_ |/ _____/\n"));
info_P(PSTR(" / / \\ \\| | \\ |/ ___\\| |/ / | | \\_/ __ \\ \\/ /| / __ \\ \n"));
info_P(PSTR(" / \\_/. \\ | / \\ \\___| < | ` \\ ___/\\ / | \\ |__\\ \\ \n"));
info_P(PSTR(" \\_____\\ \\_/____/|__|\\___ >__|_ \\/_______ /\\___ >\\_/ |___|\\_____ / \n"));
info_P(PSTR(" \\__> \\/ \\/ \\/ \\/ \\/ \n"));
info_P(PSTR("\n"));
info_P(PSTR(" www.optixx.org\n"));
info_P(PSTR("\n"));
info_P(PSTR("System Hw: %s Sw: %s\n"),HW_VERSION,SW_VERSION);
}