mirror of
https://github.com/LIV2/lide.device.git
synced 2025-12-06 00:32:45 +00:00
Compare commits
4 Commits
828bdaa85f
...
a5fd223432
| Author | SHA1 | Date | |
|---|---|---|---|
| a5fd223432 | |||
| 5082138ab0 | |||
| 2545040145 | |||
| 89cbba436d |
2
Makefile
2
Makefile
@ -13,7 +13,7 @@ export GIT_REF
|
||||
CC=m68k-amigaos-gcc
|
||||
CFLAGS+=-nostartfiles -nostdlib -mcpu=68000 -Wall -Wno-multichar -Wno-pointer-sign -Wno-unused-value -s -Os -fomit-frame-pointer -DCDBOOT=1 -DNO_RDBLAST=1
|
||||
CFLAGS+=-DGIT_REF=$(GIT_REF) -DBUILD_DATE=$(BUILD_DATE)
|
||||
LDFLAGS=-lgcc -lc
|
||||
LDFLAGS=-lc
|
||||
AS=m68k-amigaos-as
|
||||
|
||||
ifeq ($(shell uname),Darwin)
|
||||
|
||||
4
device.c
4
device.c
@ -377,7 +377,7 @@ struct Library * init_device(struct ExecBase *SysBase asm("a6"), BPTR seg_list a
|
||||
struct ConfigDev *cd;
|
||||
struct Task *self = FindTask(NULL);
|
||||
|
||||
#ifndef NO_AUTOCONFIG
|
||||
#if !defined(BOARD_MANUF_ID) && !defined(BOARD_BASE)
|
||||
|
||||
struct CurrentBinding cb;
|
||||
|
||||
@ -482,7 +482,7 @@ struct Library * init_device(struct ExecBase *SysBase asm("a6"), BPTR seg_list a
|
||||
cd->cd_Flags &= ~(CDF_CONFIGME);
|
||||
cd->cd_Driver = dev;
|
||||
}
|
||||
#ifndef NO_AUTOCONFIG
|
||||
#if !defined(BOARD_MANUF_ID) && !defined(BOARD_BASE)
|
||||
}
|
||||
#endif
|
||||
Info("Detected %ld drives, %ld boards\n",((volatile struct DeviceBase *)dev)->numUnits, numBoards);
|
||||
|
||||
5
device.h
5
device.h
@ -16,9 +16,8 @@
|
||||
#define MAX_UNITS 4
|
||||
|
||||
#if AMIGAPCI
|
||||
// #define NO_AUTOCONFIG 1
|
||||
#define BOARD_MANUF_ID 600
|
||||
#define BOARD_PROD_ID 3
|
||||
#define BOARD_BASE 0xDB0000
|
||||
#define FAKE_CONFIGDEV 1
|
||||
#endif
|
||||
|
||||
#ifdef SIMPLE_IDE
|
||||
|
||||
@ -252,6 +252,8 @@ static char *trim(char *str, int bytes)
|
||||
static void identify_decode(UWORD *buf) {
|
||||
int bit;
|
||||
unsigned int atastd;
|
||||
int pio;
|
||||
|
||||
for (int i=0; i<256; i++)
|
||||
buf[i] = __bswap16(buf[i]);
|
||||
|
||||
@ -267,11 +269,15 @@ static void identify_decode(UWORD *buf) {
|
||||
printf("MaxMultSect: %u [%s]\n", buf[59] & 0xff,
|
||||
(buf[59] & BIT(8)) ? "enabled" : "disabled");
|
||||
printf("PIO modes: ");
|
||||
for (bit = 0; bit < 8; bit++)
|
||||
if (buf[64] & BIT(bit))
|
||||
printf(" pio%u", bit);
|
||||
if ((buf[64] & 0xff) == 0)
|
||||
if (buf[53] & BIT(1)) { // PIO Fields valid?
|
||||
pio = (buf[64] & 0x3) << 3 | 0x7; // A value of 0 means PIO 0,1 are supported
|
||||
for (bit = 0; bit < 8; bit++)
|
||||
if (pio & BIT(bit))
|
||||
printf(" pio%u", bit);
|
||||
} else {
|
||||
printf("<none>");
|
||||
}
|
||||
|
||||
printf("\nDMA modes: ");
|
||||
for (bit = 0; bit < 8; bit++)
|
||||
if (buf[63] & BIT(bit)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user