From: kosmirror <kos...@us...> - 2025-05-21 17:44:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 07614ba6df19ea975310f41fcb4932dcbe8b7adc (commit) via 0249db7c24f94d5938fb78ab120c40211680823e (commit) via d816e5ebf989de54721ded90a7d86aba9684e89e (commit) via c00e94b5c26b25329ab439d386f7cd0be175a929 (commit) via d516a642d461a0ed4456252234225da1ff0c7a17 (commit) from 1a9179047ae8a8e449efdc45a57ed976a63419d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 07614ba6df19ea975310f41fcb4932dcbe8b7adc Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 21:42:30 2025 +0200 Un-hide code behind ifdef guards Hiding code behind ifdef guards has the nasty issue that the code is only seen by the compiler under a specific configuration. As time passes, the guarded code might become stale, causing some rarely used configurations to fail to build. This can be solved by using the __is_defined() macro to conditionally execute the code only if the given guard macro is defined. The difference is that the compiler will see the code, and report issues if it cannot build it, but ultimately drop it as dead code if the guard macro is not defined. Signed-off-by: Paul Cercueil <pa...@cr...> commit 0249db7c24f94d5938fb78ab120c40211680823e Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 23:12:06 2025 +0200 Add missing <kos/dbglog.h> includes Under certain build conditions, the dbglog() was being used without the correct include, causing a build failure. Signed-off-by: Paul Cercueil <pa...@cr...> commit d816e5ebf989de54721ded90a7d86aba9684e89e Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 23:10:42 2025 +0200 fs: Fix debug print in ELF code A debug print was referencing a struct field that does not exist. Signed-off-by: Paul Cercueil <pa...@cr...> commit c00e94b5c26b25329ab439d386f7cd0be175a929 Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 21:40:23 2025 +0200 cdefs.h: Add __is_defined() macro This macro will resolve to a compile-time constant value of 1 (true) if the macro passed as argument resolves to 1, and will resolve to 0 (false) otherwise. Signed-off-by: Paul Cercueil <pa...@cr...> commit d516a642d461a0ed4456252234225da1ff0c7a17 Author: Paul Cercueil <pa...@cr...> Date: Tue May 20 21:39:22 2025 +0200 cdefs.h: Add __stringify() macro Just a simple macro to return a C string from the argument. Signed-off-by: Paul Cercueil <pa...@cr...> ----------------------------------------------------------------------- Summary of changes: include/kos/cdefs.h | 13 ++++ include/kos/version.h | 10 +-- kernel/arch/dreamcast/fs/fs_vmu.c | 27 +++---- .../dreamcast/hardware/maple/maple_init_shutdown.c | 27 ++++--- kernel/arch/dreamcast/hardware/maple/maple_irq.c | 31 ++++---- kernel/arch/dreamcast/hardware/maple/maple_queue.c | 15 ++-- kernel/arch/dreamcast/hardware/maple/maple_utils.c | 4 +- .../dreamcast/hardware/network/broadband_adapter.c | 44 ++++------- .../dreamcast/hardware/pvr/pvr_init_shutdown.c | 26 +++---- kernel/arch/dreamcast/hardware/pvr/pvr_irq.c | 56 +++++++------- kernel/arch/dreamcast/hardware/pvr/pvr_mem.c | 85 ++++++++++------------ kernel/arch/dreamcast/hardware/pvr/pvr_scene.c | 25 +++---- kernel/arch/dreamcast/include/dc/maple.h | 2 - kernel/arch/dreamcast/kernel/irq.c | 4 +- kernel/arch/dreamcast/kernel/stack.c | 11 ++- kernel/arch/dreamcast/sound/snd_mem.c | 46 ++++++------ kernel/fs/elf.c | 11 ++- kernel/libc/koslib/assert.c | 9 +-- 18 files changed, 210 insertions(+), 236 deletions(-) diff --git a/include/kos/cdefs.h b/include/kos/cdefs.h index 22ff1e16..e016a51b 100644 --- a/include/kos/cdefs.h +++ b/include/kos/cdefs.h @@ -277,6 +277,19 @@ #define _array_size_chk(arr) 0 #endif +/** \brief Create a string from the argument. + + \param arg The text to stringify. + */ +#define __stringify(arg) ""#arg + +/** \brief Check if a macro is defined to 1. + + \param macro The macro to check + \return 1 if the macro is defined to 1, 0 otherwise. + */ +#define __is_defined(macro) !__builtin_strcmp(__stringify(macro), "1") + /** @} */ #endif /* __KOS_CDEFS_H */ diff --git a/include/kos/version.h b/include/kos/version.h index 5fe98b1a..9b7e3baf 100644 --- a/include/kos/version.h +++ b/include/kos/version.h @@ -263,9 +263,9 @@ `major.minor.patch` */ #define KOS_VERSION_MAKE_STRING(major, minor, patch) \ - KOS_STRINGIFY(major) "." \ - KOS_STRINGIFY(minor) "." \ - KOS_STRINGIFY(patch) + __stringify(major) "." \ + __stringify(minor) "." \ + __stringify(patch) /** @} */ /** \name Version Checking @@ -381,10 +381,6 @@ (KOS_VERSION_MAKE_COMPARISON(major, minor, patch, >, version)) /** @} */ -/** \cond INTERNAL */ -#define KOS_STRINGIFY(str) #str -/** \endcond */ - /** @} */ #include <kos/cdefs.h> diff --git a/kernel/arch/dreamcast/fs/fs_vmu.c b/kernel/arch/dreamcast/fs/fs_vmu.c index f79cd7b8..7518d017 100644 --- a/kernel/arch/dreamcast/fs/fs_vmu.c +++ b/kernel/arch/dreamcast/fs/fs_vmu.c @@ -166,16 +166,17 @@ static vmu_fh_t *vmu_open_vmu_dir(void) { names[num][0] = p + 'a'; names[num][1] = u + '0'; num++; -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "vmu_open_vmu_dir: found memcard (%c%d)\n", 'a' + p, u); -#endif + + if(__is_defined(VMUFS_DEBUG)) { + dbglog(DBG_KDEBUG, "vmu_open_vmu_dir: found memcard (%c%d)\n", + 'a' + p, u); + } } } } -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "# of memcards found: %d\n", num); -#endif + if(__is_defined(VMUFS_DEBUG)) + dbglog(DBG_KDEBUG, "# of memcards found: %d\n", num); if(!(dh = malloc(sizeof(vmu_dh_t)))) return NULL; @@ -500,9 +501,8 @@ static ssize_t vmu_write(void * hnd, const void *buffer, size_t cnt) { n = n / 512; -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "VMUFS: extending file's filesize by %d\n", n); -#endif + if(__is_defined(VMUFS_DEBUG)) + dbglog(DBG_KDEBUG, "VMUFS: extending file's filesize by %d\n", n); /* We alloc another 512*n bytes for the file */ tmp = realloc(fh->data, (fh->filesize + n) * 512); @@ -519,10 +519,11 @@ static ssize_t vmu_write(void * hnd, const void *buffer, size_t cnt) { } /* insert the data in buffer into fh->data at fh->loc */ -#ifdef VMUFS_DEBUG - dbglog(DBG_KDEBUG, "VMUFS: adding %d bytes of data at loc %d (%d avail)\n", - cnt, fh->loc, fh->filesize * 512); -#endif + if(__is_defined(VMUFS_DEBUG)) { + dbglog(DBG_KDEBUG, "VMUFS: adding %d bytes of data at loc %d (%d avail)\n", + cnt, fh->loc, fh->filesize * 512); + } + memcpy(fh->data + fh->loc + fh->start, buffer, cnt); fh->loc += cnt; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c b/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c index 524aca63..c23848ce 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c @@ -58,20 +58,22 @@ static void maple_hw_init(void) { } /* Allocate the DMA send buffer */ -#if MAPLE_DMA_DEBUG - maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE + 1024); -#else - maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE + 1024); + else + maple_state.dma_buffer = aligned_alloc(32, MAPLE_DMA_SIZE); + assert_msg(maple_state.dma_buffer != NULL, "Couldn't allocate maple DMA buffer"); assert_msg((((uint32)maple_state.dma_buffer) & 0x1f) == 0, "DMA buffer was unaligned; bug in dlmalloc; please report!"); /* Force it into the P2 area */ maple_state.dma_buffer = (uint8*)((((uint32)maple_state.dma_buffer) & MEM_AREA_CACHE_MASK) | MEM_AREA_P2_BASE); -#if MAPLE_DMA_DEBUG - maple_state.dma_buffer += 512; - maple_sentinel_setup(maple_state.dma_buffer - 512, MAPLE_DMA_SIZE + 1024); -#endif + + if(__is_defined(MAPLE_DMA_DEBUG)) { + maple_state.dma_buffer += 512; + maple_sentinel_setup(maple_state.dma_buffer - 512, MAPLE_DMA_SIZE + 1024); + } + maple_state.dma_in_progress = 0; dbglog(DBG_INFO, " DMA Buffer at %08lx\n", (uint32)maple_state.dma_buffer); @@ -117,9 +119,10 @@ void maple_hw_shutdown(void) { /* We must cast this back to P1 or cache issues will arise */ if(maple_state.dma_buffer != NULL) { ptr = (uint32)maple_state.dma_buffer; -#if MAPLE_DMA_DEBUG - ptr -= 512; -#endif + + if(__is_defined(MAPLE_DMA_DEBUG)) + ptr -= 512; + ptr = (ptr & MEM_AREA_CACHE_MASK) | MEM_AREA_P1_BASE; free((void *)ptr); maple_state.dma_buffer = NULL; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_irq.c b/kernel/arch/dreamcast/hardware/maple/maple_irq.c index 80fdb6a4..0f116a4a 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_irq.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_irq.c @@ -14,6 +14,7 @@ #include <dc/maple.h> #include <dc/asic.h> #include <dc/pvr.h> +#include <kos/dbglog.h> #include <kos/thread.h> /*********************************************************************/ @@ -48,10 +49,11 @@ static void vbl_chk_disconnect(maple_state_t *state, int p, int u) { (void)state; if(maple_dev_valid(p, u)) { -#if MAPLE_IRQ_DEBUG - dbglog(DBG_KDEBUG, "maple: detach on device %c%c\n", - 'A' + p, '0' + u); -#endif + if(__is_defined(MAPLE_IRQ_DEBUG)) { + dbglog(DBG_KDEBUG, "maple: detach on device %c%c\n", + 'A' + p, '0' + u); + } + if(maple_driver_detach(p, u) >= 0) { assert(!maple_dev_valid(p, u)); } @@ -150,10 +152,11 @@ static void vbl_autodet_callback(maple_state_t *state, maple_frame_t *frm) { else if(resp->response == MAPLE_RESPONSE_DEVINFO) { /* Device is present, check for connections */ if(!dev) { -#if MAPLE_IRQ_DEBUG - dbglog(DBG_KDEBUG, "maple: attach on device %c%c\n", - 'A' + p, '0' + u); -#endif + if(__is_defined(MAPLE_IRQ_DEBUG)) { + dbglog(DBG_KDEBUG, "maple: attach on device %c%c\n", + 'A' + p, '0' + u); + } + if(maple_driver_attach(frm) == 0) { assert(maple_dev_valid(p, u)); } @@ -253,9 +256,10 @@ void maple_dma_irq_hnd(uint32 code, void *data) { /* ACK the receipt */ state->dma_in_progress = 0; -#if MAPLE_DMA_DEBUG - maple_sentinel_verify("state->dma_buffer", state->dma_buffer, MAPLE_DMA_SIZE); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) { + maple_sentinel_verify("state->dma_buffer", state->dma_buffer, + MAPLE_DMA_SIZE); + } /* For each queued frame, call its callback if it's done */ TAILQ_FOREACH_SAFE(i, &state->frame_queue, frameq, tmp) { @@ -272,9 +276,8 @@ void maple_dma_irq_hnd(uint32 code, void *data) { continue; } -#if MAPLE_DMA_DEBUG - maple_sentinel_verify("i->recv_buf", i->recv_buf, 1024); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + maple_sentinel_verify("i->recv_buf", i->recv_buf, 1024); /* Mark it as responded to */ i->state = MAPLE_FRAME_RESPONDED; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_queue.c b/kernel/arch/dreamcast/hardware/maple/maple_queue.c index 6875b3b6..5c1d5922 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_queue.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_queue.c @@ -155,18 +155,17 @@ void maple_frame_init(maple_frame_t *frame) { if(buf_ptr & 0x1f) buf_ptr = (buf_ptr & ~0x1f) + 0x20; -#if MAPLE_DMA_DEBUG - buf_ptr += 512; -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + buf_ptr += 512; + buf_ptr = (buf_ptr & MEM_AREA_CACHE_MASK) | MEM_AREA_P2_BASE; frame->recv_buf = (uint8*)buf_ptr; /* Clear out the receive buffer */ -#if MAPLE_DMA_DEBUG - maple_sentinel_setup(frame->recv_buf - 512, 1024 + 1024); -#else - memset(frame->recv_buf, 0, 1024); -#endif + if(__is_defined(MAPLE_DMA_DEBUG)) + maple_sentinel_setup(frame->recv_buf - 512, 1024 + 1024); + else + memset(frame->recv_buf, 0, 1024); /* Initialize other state stuff */ frame->cmd = -1; diff --git a/kernel/arch/dreamcast/hardware/maple/maple_utils.c b/kernel/arch/dreamcast/hardware/maple/maple_utils.c index b1a58570..522a3ea5 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_utils.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_utils.c @@ -167,9 +167,9 @@ void maple_gun_read_pos(int *x, int *y) { *y = maple_state.gun_y; } -#if MAPLE_DMA_DEBUG /* Debugging help */ void maple_sentinel_setup(void * buffer, int bufsize) { + assert(__is_defined(MAPLE_DMA_DEBUG)); assert(bufsize % 4 == 0); memset(buffer, 0xdeadbeef, bufsize); } @@ -178,6 +178,7 @@ void maple_sentinel_verify(const char * bufname, void * buffer, int bufsize) { int i; uint32 *b32; + assert(__is_defined(MAPLE_DMA_DEBUG)); assert(bufsize % 4 == 0); b32 = ((uint32 *)buffer) - 512 / 4; @@ -200,4 +201,3 @@ void maple_sentinel_verify(const char * bufname, void * buffer, int bufsize) { } } } -#endif diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index 9201a9d8..95de93fb 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -485,9 +485,7 @@ static semaphore_t bba_rx_sema2; static void bba_rx(void); -#ifdef TX_SEMA static semaphore_t tx_sema; -#endif static uint8 * next_dst; static uint8 * next_src; @@ -543,10 +541,9 @@ static int bba_copy_dma(uint8 * dst, uint32 s, int len) { src -= add; dst -= add; -#ifndef USE_P2_AREA /* Invalidate the dcache over the range of the data. */ - dcache_inval_range((uint32) dst, len); -#endif + if(!__is_defined(USE_P2_AREA)) + dcache_inval_range((uint32) dst, len); if(!dma_used) { dma_used = 1; @@ -574,13 +571,9 @@ static int bba_copy_dma(uint8 * dst, uint32 s, int len) { /* XXX Could probably use a memcpy8 here, even */ static int bba_copy_packet(uint8 * dst, uint32 src, int len) { -#if !RX_NOWRAP - - if((src + len) < RX_BUFFER_LEN) { -#endif + if(__is_defined(RX_NOWRAP) || (src + len) < RX_BUFFER_LEN) { /* Straight copy is ok */ return bba_copy_dma(dst, rtl_mem + src, len); -#if !RX_NOWRAP } else { /* Have to copy around the ring end */ @@ -589,8 +582,6 @@ static int bba_copy_packet(uint8 * dst, uint32 src, int len) { return bba_copy_dma(dst + (RX_BUFFER_LEN - src), rtl_mem, len - (RX_BUFFER_LEN - src)); } - -#endif } static int rx_enq(int ring_offset, size_t pkt_size) { @@ -603,12 +594,10 @@ static int rx_enq(int ring_offset, size_t pkt_size) { /* Receive buffer: temporary space to copy out received data */ -#ifdef USE_P2_AREA - rx_pkt[rxin].rxbuff = rxbuff + 32 + (rxbuff_pos | MEM_AREA_P2_BASE) + (ring_offset & 31); -#else - rx_pkt[rxin].rxbuff = rxbuff + 32 + rxbuff_pos + (ring_offset & 31); -#endif - + if(__is_defined(USE_P2_AREA)) + rx_pkt[rxin].rxbuff = rxbuff + 32 + (rxbuff_pos | MEM_AREA_P2_BASE) + (ring_offset & 31); + else + rx_pkt[rxin].rxbuff = rxbuff + 32 + rxbuff_pos + (ring_offset & 31); rxbuff_pos = (rxbuff_pos + pkt_size + 63) & (RXBSZ - 32); @@ -620,11 +609,7 @@ static int rx_enq(int ring_offset, size_t pkt_size) { } /* Transmit a single packet */ -#ifdef TX_SEMA static int bba_rtx(const uint8 * pkt, int len, int wait) -#else -static int bba_tx(const uint8 * pkt, int len, int wait) -#endif { if(!link_stable) { if(wait == BBA_TX_WAIT) { @@ -683,10 +668,12 @@ static int bba_tx(const uint8 * pkt, int len, int wait) return BBA_TX_OK; } -#ifdef TX_SEMA int bba_tx(const uint8 * pkt, int len, int wait) { int res; + if(!__is_defined(TX_SEMA)) + return bba_rtx(pkt, len, wait); + if(irq_inside_int()) { if(sem_trywait(&tx_sema)) { //printf("bba_tx called from an irq while a thread was running it !\n"); @@ -701,7 +688,6 @@ int bba_tx(const uint8 * pkt, int len, int wait) { return res; } -#endif void bba_lock(void) { //sem_wait(&bba_rx_sema2); @@ -1109,9 +1095,8 @@ int bba_init(void) { /* Use the netcore callback */ bba_set_rx_callback(bba_if_netinput); -#ifdef TX_SEMA - sem_init(&tx_sema, 1); -#endif + if(__is_defined(TX_SEMA)) + sem_init(&tx_sema, 1); /* VP : Initialize rx thread */ // Note: The thread itself is not created here, but when we actually @@ -1186,9 +1171,8 @@ int bba_shutdown(void) { if(bba_if.flags & NETIF_INITIALIZED) bba_if.if_shutdown(&bba_if); -#ifdef TX_SEMA - sem_destroy(&tx_sema); -#endif + if(__is_defined(TX_SEMA)) + sem_destroy(&tx_sema); return 0; } diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c b/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c index 41036b4a..7aa3b019 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c @@ -161,19 +161,19 @@ int pvr_init(const pvr_init_params_t *params) { asic_evt_set_handler(ASIC_EVT_PVR_RENDERDONE_TSP, pvr_int_handler, NULL); asic_evt_enable(ASIC_EVT_PVR_RENDERDONE_TSP, ASIC_IRQ_DEFAULT); -#ifdef PVR_RENDER_DBG - /* Hook up interrupt handlers for error events */ - asic_evt_set_handler(ASIC_EVT_PVR_ISP_OUTOFMEM, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_ISP_OUTOFMEM, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_STRIP_HALT, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_STRIP_HALT, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_OPB_OUTOFMEM, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_OPB_OUTOFMEM, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_ERR, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_ERR, ASIC_IRQ_DEFAULT); - asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, pvr_int_handler, NULL); - asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, ASIC_IRQ_DEFAULT); -#endif + if(__is_defined(PVR_RENDER_DBG)) { + /* Hook up interrupt handlers for error events */ + asic_evt_set_handler(ASIC_EVT_PVR_ISP_OUTOFMEM, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_ISP_OUTOFMEM, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_STRIP_HALT, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_STRIP_HALT, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_OPB_OUTOFMEM, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_OPB_OUTOFMEM, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_ERR, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_ERR, ASIC_IRQ_DEFAULT); + asic_evt_set_handler(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, pvr_int_handler, NULL); + asic_evt_enable(ASIC_EVT_PVR_TA_INPUT_OVERFLOW, ASIC_IRQ_DEFAULT); + } /* 3d-specific parameters; these are all about rendering and nothing to do with setting up the video; some stuff in here diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c b/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c index 5ace04d7..711b271b 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c @@ -14,9 +14,7 @@ #include <kos/genwait.h> #include <kos/regfield.h> -#ifdef PVR_RENDER_DBG #include <stdio.h> -#endif /* PVR interrupt handler; the way things are setup, we're gonna get @@ -176,34 +174,34 @@ void pvr_int_handler(uint32 code, void *data) { break; } -#ifdef PVR_RENDER_DBG - /* Show register values on each interrupt */ - switch (code) { - case ASIC_EVT_PVR_ISP_OUTOFMEM: - DBG(("[ERROR]: ASIC_EVT_PVR_ISP_OUTOFMEM\n")); - break; - - case ASIC_EVT_PVR_STRIP_HALT: - DBG(("[ERROR]: ASIC_EVT_PVR_STRIP_HALT\n")); - break; - - case ASIC_EVT_PVR_OPB_OUTOFMEM: - DBG(("[ERROR]: ASIC_EVT_PVR_OPB_OUTOFMEM\n")); - DBG(("PVR_TA_OPB_START: %08lx\nPVR_TA_OPB_END: %08lx\nPVR_TA_OPB_POS: %08lx\n", - PVR_GET(PVR_TA_OPB_START), - PVR_GET(PVR_TA_OPB_END), - PVR_GET(PVR_TA_OPB_POS) << 2)); - break; - - case ASIC_EVT_PVR_TA_INPUT_ERR: - DBG(("[ERROR]: ASIC_EVT_PVR_TA_INPUT_ERR\n")); - break; - - case ASIC_EVT_PVR_TA_INPUT_OVERFLOW: - DBG(("[ERROR]: ASIC_EVT_PVR_TA_INPUT_OVERFLOW\n")); ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |