Search
lxdream.org :: lxdream/src/dreamcast.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 11:0a82ef380c45
prev2:42349f6ea216
next15:5194dd0fdb60
author nkeynes
date Mon Dec 12 10:37:41 2005 +0000 (15 years ago)
permissions -rw-r--r--
last change Use cpu-specific is_valid_page function
file annotate diff log raw
nkeynes@2
     1
#include "dream.h"
nkeynes@2
     2
#include "mem.h"
nkeynes@11
     3
#include "aica/aica.h"
nkeynes@2
     4
#include "asic.h"
nkeynes@2
     5
#include "ide.h"
nkeynes@2
     6
#include "dreamcast.h"
nkeynes@2
     7
/* Central switchboard for the system */
nkeynes@2
     8
nkeynes@2
     9
void dreamcast_init( void )
nkeynes@2
    10
{
nkeynes@2
    11
    mem_init();
nkeynes@11
    12
    mem_create_ram_region( 0x0C000000, 16 MB, MEM_REGION_MAIN );
nkeynes@11
    13
    mem_create_ram_region( 0x05000000, 8 MB, MEM_REGION_VIDEO );
nkeynes@11
    14
    mem_create_ram_region( 0x00800000, 2 MB, MEM_REGION_AUDIO );
nkeynes@11
    15
    mem_create_ram_region( 0x00703000, 8 KB, MEM_REGION_AUDIO_SCRATCH ); /*???*/
nkeynes@11
    16
    mem_load_rom( "dcboot.rom", 0x00000000, 0x00200000, 0x89f2b1a1 );
nkeynes@11
    17
    mem_load_rom( "dcflash.rom",0x00200000, 0x00020000, 0x357c3568 );
nkeynes@11
    18
nkeynes@2
    19
    sh4_init();
nkeynes@2
    20
    asic_init();
nkeynes@2
    21
    pvr2_init();
nkeynes@2
    22
    aica_init();
nkeynes@2
    23
    ide_reset();
nkeynes@2
    24
nkeynes@2
    25
}
nkeynes@2
    26
nkeynes@2
    27
void dreamcast_reset( void )
nkeynes@2
    28
{
nkeynes@2
    29
    sh4_reset();
nkeynes@2
    30
    mem_reset();
nkeynes@2
    31
//    pvr2_reset();
nkeynes@2
    32
    aica_reset();
nkeynes@2
    33
}
nkeynes@2
    34
nkeynes@2
    35
void dreamcast_stop( void )
nkeynes@2
    36
{
nkeynes@2
    37
    sh4_stop();
nkeynes@2
    38
}
.