diff --git a/src/system/boot/platform/atari_m68k/menu.cpp b/src/system/boot/platform/atari_m68k/menu.cpp index d2e6014bee..26727a99da 100644 --- a/src/system/boot/platform/atari_m68k/menu.cpp +++ b/src/system/boot/platform/atari_m68k/menu.cpp @@ -28,9 +28,9 @@ platform_add_menus(Menu *menu) item->SetData(B_SAFEMODE_FAIL_SAFE_VIDEO_MODE); item->SetHelpText("The system will use VESA mode and won't try to open any video graphics driver"); +#if 0 smp_add_safemode_menus(menu); -#if 0 menu->AddItem(item = new(nothrow) MenuItem("Don't call the BIOS")); item->SetType(MENU_ITEM_MARKABLE); diff --git a/src/system/boot/platform/atari_m68k/stage1.S b/src/system/boot/platform/atari_m68k/stage1.S new file mode 100644 index 0000000000..e6b40dc867 --- /dev/null +++ b/src/system/boot/platform/atari_m68k/stage1.S @@ -0,0 +1,66 @@ +/* + * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net. + * Copyright 2007, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT license. + * + * Author: + * François Revol, revol@free.fr. + */ + +#define FUNCTION(x) .global x; .type x,@function; x + +/* + * stage1 boot code for TOS for use as boot block of HDD partitions. + * cf. + * http://www.fortunecity.com/skyscraper/apple/308/html/chap3.htm + * http://leonard.oxg.free.fr/articles/multi_atari/multi_atari.html + * http://alive.atari.org/alive10/btmania.php + * + * The offset of the partition in 512 byte blocks must be written at + * position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does + * that) or otherwise the code can't find the partition. + * The partition must be a BFS formatted. The file "beos/system/zbeos" + * (the stage 2 boot loader) loaded into memory at 0x1000:0x0000 (linear address + * 0x10000) and entered at 0x:1000:0x0200 with parameters eax - partition offset + * in 512 byte blocks and dl - BIOS ID of the boot drive. + * + * Compile via: + * nasm -f bin -O5 -o stage1.bin stage1.S + */ + +// 1 enabled verbose output +//#define DEBUG 1 + + +#define BOOT_BLOCK_START_ADDRESS 0x7c00 +#define STACK_ADDRESS BOOT_BLOCK_START_ADDRESS +#define READ_BUFFER_STACK STACK_ADDRESS - 0x2000 +#define PARTITION_OFFSET_OFFSET 506 +#define BFS_SUPERBLOCK_OFFSET 512 + + +// BFS definitions + +#define SUPER_BLOCK_MAGIC1 '1SFB' ; nasm reverses '...' consts +#define SUPER_BLOCK_MAGIC2 0xdd121031 +#define SUPER_BLOCK_MAGIC3 0x15b6830e + +#define INODE_MAGIC1 0x3bbe0ad9 + +#define NUM_DIRECT_BLOCKS 12 + +#define S_IFMT 00000170000o +#define S_IFDIR 00000040000o + + +// BIOS calls + + + + + + + rts + + +