62 }
else if( access(
"run6502.exe", F_OK ) == 0 ) {
63 sprintf(executableName,
"%s",
"run6502.exe" );
65 sprintf(executableName,
"%s",
"run6502" );
68 sprintf( commandLine,
"\"%s\" -X 0000 -R 2000 -l 11ff \"%s\" -u \"%s\" -p \"%s\" %d",
77 printf(
"The profiling of assembly program failed.\n\n");
89 FILE * prgHandle = fopen(_environment->
exeFileName,
"rb");
90 fseek( prgHandle, 0, SEEK_END );
91 int prgSize = ftell( prgHandle );
92 fseek( prgHandle, 0, SEEK_SET );
93 unsigned char * prgContent =
malloc( prgSize );
94 (void)!fread( prgContent, prgSize, 1, prgHandle );
99 char * p = strstr( d64FileName,
".d64" );
101 strcat( d64FileName,
".d64");
113 printf(
"%s\n",d64FileName );
124 while( fileStorage ) {
125 FILE * file = fopen( fileStorage->
sourceName,
"rb" );
129 fseek( file, 0, SEEK_END );
130 int size = ftell( file );
131 fseek( file, 0, SEEK_SET );
134 (void)!fread( &buffer[0],
size, 1, file );
137 fileStorage = fileStorage->
next;
141 strcopy( filemask, d64FileName );
147 strcat( basePath, storage->
fileName );
149 strcat( basePath,
"disk%d.d64" );
155 strcopy( filemask,
"disk%d.d64" );
158 sprintf( buffer, filemask, i );
159 if ( !strstr( buffer,
".d64" ) ) {
160 strcat( buffer,
".d64" );
164 printf(
"%s\n",buffer );
167 storage = storage->
next;
int system_call(Environment *_environment, char *_commandline)
Call an external executable.
char * find_last_path_separator(char *_path)
void target_linkage(Environment *_environment)
Convert C64's assembly to executable.
void target_cleanup(Environment *_environment)
void target_analysis(Environment *_environment)
void generate_prg(Environment *_environment)
void generate_d64(Environment *_environment)
D64Handle * d64_create(D64Format _format)
Create a new D64 disk image.
void d64_output(D64Handle *_handle, unsigned char *_filename)
void d64_free(D64Handle *_handle)
Free the disk image resources.
int d64_write_file(D64Handle *_handle, unsigned char *_filename, D64FileType _type, unsigned char *_buffer, int _size)
Write a block of memory on a file on the D64 disk image.
struct _D64Handle D64Handle
char * configurationFileName
OutputFileType outputFileType
struct _FileStorage * next
#define BUILD_SAFE_REMOVE(_environment, filename)
#define MAX_TEMPORARY_STORAGE
#define CRITICAL_DLOAD_MISSING_FILE(f)
#define BUILD_TOOLCHAIN_CC65_GET_EXECUTABLE(_environment, executableName)
#define BUILD_TOOLCHAIN_CC65_GET_LISTING_FILE(_environment, listingFileName)
struct _Environment Environment
Structure of compilation environment.
struct _Storage Storage
Structure of a single storage.
#define BUILD_TOOLCHAIN_CC65_EXEC(_environment, target, executableName, listingFileName, additionalParameters)
struct _FileStorage FileStorage
Structure of a single file inside a storage.
#define CRITICAL_UNSUPPORTED_OUTPUT_FILE_TYPE(t)
char OUTPUT_FILE_TYPE_AS_STRING[][16]
char * strcopy(char *_dest, char *_source)