Search
lxdream.org :: lxdream/src/dreamcast.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 2:42349f6ea216
next11:0a82ef380c45
author nkeynes
date Sat Aug 21 06:15:49 2004 +0000 (16 years ago)
permissions -rw-r--r--
last change Commit changes into cvs
file annotate diff log raw
nkeynes@2
     1
#include "dream.h"
nkeynes@2
     2
#include "mem.h"
nkeynes@2
     3
#include "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@2
    12
    sh4_init();
nkeynes@2
    13
    asic_init();
nkeynes@2
    14
    pvr2_init();
nkeynes@2
    15
    aica_init();
nkeynes@2
    16
    ide_reset();
nkeynes@2
    17
nkeynes@2
    18
    mem_create_ram_region( 0x0C000000, 16 MB, MEM_REGION_MAIN );
nkeynes@2
    19
    mem_create_ram_region( 0x05000000, 8 MB, MEM_REGION_VIDEO );
nkeynes@2
    20
    mem_create_ram_region( 0x00800000, 2 MB, MEM_REGION_AUDIO );
nkeynes@2
    21
    mem_create_ram_region( 0x00703000, 8 KB, MEM_REGION_AUDIO_SCRATCH ); /*???*/
nkeynes@2
    22
    mem_load_rom( "dcboot.rom", 0x00000000, 0x00200000, 0x89f2b1a1 );
nkeynes@2
    23
    mem_load_rom( "dcflash.rom",0x00200000, 0x00020000, 0x357c3568 );
nkeynes@2
    24
}
nkeynes@2
    25
nkeynes@2
    26
void dreamcast_reset( void )
nkeynes@2
    27
{
nkeynes@2
    28
    sh4_reset();
nkeynes@2
    29
    mem_reset();
nkeynes@2
    30
//    pvr2_reset();
nkeynes@2
    31
    aica_reset();
nkeynes@2
    32
}
nkeynes@2
    33
nkeynes@2
    34
void dreamcast_stop( void )
nkeynes@2
    35
{
nkeynes@2
    36
    sh4_stop();
nkeynes@2
    37
}
.