Used logical addresses for video and fixed sound frequency

This commit is contained in:
Angelo Salese 2010-08-18 16:19:31 +00:00
parent 0634470398
commit 4a4eddedbe
2 changed files with 11 additions and 8 deletions

View File

@ -64,23 +64,26 @@ static VIDEO_START(aristmk5)
/* just a quick hack to check out error printing, AA video emulation is A LOT more complex */
static VIDEO_UPDATE(aristmk5)
{
const address_space *space = cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
int count;
int x,y,xi;
UINT32 *vram = archimedes_memc_physmem;
UINT8 pen;
// sets video DMA to 0x400 - 0x400 - 0xfe00
count = 0x380/4; // 0x400 text is offset???
count = 0x400/4; // 0x400 text is offset???
for(y=0;y<400;y+=2)
{
for(x=0;x<640;x+=4)
for(x=0;x<640;x++)
{
for(xi=0;xi<4;xi++)
for(xi=0;xi<1;xi++)
{
pen = memory_read_byte(space, count);
if ((x+xi) <= screen->visible_area().max_x && (y) <= screen->visible_area().max_y)
*BITMAP_ADDR32(bitmap, y, x+xi) = screen->machine->pens[(vram[count]>>(xi*8))&0xff];
*BITMAP_ADDR32(bitmap, y, x+xi) = screen->machine->pens[pen&0xff];
if ((x+xi) <= screen->visible_area().max_x && (y+1) <= screen->visible_area().max_y)
*BITMAP_ADDR32(bitmap, y+1, x+xi) = screen->machine->pens[(vram[count]>>(xi*8))&0xff];
*BITMAP_ADDR32(bitmap, y+1, x+xi) = screen->machine->pens[pen&0xff];
}
count++;

View File

@ -138,7 +138,7 @@ static TIMER_CALLBACK( a310_audio_tick )
{
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
dac_signed_data_w(space->machine->device("dac"), 0x80 | (memory_read_byte(space,vidc_sndcur)));
dac_signed_data_w(space->machine->device("dac"), (memory_read_byte(space,vidc_sndcur)));
vidc_sndcur++;
@ -747,7 +747,7 @@ WRITE32_HANDLER(archimedes_memc_w)
double sndhz;
/* FIXME: is the frequency correct? */
sndhz = (125000.0 / 2) / (double)((vidc_regs[0xc0]&0xff)+2);
sndhz = (250000.0) / (double)((vidc_regs[0xc0]&0xff)+2);
logerror("MEMC: Starting audio DMA at %f Hz, buffer from %x to %x\n", sndhz, vidc_sndstart, vidc_sndend);