From ea6e8725413f259d8e62c0015bdee78d0b2342c9 Mon Sep 17 00:00:00 2001 From: ikari Date: Tue, 8 Feb 2011 01:01:53 +0100 Subject: [PATCH] firmware: whitespace cleanup (incomplete) --- src/cic.c | 2 +- src/fileops.c | 2 +- src/led.c | 2 +- src/main.c | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cic.c b/src/cic.c index 5a4e732..c6528ec 100644 --- a/src/cic.c +++ b/src/cic.c @@ -18,7 +18,7 @@ enum cicstates get_cic_state() { uint32_t count; uint32_t togglecount = 0; uint8_t state, state_old; - + state_old = BITBAND(SNES_CIC_STATUS_REG->FIOPIN, SNES_CIC_STATUS_BIT); /* this loop samples at ~10MHz */ for(count=0; count<1000; count++) { diff --git a/src/fileops.c b/src/fileops.c index e785d46..3dd6d10 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -32,7 +32,7 @@ /* WCHAR ff_convert(WCHAR w, UINT dir) { - return w; + return w; }*/ int newcard; diff --git a/src/led.c b/src/led.c index f2a73fd..103dc25 100644 --- a/src/led.c +++ b/src/led.c @@ -94,7 +94,7 @@ void led_pwm() { BITBAND(LPC_PINCON->PINSEL4, 0) = 1; BITBAND(LPC_PINCON->PINSEL4, 2) = 1; BITBAND(LPC_PINCON->PINSEL4, 4) = 1; - + BITBAND(LPC_PWM1->PCR, 9) = 1; BITBAND(LPC_PWM1->PCR, 10) = 1; BITBAND(LPC_PWM1->PCR, 11) = 1; diff --git a/src/main.c b/src/main.c index 44f58c1..18117af 100644 --- a/src/main.c +++ b/src/main.c @@ -26,6 +26,7 @@ #include "smc.h" #include "msu1.h" +#include "usb_hid.h" #define EMC0TOGGLE (3<<4) #define MR0R (1<<1) @@ -46,7 +47,7 @@ int main(void) { LPC_GPIO1->FIODIR = 0; LPC_GPIO0->FIODIR = BV(16); - /* connect UART3 on P0[25:26] + SSP0 on P0[15:18] SSP1 on P0[6:9] + MAT3.0 on P0[10] */ + /* connect UART3 on P0[25:26] + SSP0 on P0[15:18] + MAT3.0 on P0[10] */ LPC_PINCON->PINSEL1 = BV(18) | BV(19) | BV(20) | BV(21) /* UART3 */ | BV(3) | BV(5); /* SSP0 (FPGA) except SS */ LPC_PINCON->PINSEL0 = BV(31); /* SSP0 */ @@ -70,9 +71,9 @@ int main(void) { led_pwm(); sdn_init(); printf("\n\nsd2snes mk.2\n============\nfw ver.: " VER "\ncpu clock: %d Hz\n", CONFIG_CPU_FREQUENCY); +printf("PCONP=%lx\n", LPC_SC->PCONP); file_init(); cic_init(0); - /* setup timer (fpga clk) */ LPC_TIM3->CTCR=0; LPC_TIM3->EMR=EMC0TOGGLE; @@ -81,7 +82,7 @@ led_pwm(); LPC_TIM3->TCR=1; fpga_init(); fpga_rompgm(); - + sram_writebyte(0, SRAM_CMD_ADDR); while(1) { set_mcu_ovr(1); if(disk_state == DISK_CHANGED) { @@ -94,8 +95,6 @@ led_pwm(); set_mapper(0x7); set_mcu_ovr(0); snes_reset(0); - delay_ms(15); /* allow CIC to settle */ - while(get_cic_state() == CIC_FAIL) { rdyled(0); readled(0); @@ -207,6 +206,7 @@ led_pwm(); printf("test sram\n"); while(!sram_reliable()); printf("ok\n"); + //while(1) { // delay_ms(1000); // printf("Estimated SNES master clock: %ld Hz\n", get_snes_sysclk()); @@ -215,7 +215,7 @@ led_pwm(); //sram_hexdump(SRAM_MENU_ADDR, 0x400); while(!cmd) { cmd=menu_main_loop(); - // cmd = 1; +// cmd = 1; printf("cmd: %d\n", cmd); sleep_ms(50); uart_putc('-'); @@ -223,7 +223,7 @@ led_pwm(); case SNES_CMD_LOADROM: get_selected_name(file_lfn); set_mcu_ovr(1); - // strcpy((char*)file_lfn, "/msu1/msu1vid_ikari_01/msu1vid.sfc"); +// strcpy((char*)file_lfn, "/roms/b/BS Zelda no Densetsu Kodai no Sekiban Dai 1 Hanashi (J).smc"); printf("Selected name: %s\n", file_lfn); filesize = load_rom(file_lfn, SRAM_ROM_ADDR); if(romprops.ramsize_bytes) {