Пример #1
0
Файл: discard.c Проект: 8l/FUZIX
void map_init(void)
{
	uint8_t i;
	uint8_t bslot = 0;
	uint16_t hash;
	struct cart_rom_id *rom;

	kprintf("%s system.\n", sysname[system_id]);
	if (mpi_present()) {
		kputs("MPI cartridge detected.\n");
		cartslots = 4;
		bootslot = mpi_set_slot(0);
		bslot = bootslot & 3;
	}
	for (i = 0; i < cartslots; i++) {
		mpi_set_slot((i << 4) | i);
		hash = cart_hash();
		rom = cart_lookup(hash);
		if (rom) {
			kprintf("%d: %s %c\n",
				i, rom->name,
				i == bootslot ? '*':' ');
			carttype[i] = rom->id;
		}
		else
			kprintf("%d: Unknown(%x) %c\n",
				i, hash,
				i == bslot ? '*':' ');
	}
	mpi_set_slot(bootslot);
	/* We put swap on the start of slice 0, but with the first 64K free
	   so we can keep the OS image linearly there */
	for (i = 0; i < MAX_SWAPS; i++)
		swapmap_add(i + 128);
}
Пример #2
0
void map_init(void)
{
	uint8_t i;
	uint8_t bslot = 0;
	uint16_t hash;
	struct cart_rom_id *rom;

	kprintf("%s system.\n", sysname[system_id]);
	if (mpi_present()) {
		kputs("MPI cartridge detected.\n");
		cartslots = 4;
		bootslot = mpi_set_slot(0);
		bslot = bootslot & 3;
	}
	for (i = 0; i < cartslots; i++) {
		mpi_set_slot((i << 4) | i);
		hash = cart_hash();
		rom = cart_lookup(hash);
		if (rom) {
			kprintf("%d: %s %c\n",
				i, rom->name,
				i == bootslot ? '*':' ');
			carttype[i] = rom->id;
		}
		else
			kprintf("%d: Unknown(%x) %c\n",
				i, hash,
				i == bslot ? '*':' ');
	}
	mpi_set_slot(bootslot);
}