Skip to content

Commit

Permalink
Allow 030 kernel do be compiled with native features,
Browse files Browse the repository at this point in the history
for use in Hatari
  • Loading branch information
th-otto committed May 9, 2021
1 parent 1624d2e commit 3661519
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion sys/KERNELDEFS
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ endif
ifeq ($(kernel),030)
MINT = mint030.prg
CPU = 030
KERNELDEFS = -DM68030
KERNELDEFS = -DM68030 -DWITH_NATIVE_FEATURES
endif

ifeq ($(kernel),040)
Expand Down
2 changes: 1 addition & 1 deletion sys/arch/aranym.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# include "aranym.h"


# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)

/* assembler routine */
int detect_native_features(void);
Expand Down
2 changes: 1 addition & 1 deletion sys/arch/aranym.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# include "mint/mint.h"
# include "mint/arch/nf_ops.h"

# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)

struct nf_ops *nf_init(void);

Expand Down
2 changes: 1 addition & 1 deletion sys/arch/aranym_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
*/

# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)

.text

Expand Down
2 changes: 1 addition & 1 deletion sys/arch/halt.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ firebee_pic_write_byte(uchar b)
void
hw_poweroff(void)
{
# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
nf_shutdown();
# else
/* CT60 poweroff */
Expand Down
2 changes: 1 addition & 1 deletion sys/arch/info_mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ char *machine_str (void)
case machine_ct60:
str = "Atari Falcon/CT60";
break;
# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
case machine_aranym:
str = nf_name();
break;
Expand Down
9 changes: 5 additions & 4 deletions sys/arch/init_mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ enum special_hw
hades,
ct2,
ct60
# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
,
aranym
# endif
Expand Down Expand Up @@ -171,13 +171,14 @@ _getmch (void)
break;
}

# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
case COOKIE_NF:
{
kernelinfo.nf_ops = nf_init();
kentry.vec_mch.nf_ops = nf_init();

add_info = aranym;
if (kernelinfo.nf_ops)
add_info = aranym;
break;
}
# endif
Expand Down Expand Up @@ -363,7 +364,7 @@ identify (long mch, enum special_hw info)
case ct60:
machine = machine_ct60;
break;
# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
case aranym:
machine = machine_aranym;
break;
Expand Down
2 changes: 1 addition & 1 deletion sys/bootmenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static const char *debug_devices[] =

static const char *write_boot_levels[] =
{
# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
"(none)",
"(File)",
"(File/Host-Console)"
Expand Down
4 changes: 2 additions & 2 deletions sys/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# include "filesys.h"
# include "tty.h"
# include "proc.h"
# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
# include "arch/aranym.h"
# endif

Expand Down Expand Up @@ -188,7 +188,7 @@ sys_c_conws (const char *str)
while (*p++)
cnt++;

# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
if( write_boot_file == 2 )
nf_debug(str);
# endif
Expand Down
2 changes: 1 addition & 1 deletion sys/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ debug_ws(const char *s)
int scan;
int stopped;

# ifdef ARANYM
# if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
if (nf_debug(s))
return;
# endif
Expand Down
7 changes: 5 additions & 2 deletions sys/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# include "arch/intr.h" /* new_mediach, new_rwabs, new_getbpb, same for old_ */
# include "arch/init_intr.h" /* init_intr() */
# include "arch/init_mach.h" /* */
# include "arch/info_mach.h" /* machine_str() */
# include "arch/mmu.h" /* save_mmu */
# include "arch/mprot.h" /* */
# include "arch/syscall.h" /* call_aes */
Expand Down Expand Up @@ -616,9 +617,11 @@ init (void)
case machine_firebee:
mch_str = "firebee";
break;
#ifdef ARANYM
#if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
/* only when really running on aranym */
case machine_aranym:
mch_str = "aranym";
if (strcmp(machine_str(), "ARAnyM") == 0)
mch_str = "aranym";
break;
#endif
case machine_unknown:
Expand Down
2 changes: 1 addition & 1 deletion sys/mint/ktypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ typedef enum
machine_ct2,
machine_ct60,
machine_firebee
#ifdef ARANYM
#if defined(ARANYM) || defined(WITH_NATIVE_FEATURES)
,
machine_aranym
#endif
Expand Down

0 comments on commit 3661519

Please sign in to comment.