/[gxemul]/upstream/0.4.4/src/machines/machine_hpcsh.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/0.4.4/src/machines/machine_hpcsh.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 35 - (show annotations)
Mon Oct 8 16:21:26 2007 UTC (16 years, 7 months ago) by dpavlin
File MIME type: text/plain
File size: 3855 byte(s)
0.4.4
1 /*
2 * Copyright (C) 2005-2007 Anders Gavare. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. The name of the author may not be used to endorse or promote products
13 * derived from this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 *
28 * $Id: machine_hpcsh.c,v 1.7 2006/12/30 13:31:02 debug Exp $
29 */
30
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <string.h>
34
35 #include "cpu.h"
36 #include "device.h"
37 #include "devices.h"
38 #include "machine.h"
39 #include "memory.h"
40 #include "misc.h"
41
42 #include "hpc_bootinfo.h"
43 #include "vripreg.h"
44
45
46 MACHINE_SETUP(hpcsh)
47 {
48 /*
49 char tmpstr[1000];
50 struct hpc_bootinfo hpc_bootinfo;
51 int hpc_platid_flags = 0, hpc_platid_cpu_submodel = 0,
52 hpc_platid_cpu_model = 0, hpc_platid_cpu_series = 0,
53 hpc_platid_cpu_arch = 0,
54 hpc_platid_submodel = 0, hpc_platid_model = 0,
55 hpc_platid_series = 0, hpc_platid_vendor = 0;
56 uint64_t hpc_fb_addr = 0;
57 int hpc_fb_bits = 0, hpc_fb_encoding = 0;
58 int hpc_fb_xsize = 0;
59 int hpc_fb_ysize = 0;
60 int hpc_fb_xsize_mem = 0;
61 int hpc_fb_ysize_mem = 0;
62
63 memset(&hpc_bootinfo, 0, sizeof(hpc_bootinfo));
64 */
65 machine->machine_name = "HPCsh";
66 cpu->byte_order = EMUL_LITTLE_ENDIAN;
67
68 if (!machine->use_x11)
69 fprintf(stderr, "-------------------------------------"
70 "------------------------------------------\n"
71 "\n WARNING! You are emulating a Dreamcast without -X."
72 "\n You will miss graphical output!\n\n"
73 "-------------------------------------"
74 "------------------------------------------\n");
75
76 /* 32 MB in two parts, each included twice (shadowed): */
77 dev_ram_init(machine, 0x0c000000, 0x01000000, DEV_RAM_MIRROR, 0x0);
78 dev_ram_init(machine, 0x0d000000, 0x01000000, DEV_RAM_MIRROR, 0x0);
79 dev_ram_init(machine, 0x0e000000, 0x01000000, DEV_RAM_MIRROR,
80 0x01000000);
81 dev_ram_init(machine, 0x0f000000, 0x01000000, DEV_RAM_MIRROR,
82 0x01000000);
83
84 dev_fb_init(machine, machine->memory, 0x10000000,
85 VFB_HPC, 640,240, 640,240, 16, machine->machine_name);
86 }
87
88
89 MACHINE_DEFAULT_CPU(hpcsh)
90 {
91 machine->cpu_name = strdup("SH7750");
92 }
93
94
95 MACHINE_DEFAULT_RAM(hpcsh)
96 {
97 /* TODO: Model dependent. */
98 machine->physical_ram_in_mb = 32;
99 }
100
101
102 MACHINE_REGISTER(hpcsh)
103 {
104 MR_DEFAULT(hpcsh, "Handhelp SH (HPCsh)", ARCH_SH, MACHINE_HPCSH);
105
106 machine_entry_add_alias(me, "hpcsh");
107
108 machine_entry_add_subtype(me, "Jornada 680",
109 MACHINE_HPCSH_JORNADA680, "jornada680", NULL);
110
111 machine_entry_add_subtype(me, "Jornada 690",
112 MACHINE_HPCSH_JORNADA690, "jornada690", NULL);
113
114 me->set_default_ram = machine_default_ram_hpcsh;
115 }
116

  ViewVC Help
Powered by ViewVC 1.1.26