Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions
hdos.c File Reference
#include "xemu/emutools.h"
#include "xemu/cpu65.h"
#include "hypervisor.h"
#include "hdos.h"
#include "memory_mapper.h"
#include "io_mapper.h"
#include "sdcard.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "xemu/emutools_config.h"
Include dependency graph for hdos.c:

Go to the source code of this file.

Macros

#define XEMU_MEGA65_HDOS_H_ALLOWED
 
#define DEBUGHDOS(...)   DEBUGPRINT(__VA_ARGS__)
 
#define HDOS_DESCRIPTORS   4
 
#define HDOSERR_INVALID_ADDRESS   0x10
 
#define HDOSERR_FILE_NOT_FOUND   0x88
 
#define HDOSERR_INVALID_DESC   0x89
 
#define HDOSERR_IS_DIRECTORY   0x86
 
#define HDOSERR_NOT_DIRECTORY   0x87
 
#define HDOSERR_IMAGE_WRONG_LEN   0x8A
 
#define HDOSERR_TOO_MANY_OPEN   0x84
 
#define HDOSERR_NO_SUCH_DISK   0x80
 
#define HDOSERR_END_DIR   0x85
 
#define HDOSERR_CANNOT_OPEN_DIR   HDOSERR_FILE_NOT_FOUND
 
#define HDOS_VIRT_HYPPO_UNIMPLEMENTED()   hdos.func_is_virtualized = 1
 
#define HDOS_VIRT_XEMU_UNIMPLEMENTED()
 

Functions

void trap_for_xemu (const int func_no)
 
void hdos_enter (const Uint8 func_no)
 
void hdos_leave (const Uint8 func_no)
 
void hypervisor_hdos_close_descriptors (void)
 
int hypervisor_hdos_virtualization_status (const int set, const char **root_ptr)
 
void hdos_notify_system_start_begin (void)
 
void hdos_notify_system_start_end (void)
 
void hdos_init (const int do_virt, const char *virtroot)
 

Macro Definition Documentation

◆ DEBUGHDOS

#define DEBUGHDOS (   ...)    DEBUGPRINT(__VA_ARGS__)

Definition at line 38 of file hdos.c.

◆ HDOS_DESCRIPTORS

#define HDOS_DESCRIPTORS   4

Definition at line 58 of file hdos.c.

◆ HDOS_VIRT_HYPPO_UNIMPLEMENTED

#define HDOS_VIRT_HYPPO_UNIMPLEMENTED ( )    hdos.func_is_virtualized = 1

Definition at line 636 of file hdos.c.

◆ HDOS_VIRT_XEMU_UNIMPLEMENTED

#define HDOS_VIRT_XEMU_UNIMPLEMENTED ( )
Value:
do { \
DEBUGPRINT("HDOS: VIRT: Unimplemented by Xemu!! %s ~ #$%02X)" NL, hdos.func_name, hdos.func); \
hdos.func_is_virtualized = 1; \
} while (0)

Definition at line 637 of file hdos.c.

◆ HDOSERR_CANNOT_OPEN_DIR

#define HDOSERR_CANNOT_OPEN_DIR   HDOSERR_FILE_NOT_FOUND

Definition at line 80 of file hdos.c.

◆ HDOSERR_END_DIR

#define HDOSERR_END_DIR   0x85

Definition at line 79 of file hdos.c.

◆ HDOSERR_FILE_NOT_FOUND

#define HDOSERR_FILE_NOT_FOUND   0x88

Definition at line 71 of file hdos.c.

◆ HDOSERR_IMAGE_WRONG_LEN

#define HDOSERR_IMAGE_WRONG_LEN   0x8A

Definition at line 75 of file hdos.c.

◆ HDOSERR_INVALID_ADDRESS

#define HDOSERR_INVALID_ADDRESS   0x10

Definition at line 70 of file hdos.c.

◆ HDOSERR_INVALID_DESC

#define HDOSERR_INVALID_DESC   0x89

Definition at line 72 of file hdos.c.

◆ HDOSERR_IS_DIRECTORY

#define HDOSERR_IS_DIRECTORY   0x86

Definition at line 73 of file hdos.c.

◆ HDOSERR_NO_SUCH_DISK

#define HDOSERR_NO_SUCH_DISK   0x80

Definition at line 77 of file hdos.c.

◆ HDOSERR_NOT_DIRECTORY

#define HDOSERR_NOT_DIRECTORY   0x87

Definition at line 74 of file hdos.c.

◆ HDOSERR_TOO_MANY_OPEN

#define HDOSERR_TOO_MANY_OPEN   0x84

Definition at line 76 of file hdos.c.

◆ XEMU_MEGA65_HDOS_H_ALLOWED

#define XEMU_MEGA65_HDOS_H_ALLOWED

Definition at line 21 of file hdos.c.

Function Documentation

◆ hdos_enter()

void hdos_enter ( const Uint8  func_no)

Definition at line 646 of file hdos.c.

◆ hdos_init()

void hdos_init ( const int  do_virt,
const char *  virtroot 
)

Definition at line 863 of file hdos.c.

◆ hdos_leave()

void hdos_leave ( const Uint8  func_no)

Definition at line 758 of file hdos.c.

◆ hdos_notify_system_start_begin()

void hdos_notify_system_start_begin ( void  )

Definition at line 847 of file hdos.c.

◆ hdos_notify_system_start_end()

void hdos_notify_system_start_end ( void  )

Definition at line 855 of file hdos.c.

Here is the call graph for this function:

◆ hypervisor_hdos_close_descriptors()

void hypervisor_hdos_close_descriptors ( void  )

Definition at line 820 of file hdos.c.

◆ hypervisor_hdos_virtualization_status()

int hypervisor_hdos_virtualization_status ( const int  set,
const char **  root_ptr 
)

Definition at line 829 of file hdos.c.

◆ trap_for_xemu()

void trap_for_xemu ( const int  func_no)

Definition at line 148 of file hdos.c.

Here is the call graph for this function:

Variable Documentation

◆ basedirpath

char* basedirpath

Definition at line 66 of file hdos.c.

◆ cwd

char* cwd

Definition at line 49 of file hdos.c.

◆ cwd_is_root

int cwd_is_root

Definition at line 50 of file hdos.c.

◆ dir_entry_no

int dir_entry_no

Definition at line 67 of file hdos.c.

◆ dirp

XDIR* dirp

Definition at line 63 of file hdos.c.

◆ do_virt

int do_virt

Definition at line 51 of file hdos.c.

◆ error_code

int error_code

Definition at line 52 of file hdos.c.

◆ fd

int fd

Definition at line 62 of file hdos.c.

◆ func

Uint8 func

Definition at line 41 of file hdos.c.

◆ func_is_virtualized

int func_is_virtualized

Definition at line 43 of file hdos.c.

◆ func_name

const char* func_name

Definition at line 42 of file hdos.c.

◆ in_x

Uint8 in_x

Definition at line 44 of file hdos.c.

◆ in_y

Uint8 in_y

Definition at line 44 of file hdos.c.

◆ in_z

Uint8 in_z

Definition at line 44 of file hdos.c.

◆ rootdir

const char* rootdir

Definition at line 48 of file hdos.c.

◆ setname_fn

char setname_fn[64]

Definition at line 47 of file hdos.c.

◆ status

enum { ... } status

◆ transfer_area_addr

int transfer_area_addr

Definition at line 53 of file hdos.c.

◆ virt_out_a

Uint8 virt_out_a

Definition at line 46 of file hdos.c.

◆ virt_out_carry

Uint8 virt_out_carry

Definition at line 46 of file hdos.c.

◆ virt_out_x

Uint8 virt_out_x

Definition at line 46 of file hdos.c.

◆ virt_out_y

Uint8 virt_out_y

Definition at line 46 of file hdos.c.

◆ virt_out_z

Uint8 virt_out_z

Definition at line 46 of file hdos.c.

NL
#define NL
Definition: fat32.c:37