Mercurial > repos > blastem
comparison xband.c @ 1416:11ac0b511cff
Support a couple of bootleg X-in-1 carts
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 24 Jun 2017 13:55:54 -0700 |
parents | 780fbe0b97be |
children | 14a2834d010c |
comparison
equal
deleted
inserted
replaced
1415:f7d653bb8899 | 1416:11ac0b511cff |
---|---|
311 info.save_type = RAM_FLAG_BOTH; | 311 info.save_type = RAM_FLAG_BOTH; |
312 info.port1_override = info.ext_override = info.mouse_mode = NULL; | 312 info.port1_override = info.ext_override = info.mouse_mode = NULL; |
313 info.port2_override = strdup("xband keyboard"); | 313 info.port2_override = strdup("xband keyboard"); |
314 info.eeprom_map = NULL; | 314 info.eeprom_map = NULL; |
315 info.num_eeprom = 0; | 315 info.num_eeprom = 0; |
316 info.rom = rom; | |
317 info.rom_size = rom_size; | |
318 info.is_save_lock_on = 0; | |
316 xband *x = calloc(sizeof(xband), 1); | 319 xband *x = calloc(sizeof(xband), 1); |
317 rom_size = nearest_pow2(rom_size); | 320 rom_size = nearest_pow2(rom_size); |
318 for (int i = 0; (i + rom_size) <= sizeof(x->cart_space) / 2; i += rom_size) | 321 for (int i = 0; (i + rom_size) <= sizeof(x->cart_space) / 2; i += rom_size) |
319 { | 322 { |
320 memcpy(x->cart_space + i/2, rom, rom_size); | 323 memcpy(x->cart_space + i/2, rom, rom_size); |