indent cleanup

This commit is contained in:
optixx
2010-07-19 16:35:47 +02:00
parent 0f0c6eb409
commit c09d1a1918
38 changed files with 5177 additions and 3112 deletions

View File

@@ -19,12 +19,12 @@
*/
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdlib.h>
#include "config.h"
#include "requests.h"
#include "requests.h"
#include "sram.h"
#include "info.h"
#include "irq.h"
@@ -64,83 +64,90 @@ void boot_startup_rom(uint16_t init_delay)
uint8_t i;
uint32_t addr = 0x000000;
info_P(PSTR("Fetch loader rom\n"));
system_set_bus_avr();
//snes_irq_lo();
//system_snes_irq_off();
// snes_irq_lo();
// system_snes_irq_off();
system_set_rom_lorom();
//info_P(PSTR("Activate AVR bus\n"));
//avr_bus_active();
//info_P(PSTR("IRQ off\n"));
//snes_irq_lo();
//snes_irq_off();
//snes_lorom();
for (i=0; i<ROM_BUFFER_CNT; i++){
// info_P(PSTR("Activate AVR bus\n"));
// avr_bus_active();
// info_P(PSTR("IRQ off\n"));
// snes_irq_lo();
// snes_irq_off();
// snes_lorom();
for (i = 0; i < ROM_BUFFER_CNT; i++) {
addr += rle_decode(_rom[i], _rom_size[i], addr);
}
info_P(PSTR("\n"));
#if DO_CRC_CHECK_LOADER
#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);
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_irq_lo();
// snes_irq_off();
// snes_hirom();
// snes_wr_disable();
//system_set_bus_snes();
//system_set_rom_hirom();
//system_set_wr_disable();
//system_snes_irq_off();
// system_set_bus_snes();
// system_set_rom_hirom();
// system_set_wr_disable();
// system_snes_irq_off();
snes_irq_lo();
system_snes_irq_off();
system_set_rom_hirom();
system_set_wr_disable();
system_set_bus_snes();
system_send_snes_reset();
info_P(PSTR("Move Loader to wram"));
for (i=0;i<30;i++){
for (i = 0; i < 30; i++) {
_delay_ms(20);
info_P(PSTR("."));
}
info_P(PSTR("\n"));
}
void banner(){
void banner()
{
uint8_t i;
for (i=0;i<40;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
(" \\_____ \\ __ __|__| ____ | | __\\______ \\ _______ _/_ |/ _____/\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);
info_P(PSTR("System Hw: %s Sw: %s\n"), HW_VERSION, SW_VERSION);
}
void transaction_status(){
info_P(PSTR("\nAddr 0x%06lx\n"),usb_trans.req_addr);
info_P(PSTR("Bank 0x%02x\n"),usb_trans.req_bank);
info_P(PSTR("Banksize 0x%06lx\n"),usb_trans.req_bank_size);
info_P(PSTR("Bankcount 0x%02x\n"),usb_trans.req_bank_cnt);
info_P(PSTR("Status 0x%02x\n"),usb_trans.req_state);
info_P(PSTR("Percent %02i\n"),usb_trans.req_percent);
info_P(PSTR("TX buffer %02i\n"),usb_trans.tx_remaining);
info_P(PSTR("RX buffer %02i\n"),usb_trans.rx_remaining);
info_P(PSTR("Syncerr %02i\n"),usb_trans.sync_errors);
void transaction_status()
{
info_P(PSTR("\nAddr 0x%06lx\n"), usb_trans.req_addr);
info_P(PSTR("Bank 0x%02x\n"), usb_trans.req_bank);
info_P(PSTR("Banksize 0x%06lx\n"), usb_trans.req_bank_size);
info_P(PSTR("Bankcount 0x%02x\n"), usb_trans.req_bank_cnt);
info_P(PSTR("Status 0x%02x\n"), usb_trans.req_state);
info_P(PSTR("Percent %02i\n"), usb_trans.req_percent);
info_P(PSTR("TX buffer %02i\n"), usb_trans.tx_remaining);
info_P(PSTR("RX buffer %02i\n"), usb_trans.rx_remaining);
info_P(PSTR("Syncerr %02i\n"), usb_trans.sync_errors);
}