Revision: 45756
http://sourceforge.net/p/vice-emu/code/45756
Author: gpz
Date: 2025-09-05 16:01:31 +0000 (Fri, 05 Sep 2025)
Log Message:
-----------
some log stuff
Modified Paths:
--------------
trunk/vice/src/c128/c128rom.c
trunk/vice/src/c64/cart/c64carthooks.c
trunk/vice/src/c64/cart/sfx_soundexpander.c
Modified: trunk/vice/src/c128/c128rom.c
===================================================================
--- trunk/vice/src/c128/c128rom.c 2025-09-05 16:00:22 UTC (rev 45755)
+++ trunk/vice/src/c128/c128rom.c 2025-09-05 16:01:31 UTC (rev 45756)
@@ -752,8 +752,6 @@
int mem_load(void)
{
- const char *rom_name = NULL;
-
if (c128rom_log == LOG_DEFAULT) {
c128rom_log = log_open("C128MEM");
}
Modified: trunk/vice/src/c64/cart/c64carthooks.c
===================================================================
--- trunk/vice/src/c64/cart/c64carthooks.c 2025-09-05 16:00:22 UTC (rev 45755)
+++ trunk/vice/src/c64/cart/c64carthooks.c 2025-09-05 16:01:31 UTC (rev 45756)
@@ -166,7 +166,7 @@
/* #define DEBUGCART */
#ifdef DEBUGCART
-#define DBG(x) printf x
+#define DBG(x) log_printf x
#else
#define DBG(x)
#endif
@@ -1409,7 +1409,7 @@
zippcode48_config_setup(rawcart);
break;
default:
- DBG(("CART: no attach hook %d\n", type));
+ DBG(("CART: no attach hook %d", type));
break;
}
}
@@ -1444,7 +1444,7 @@
while (*list != 0) {
if (*list != type) {
if (cartridge_type_enabled(*list)) {
- DBG(("CART: detach conflicting cart: %d (only one Slot 0 cart can be active)\n", *list));
+ DBG(("CART: detach conflicting cart: %d (only one Slot 0 cart can be active)", *list));
cartridge_detach_image(*list);
}
}
@@ -1458,7 +1458,7 @@
void cart_detach_conflicting(int type)
{
- DBG(("CART: detach conflicting for type: %d ...\n", type));
+ DBG(("CART: detach conflicting for type: %d ...", type));
cart_detach_conflicts0(slot0conflicts, type);
cart_detach_conflicts0(slot1conflicts, type);
}
@@ -1468,7 +1468,7 @@
*/
int cartridge_enable(int type)
{
- DBG(("CART: enable type: %d\n", type));
+ DBG(("CART: enable type: %d", type));
switch (type) {
/* "Slot 0" */
case CARTRIDGE_IEEE488:
@@ -1542,7 +1542,7 @@
#endif
/* "Main Slot" */
default:
- DBG(("CART: no enable hook %d\n", type));
+ DBG(("CART: no enable hook %d", type));
break;
}
cart_detach_conflicting(type);
@@ -1569,7 +1569,7 @@
fprintf(stderr, "%s:%d: %s() isn't implemented yet, continuing\n",
__FILE__, __LINE__, __func__);
*/
- DBG(("CART: enable type: %d\n", type));
+ DBG(("CART: enable type: %d", type));
switch (type) {
/* "Slot 0" */
case CARTRIDGE_IEEE488:
@@ -1643,7 +1643,7 @@
#endif
/* "Main Slot" */
default:
- DBG(("CART: no disable hook %d\n", type));
+ DBG(("CART: no disable hook %d", type));
break;
}
#if 0
@@ -1666,7 +1666,7 @@
*/
void cart_detach_all(void)
{
- DBG(("CART: detach all\n"));
+ DBG(("CART: detach all"));
debugcart_detach();
/* "slot 0" */
tpi_detach();
@@ -1709,7 +1709,7 @@
*/
void cart_detach(int type)
{
- DBG(("CART: cart_detach ID: %d\n", type));
+ DBG(("CART: cart_detach ID: %d", type));
switch (type) {
/* "Slot 0" */
@@ -2027,7 +2027,7 @@
zippcode48_detach();
break;
default:
- DBG(("CART: no detach hook ID: %d\n", type));
+ DBG(("CART: no detach hook ID: %d", type));
break;
}
}
@@ -2035,7 +2035,7 @@
/* called once by cartridge_init at machine init */
void cart_init(void)
{
- DBG(("CART: cart_init\n"));
+ DBG(("CART: cart_init"));
/* "Slot 0" */
mmc64_init();
@@ -2344,7 +2344,7 @@
case CARTRIDGE_NONE:
break;
default:
- DBG(("CART: no init hook ID: %d\n", mem_cartridge_type));
+ DBG(("CART: no init hook ID: %d", mem_cartridge_type));
cart_config_changed_slotmain(CMODE_RAM, CMODE_RAM, CMODE_READ);
break;
}
@@ -2650,7 +2650,7 @@
/* called by cart_nmi_alarm_triggered, after an alarm occured */
static void cart_freeze(int type)
{
- DBG(("CART: freeze (type:%d)\n", type));
+ DBG(("CART: freeze (type:%d)", type));
switch (type) {
/* "Slot 0" (no freezer carts) */
/* "Slot 1" */
@@ -3112,6 +3112,7 @@
void cartridge_sound_chip_init(void)
{
+ DBG(("cartridge_sound_chip_init"));
digimax_sound_chip_init();
sfx_soundsampler_sound_chip_init();
sfx_soundexpander_sound_chip_init();
@@ -3156,7 +3157,7 @@
*/
void cartridge_mmu_translate(unsigned int addr, uint8_t **base, int *start, int *limit)
{
- /* DBG(("CARTHOOKS: cartridge_mmu_translate(%x)\n",addr)); */
+ /* DBG(("CARTHOOKS: cartridge_mmu_translate(%x)",addr)); */
int res = CART_READ_THROUGH;
#if 0
/* disable all the mmu translation stuff for testing */
@@ -3298,7 +3299,7 @@
while (e != NULL) {
if (number_of_carts == C64CART_DUMP_MAX_CARTS) {
- DBG(("CART snapshot save: active carts > max (%i)\n", number_of_carts));
+ DBG(("CART snapshot save: active carts > max (%i)", number_of_carts));
return -1;
}
if (last_cart != (int)e->device->cartid) {
@@ -3894,7 +3895,7 @@
default:
/* If the cart cannot be saved, we obviously can't load it either.
Returning an error at this point is better than failing at later. */
- DBG(("CART snapshot save: cart %i handler missing\n", cart_ids[i]));
+ DBG(("CART snapshot save: cart %i handler missing", cart_ids[i]));
return -1;
}
}
@@ -3946,7 +3947,7 @@
}
if (number_of_carts > C64CART_DUMP_MAX_CARTS) {
- DBG(("CART snapshot read: carts %i > max %i\n", number_of_carts, C64CART_DUMP_MAX_CARTS));
+ DBG(("CART snapshot read: carts %i > max %i", number_of_carts, C64CART_DUMP_MAX_CARTS));
goto fail;
}
@@ -4517,7 +4518,7 @@
#endif
default:
- DBG(("CART snapshot read: cart %i handler missing\n", cart_ids[i]));
+ DBG(("CART snapshot read: cart %i handler missing", cart_ids[i]));
goto fail2;
}
}
Modified: trunk/vice/src/c64/cart/sfx_soundexpander.c
===================================================================
--- trunk/vice/src/c64/cart/sfx_soundexpander.c 2025-09-05 16:00:22 UTC (rev 45755)
+++ trunk/vice/src/c64/cart/sfx_soundexpander.c 2025-09-05 16:01:31 UTC (rev 45756)
@@ -45,6 +45,14 @@
#include "sound.h"
#include "uiapi.h"
+/* #define DEBUG_SFX_SOUNDEXPANDER */
+
+#ifdef DEBUG_SFX_SOUNDEXPANDER
+#define DBG(x) log_printf x
+#else
+#define DBG(x)
+#endif
+
/*
Note: this cartridge has a passthrough port, which for some odd reason does
connect all lines 1:1 straight through, EXCEPT for these:
@@ -179,6 +187,7 @@
void sfx_soundexpander_sound_chip_init(void)
{
+ DBG(("sfx_soundexpander_sound_chip_init"));
sfx_soundexpander_sound_chip_offset = sound_chip_register(&sfx_soundexpander_sound_chip);
}
@@ -194,7 +203,8 @@
static int set_sfx_soundexpander_enabled(int value, void *param)
{
int val = value ? 1 : 0;
-
+ DBG(("set_sfx_soundexpander_enabled chip_enabled:%d value:%d",
+ sfx_soundexpander_sound_chip.chip_enabled, value));
if (sfx_soundexpander_sound_chip.chip_enabled != val) {
if (val) {
if (export_add(&export_res_sound) < 0) {
@@ -428,12 +438,13 @@
static int sfx_soundexpander_sound_machine_init(sound_t *psid, int speed, int cycles_per_sec)
{
+ DBG(("sfx_soundexpander_sound_machine_init sfx_soundexpander_chip:%d", sfx_soundexpander_chip));
if (sfx_soundexpander_chip == 3812) {
if (YM3812_chip != NULL) {
ym3812_shutdown(YM3812_chip);
}
YM3812_chip = ym3812_init((UINT32)3579545, (UINT32)speed);
- } else {
+ } else if (sfx_soundexpander_chip == 3526) {
if (YM3526_chip != NULL) {
ym3526_shutdown(YM3526_chip);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|