GrafX2 2.9.3227
The ultimate 256-color painting program
c64load.c File Reference

Load C64 .PRG files. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "struct.h"
#include "io.h"
#include "c64load.h"
#include "gfx2mem.h"
#include "gfx2log.h"
#include "6502.h"
+ Include dependency graph for c64load.c:

Macros

#define CPU_6502_STATIC
 
#define CPU_6502_DEPENDENCIES_H   "6502types.h"
 
#define CPU_6502_USE_LOCAL_HEADER
 
#define MAX_IO_ACCESS_MSG_COUNT   10
 

Functions

word C64_isBinaryProgram (FILE *f)
 Check if it is a machine langage program with a BASIC startup line (eg. More...
 
static byte C64_mem_read (void *context, word address)
 
static void C64_mem_write (void *context, word address, byte value)
 
int C64_LoadPrg (struct c64state *c64, FILE *file, word start)
 

Detailed Description

Load C64 .PRG files.

Macro Definition Documentation

◆ CPU_6502_STATIC

#define CPU_6502_STATIC

◆ CPU_6502_DEPENDENCIES_H

#define CPU_6502_DEPENDENCIES_H   "6502types.h"

◆ CPU_6502_USE_LOCAL_HEADER

#define CPU_6502_USE_LOCAL_HEADER

◆ MAX_IO_ACCESS_MSG_COUNT

#define MAX_IO_ACCESS_MSG_COUNT   10

Function Documentation

◆ C64_isBinaryProgram()

word C64_isBinaryProgram ( FILE *  f)

Check if it is a machine langage program with a BASIC startup line (eg.

10 SYS2061)

Returns
0 or the machine language code start address

References GFX2_DEBUG, GFX2_Log(), GFX2_LogHexDump(), NULL, Read_bytes(), and Read_word_le().

Referenced by Load_PRG(), and Test_PRG().

◆ C64_mem_read()

static byte C64_mem_read ( void *  context,
word  address 
)
static

◆ C64_mem_write()

static void C64_mem_write ( void *  context,
word  address,
byte  value 
)
static

◆ C64_LoadPrg()