diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2011-06-25 16:13:00 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2011-06-25 16:13:00 +0000 |
commit | 431729da0f5df96795608215ac882768a55e7a29 (patch) | |
tree | a5964a98bc027a6fdef786c0ba191b9f805b514e | |
parent | 650f483d2dc80f26babca4a9d56d624530e39f7e (diff) |
Port from MESS, nw
-rw-r--r-- | src/mame/includes/stv.h | 2 | ||||
-rw-r--r-- | src/mame/machine/stvcd.c | 5 | ||||
-rw-r--r-- | src/mame/video/stvvdp1.c | 8 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h index 3d4e3f31c62..2028b81b84d 100644 --- a/src/mame/includes/stv.h +++ b/src/mame/includes/stv.h @@ -53,6 +53,8 @@ public: UINT16 *framebuffer[2]; UINT16 **framebuffer_draw_lines; UINT8 *gfx_decode; + UINT16 lopr; + UINT16 copr; int local_x; int local_y; diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c index e9d2fa3ffa8..60a196280c0 100644 --- a/src/mame/machine/stvcd.c +++ b/src/mame/machine/stvcd.c @@ -1642,9 +1642,10 @@ static void make_dir_current(running_machine &machine, UINT32 fad) { int i; UINT32 nextent, numentries; - UINT8 sect[MAX_DIR_SIZE]; + UINT8 *sect; direntryT *curentry; + sect = (UINT8 *)malloc(MAX_DIR_SIZE); memset(sect, 0, MAX_DIR_SIZE); for (i = 0; i < (curroot.length/2048); i++) { @@ -1701,6 +1702,8 @@ static void make_dir_current(running_machine &machine, UINT32 fad) i = numfiles; } } + + free(sect); } void stvcd_exit(running_machine& machine) diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c index 5d68f3ee8f7..79565b30a09 100644 --- a/src/mame/video/stvvdp1.c +++ b/src/mame/video/stvvdp1.c @@ -174,8 +174,8 @@ READ16_HANDLER( saturn_vdp1_regs_r ) { case 0x10/2: break; - case 0x12/2: - case 0x14/2: + case 0x12/2: return state->m_vdp1.lopr; + case 0x14/2: return state->m_vdp1.copr; case 0x16/2: printf ("cpu %s (PC=%08X) VDP1: Read from Registers, Offset %04x\n", space->device().tag(), cpu_get_pc(&space->device()), offset*2); @@ -1968,7 +1968,8 @@ static void stv_vdp1_process_list(running_machine &machine) default: popmessage ("VDP1: Sprite List Illegal, contact MAMEdev"); - // TODO: LOPR/COPR hook-up + state->m_vdp1.lopr = (position * 0x20) >> 3; + state->m_vdp1.copr = (position * 0x20) >> 3; return; } } @@ -1981,6 +1982,7 @@ static void stv_vdp1_process_list(running_machine &machine) end: /* set CEF to 1*/ CEF_1; + state->m_vdp1.copr = (position * 0x20) >> 3; if (VDP1_LOG) logerror ("End of list processing!\n"); } |