mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
Merge pull request #671 from Happy-yappH/master
Few miscellaneous N64 changes / improvements
This commit is contained in:
commit
f15313bc07
@ -1874,7 +1874,7 @@ static void execute_dump(running_machine &machine, int ref, int params, const ch
|
||||
output.clear();
|
||||
|
||||
/* print the address */
|
||||
util::stream_format(output, "%*X: ", space->logaddrchars(), (UINT32)space->byte_to_address(i));
|
||||
util::stream_format(output, "%0*X: ", space->logaddrchars(), (UINT32)space->byte_to_address(i));
|
||||
|
||||
/* print the bytes */
|
||||
for (j = 0; j < 16; j += width)
|
||||
@ -1885,7 +1885,7 @@ static void execute_dump(running_machine &machine, int ref, int params, const ch
|
||||
if (debug_cpu_translate(*space, TRANSLATE_READ_DEBUG, &curaddr))
|
||||
{
|
||||
UINT64 value = debug_read_memory(*space, i + j, width, TRUE);
|
||||
util::stream_format(output, " %*X", width * 2, value);
|
||||
util::stream_format(output, " %0*X", width * 2, value);
|
||||
}
|
||||
else
|
||||
util::stream_format(output, " %.*s", width * 2, "****************");
|
||||
@ -2518,7 +2518,7 @@ static void execute_dasm(running_machine &machine, int ref, int params, const ch
|
||||
output.clear();
|
||||
|
||||
/* print the address */
|
||||
stream_format(output, "%*X: ", space->logaddrchars(), (UINT32)space->byte_to_address(pcbyte));
|
||||
stream_format(output, "%0*X: ", space->logaddrchars(), (UINT32)space->byte_to_address(pcbyte));
|
||||
|
||||
/* make sure we can translate the address */
|
||||
tempaddr = pcbyte;
|
||||
@ -2543,7 +2543,7 @@ static void execute_dasm(running_machine &machine, int ref, int params, const ch
|
||||
auto const startdex = output.tellp();
|
||||
numbytes = space->address_to_byte(numbytes);
|
||||
for (j = 0; j < numbytes; j += minbytes)
|
||||
stream_format(output, "%*X ", minbytes * 2, debug_read_opcode(*decrypted_space, pcbyte + j, minbytes));
|
||||
stream_format(output, "%0*X ", minbytes * 2, debug_read_opcode(*decrypted_space, pcbyte + j, minbytes));
|
||||
if ((output.tellp() - startdex) < byteswidth)
|
||||
stream_format(output, "%*s", byteswidth - (output.tellp() - startdex), "");
|
||||
stream_format(output, " ");
|
||||
|
@ -266,16 +266,33 @@ void n64_mess_state::mempak_format(UINT8* pak)
|
||||
0xff,0xff,0xff,0xff, 0x05,0x1a,0x5f,0x13, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff, 0xff,0xff,0x01,0xff, 0x66,0x25,0x99,0xcd,
|
||||
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
|
||||
0x00,0x71,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03
|
||||
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00
|
||||
};
|
||||
|
||||
for (int i = 0; i < 0x8000; i += 2)
|
||||
unsigned char pak_inode_table[] =
|
||||
{
|
||||
pak[i+0] = 0x00;
|
||||
pak[i+1] = 0x03;
|
||||
}
|
||||
memcpy(pak, pak_header, 272);
|
||||
0x01,0x71,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03,
|
||||
0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03
|
||||
};
|
||||
|
||||
memset(pak, 0, 0x8000);
|
||||
memcpy(pak, pak_header, 256);
|
||||
memcpy(pak+256, pak_inode_table, 256); // Main
|
||||
memcpy(pak+512, pak_inode_table, 256); // Mirror
|
||||
}
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64_cart)
|
||||
|
@ -996,7 +996,7 @@ void n64_periphs::vi_recalculate_resolution()
|
||||
// DACRATE is the quarter pixel clock and period will be for a field, not a frame
|
||||
attoseconds_t period = (vi_hsync & 0xfff) * (vi_vsync & 0xfff) * HZ_TO_ATTOSECONDS(DACRATE_NTSC) / 2;
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
if (width == 0 || height == 0 || (vi_control & 3) == 0)
|
||||
{
|
||||
vi_blank = 1;
|
||||
/*
|
||||
@ -2060,7 +2060,7 @@ void n64_periphs::handle_pif()
|
||||
}
|
||||
}
|
||||
|
||||
ram[0x3f ^ BYTE4_XOR_BE(0)] = 0;
|
||||
ram[0x3f ^ BYTE4_XOR_BE(0)] &= ~0x80;
|
||||
}
|
||||
|
||||
/*printf("After:\n"); fflush(stdout);
|
||||
@ -2278,7 +2278,7 @@ void n64_periphs::dd_update_bm()
|
||||
}
|
||||
else // dd read, BM Mode 1
|
||||
{
|
||||
if(((dd_track_reg & 0xFFF) == 6) && (dd_start_block == 0) && ((machine().root_device().ioport("input")->read() & 0x0100) == 0x0000))
|
||||
if(((dd_track_reg & 0x1FFF) == 6) && (dd_start_block == 0) && ((machine().root_device().ioport("input")->read() & 0x0100) == 0x0000))
|
||||
{
|
||||
//only fail read LBA 12 if retail disk drive
|
||||
dd_status_reg &= ~DD_ASIC_STATUS_DREQ;
|
||||
|
Loading…
Reference in New Issue
Block a user