comparison jaguar.c @ 1085:bc86eaf6699d

Fix some unresolved symbols when linking blastjag
author Michael Pavone <pavone@retrodev.com>
date Thu, 06 Oct 2016 21:12:40 -0700
parents f6e998227300
children 6433d4d05934
comparison
equal deleted inserted replaced
1084:193db42e702b 1085:bc86eaf6699d
4 #include <stdlib.h> 4 #include <stdlib.h>
5 #include "m68k_core.h" 5 #include "m68k_core.h"
6 #include "jaguar.h" 6 #include "jaguar.h"
7 #include "util.h" 7 #include "util.h"
8 #include "debug.h" 8 #include "debug.h"
9 #include "config.h"
9 10
10 //BIOS Area Memory map 11 //BIOS Area Memory map
11 // 10 00 00 - 10 04 00 : Video mode/ Memory control registers 12 // 10 00 00 - 10 04 00 : Video mode/ Memory control registers
12 // 10 04 00 - 10 08 00 : CLUT 13 // 10 04 00 - 10 08 00 : CLUT
13 // 10 08 00 - 10 10 00 : Line buffer A 14 // 10 08 00 - 10 10 00 : Line buffer A
20 // 11 A1 00 - 11 A1 52 : DSP/DAC/I2S Registers 21 // 11 A1 00 - 11 A1 52 : DSP/DAC/I2S Registers
21 // 11 B0 00 - 11 D0 00 : DSP Local RAM (8KB) 22 // 11 B0 00 - 11 D0 00 : DSP Local RAM (8KB)
22 // 11 D0 00 - 11 E0 00 : Wave table ROM 23 // 11 D0 00 - 11 E0 00 : Wave table ROM
23 24
24 int headless = 1; 25 int headless = 1;
26 tern_node * config;
27
28 void handle_keydown(int keycode, uint8_t scancode)
29 {
30 }
31
32 void handle_keyup(int keycode, uint8_t scancode)
33 {
34 }
35
36 void handle_joydown(int joystick, int button)
37 {
38 }
39
40 void handle_joyup(int joystick, int button)
41 {
42 }
43
44 void handle_joy_dpad(int joystick, int dpadnum, uint8_t value)
45 {
46 }
47
48 void handle_mousedown(int mouse, int button)
49 {
50 }
51
52 void handle_mouseup(int mouse, int button)
53 {
54 }
55
56 void handle_mouse_moved(int mouse, uint16_t x, uint16_t y, int16_t deltax, int16_t deltay)
57 {
58 }
25 59
26 60
27 void rom0_write_16(uint32_t address, jaguar_context *system, uint16_t value) 61 void rom0_write_16(uint32_t address, jaguar_context *system, uint16_t value)
28 { 62 {
29 //TODO: Use write_latch and write_pending to turn two 16-bit writes into a 32-bit one 63 //TODO: Use write_latch and write_pending to turn two 16-bit writes into a 32-bit one
51 85
52 mem_pointers[rom] = system->cart; 86 mem_pointers[rom] = system->cart;
53 mem_pointers[rom + 1] = system->cart + ((0x200000 & (system->cart_size-1)) >> 1); 87 mem_pointers[rom + 1] = system->cart + ((0x200000 & (system->cart_size-1)) >> 1);
54 mem_pointers[rom + 2] = system->cart + ((0x400000 & (system->cart_size-1)) >> 1); 88 mem_pointers[rom + 2] = system->cart + ((0x400000 & (system->cart_size-1)) >> 1);
55 system->memcon_written = 1; 89 system->memcon_written = 1;
90 printf("MEMCON1 write - ROMHI: %d", value & 1);
56 //TODO: invalidate code cache 91 //TODO: invalidate code cache
57 } 92 }
58 system->memcon1 = value; 93 system->memcon1 = value;
59 break; 94 break;
60 case 2: 95 case 2:
313 { 348 {
314 if (argc < 3) { 349 if (argc < 3) {
315 fputs("Usage: blastjag BIOS ROM\n", stderr); 350 fputs("Usage: blastjag BIOS ROM\n", stderr);
316 return 1; 351 return 1;
317 } 352 }
353 set_exe_str(argv[0]);
354 config = load_config(argv[0]);
318 uint32_t bios_size; 355 uint32_t bios_size;
319 uint16_t *bios = load_rom(argv[1], &bios_size); 356 uint16_t *bios = load_rom(argv[1], &bios_size);
320 if (!bios_size) { 357 if (!bios_size) {
321 fatal_error("Failed to read BIOS from %s\n", argv[1]); 358 fatal_error("Failed to read BIOS from %s\n", argv[1]);
322 } 359 }