2002-08-13 08:55:58 +00:00
|
|
|
|
/***************************************************************************
|
|
|
|
|
* __________ __ ___.
|
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
|
* $Id$
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2002 by Bj<EFBFBD>rn Stenberg <bjorn@haxx.se>
|
|
|
|
|
*
|
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
|
*
|
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
|
* KIND, either express or implied.
|
|
|
|
|
*
|
|
|
|
|
****************************************************************************/
|
2002-08-13 17:16:09 +00:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include "debug.h"
|
2002-08-13 08:55:58 +00:00
|
|
|
|
|
2002-08-21 17:24:42 +00:00
|
|
|
|
#include "usb.h"
|
|
|
|
|
#include "button.h"
|
2002-08-23 13:01:36 +00:00
|
|
|
|
#include "menu.h"
|
2002-08-21 17:24:42 +00:00
|
|
|
|
|
2002-08-13 08:55:58 +00:00
|
|
|
|
void backlight_on(void)
|
|
|
|
|
{
|
|
|
|
|
/* we could do something better here! */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void backlight_time(int dummy)
|
|
|
|
|
{
|
|
|
|
|
(void)dummy;
|
|
|
|
|
}
|
2002-08-13 17:16:09 +00:00
|
|
|
|
|
|
|
|
|
int fat_startsector(void)
|
|
|
|
|
{
|
|
|
|
|
return 63;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int ata_write_sectors(unsigned long start,
|
|
|
|
|
unsigned char count,
|
|
|
|
|
void* buf)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (i=0; i<count; i++ ) {
|
|
|
|
|
FILE* f;
|
|
|
|
|
char name[32];
|
|
|
|
|
|
|
|
|
|
DEBUGF("Writing sector %X\n",start+i);
|
|
|
|
|
sprintf(name,"sector%lX.bin",start+i);
|
|
|
|
|
f=fopen(name,"w");
|
|
|
|
|
if (f) {
|
|
|
|
|
fwrite(buf,512,1,f);
|
|
|
|
|
fclose(f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int ata_read_sectors(unsigned long start,
|
|
|
|
|
unsigned char count,
|
|
|
|
|
void* buf)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (i=0; i<count; i++ ) {
|
|
|
|
|
FILE* f;
|
|
|
|
|
char name[32];
|
|
|
|
|
|
|
|
|
|
DEBUGF("Reading sector %X\n",start+i);
|
|
|
|
|
sprintf(name,"sector%lX.bin",start+i);
|
|
|
|
|
f=fopen(name,"r");
|
|
|
|
|
if (f) {
|
|
|
|
|
fread(buf,512,1,f);
|
|
|
|
|
fclose(f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
2002-08-15 12:42:37 +00:00
|
|
|
|
|
|
|
|
|
void ata_delayed_write(unsigned long sector, void* buf)
|
|
|
|
|
{
|
|
|
|
|
ata_write_sectors(sector,1,buf);
|
|
|
|
|
}
|
2002-08-16 14:41:47 +00:00
|
|
|
|
|
|
|
|
|
void ata_flush(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
2002-08-21 17:24:42 +00:00
|
|
|
|
|
2002-08-26 13:21:14 +00:00
|
|
|
|
void ata_spin(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ata_spindown(int s)
|
|
|
|
|
{
|
|
|
|
|
(void)s;
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-24 18:04:15 +00:00
|
|
|
|
bool simulate_usb(void)
|
2002-08-21 17:24:42 +00:00
|
|
|
|
{
|
|
|
|
|
usb_display_info();
|
2002-08-21 18:11:06 +00:00
|
|
|
|
while (button_get(true) & BUTTON_REL);
|
2002-09-24 18:04:15 +00:00
|
|
|
|
return false;
|
2002-08-21 17:24:42 +00:00
|
|
|
|
}
|
2002-09-03 08:29:03 +00:00
|
|
|
|
|
|
|
|
|
void lcd_define_pattern (int which,char *pattern,int length)
|
|
|
|
|
{
|
|
|
|
|
(void)which;
|
|
|
|
|
(void)pattern;
|
|
|
|
|
(void)length;
|
|
|
|
|
}
|
2002-09-03 09:39:52 +00:00
|
|
|
|
|
|
|
|
|
void lcd_putc(int x, int y, unsigned char ch)
|
|
|
|
|
{
|
|
|
|
|
(void)x;
|
|
|
|
|
(void)y;
|
|
|
|
|
(void)ch;
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-23 11:17:52 +00:00
|
|
|
|
void lcd_set_contrast( int x )
|
|
|
|
|
{
|
2002-09-23 11:23:13 +00:00
|
|
|
|
(void)x;
|
2002-09-23 11:17:52 +00:00
|
|
|
|
}
|
2002-10-01 10:59:36 +00:00
|
|
|
|
|
|
|
|
|
void backlight_set_timeout(int seconds)
|
|
|
|
|
{
|
|
|
|
|
(void)seconds;
|
|
|
|
|
}
|
2002-10-01 11:12:57 +00:00
|
|
|
|
|
|
|
|
|
void backlight_set_on_when_charging(bool beep)
|
|
|
|
|
{
|
|
|
|
|
(void)beep;
|
|
|
|
|
}
|