aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader.h
blob: 6f5bfa1a04bd1d30bfd799fdfe23531d4c68a9f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <stdint.h>
#include <stdio.h>

// EXE loader
uint16_t create_PSP(const char *cmdline, const char *environment, int env_size,
                    const char *progname);
unsigned get_current_PSP(void);

// DOS Memory handling
int mem_resize_segment(int seg, int size);
void mem_free_segment(int seg);
int mem_alloc_segment(int size, int *max);
uint8_t mem_get_alloc_strategy(void);
void mem_set_alloc_strategy(uint8_t s);

// Init internal memory handling
void mcb_init(uint16_t mem_start, uint16_t mem_end);

// Loaders
int dos_load_exe(FILE *f, uint16_t psp_mcb);
int dos_read_overlay(FILE *f, uint16_t load_seg, uint16_t reloc_seg);
Un proyecto texto-plano.xyz