| [src/emu] | drawgfxm.h |
| [src/emu/cpu/alph8201] | 8201dasm.c |
| [src/emu/cpu/arm] | arm.c |
| [src/emu/cpu/arm7] | arm7core.h |
| [src/emu/cpu/cubeqcpu] | cubeqcpu.c |
| [src/emu/cpu/dsp56k] | dsp56k.h dsp56pcu.c |
| [src/emu/cpu/esrip] | esrip.c |
| [src/emu/cpu/g65816] | g65816ds.c |
| [src/emu/cpu/h6280] | h6280.h |
| [src/emu/cpu/h83002] | h8priv.h h8speriph.c |
| [src/emu/cpu/hcd62121] | hcd62121d.c |
| [src/emu/cpu/hd61700] | hd61700d.c |
| [src/emu/cpu/hd6309] | 6309dasm.c |
| [src/emu/cpu/i386] | cycles.h i386dasm.c i386ops.h i386priv.h |
| [src/emu/cpu/i860] | i860dec.c i860dis.c |
| [src/emu/cpu/i960] | i960dis.c |
| [src/emu/cpu/konami] | knmidasm.c |
| [src/emu/cpu/lh5801] | 5801dasm.c |
| [src/emu/cpu/m37710] | m7700ds.c |
| [src/emu/cpu/m68000] | m68k_in.c m68kdasm.c m68kmake.c |
| [src/emu/cpu/m6805] | m6805.c |
| [src/emu/cpu/m6809] | 6809dasm.c |
| [src/emu/cpu/mc68hc11] | hc11dasm.c |
| [src/emu/cpu/minx] | minx.c |
| [src/emu/cpu/mips] | mips3.c |
| [src/emu/cpu/nec] | necdasm.c |
| [src/emu/cpu/powerpc] | ppc.c ppc_dasm.c |
| [src/emu/cpu/saturn] | saturnds.c |
| [src/emu/cpu/scudsp] | scudspdasm.c |
| [src/emu/cpu/sh2] | sh2comn.h |
| [src/emu/cpu/sh4] | sh4comn.h |
| [src/emu/cpu/sharc] | sharc.c sharc.h sharcdsm.h sharcops.h |
| [src/emu/cpu/sm8500] | sm8500.h |
| [src/emu/cpu/spc700] | spc700.c spc700ds.c |
| [src/emu/cpu/superfx] | superfx.c |
| [src/emu/cpu/tlcs900] | 900tbl.c dasm900.c |
| [src/emu/cpu/tms32051] | tms32051.c |
| [src/emu/cpu/tms57002] | tmsmake.c |
| [src/emu/cpu/tms7000] | 7000dasm.c |
| [src/emu/cpu/upd7810] | upd7810.h |
| [src/emu/machine] | 68681.c matsucd.c msm6242.h pc16552d.c rtc9701.h s3520cf.h s3c2400.h s3c2410.h s3c2440.h scsibus.h v3021.h |
| [src/emu/sound] | c140.c c352.h c6280.c digitalk.c discrete.c es5503.h fm.c fm2612.c fmopl.c i5000.h k005289.c k051649.c msm5232.c n63701x.c namco.c s14001a.c x1_010.c ym2151.c ym2413.c ymf262.c ymf271.c ymf278b.c ymz770.h |
| [src/emu/video] | rgbgen.h vector.c |
| [src/lib/formats] | ace_tap.h |
| [src/mame/audio] | cage.c exidy440.c flower.c gomoku.c wiping.c |
| [src/mame/drivers] | firebeat.c konamigx.c konamim2.c maygayv1.c meritm.c namcos23.c taitotz.c vegas.c viper.c |
| [src/mame/includes] | 3do.h atari.h gstriker.h model3.h namcos1.h playch10.h suprnova.h thief.h |
| [src/mame/machine] | cdi070.h kaneko_calc3.c kaneko_calc3.h kaneko_hit.h pxa255.h snes7110.c snescx4.h snessdd1.c stvcd.c znsec.c |
| [src/mame/video] | dc.c kaneko_spr.h mcd212.h model2.c model3.c namcos21.c namcos22.c vdc.c vrender0.c |
| [src/mess/audio] | lynx.c mea8000.c socrates.c svision.c vboy.h |
| [src/mess/devices] | sonydriv.c |
| [src/mess/drivers] | a2600.c cgenie.c gba.c hp49gp.c ip20.c ip22.c juicebox.c ng_aes.c pc8801.c pc88va.c pockstat.c psx.c ptcsol.c rvoice.c sgi_ip6.c |
| [src/mess/formats] | timex_dck.h |
| [src/mess/includes] | amstrad.h apple1.h bebox.h c64_legacy.h c65.h cgenie.h channelf.h compis.h concept.h cxhumax.h cybiko.h dgn_beta.h electron.h fm7.h gamecom.h gamepock.h gb.h gmaster.h gp32.h hp48.h intv.h lynx.h mbc55x.h msx_slot.h nascom1.h nes.h odyssey2.h oric.h pce.h pet.h pokemini.h rmnimbus.h sorcerer.h spectrum.h ssystem3.h svi318.h svision.h vc4000.h wswan.h x07.h x1.h z80ne.h |
| [src/mess/machine] | 3c505.h amigacd.c amigacrt.c amigakbd.c apollo_net.c at45dbxx.c corvushd.c mboard.h mc68328.h mc6843.c mc6846.c mc6854.c rmnimbus.c s3c44b0.h sgi.c strata.c |
| [src/mess/tools/imgtool] | library.h |
| [src/mess/tools/imgtool/modules] | thomson.c |
| [src/mess/video] | 733_asr.c crt.c newport.c |
trunk/src/mame/machine/kaneko_hit.h
| r17909 | r17910 | |
| 1 | 1 | /* Kaneko Hit protection */ |
| 2 | 2 | |
| 3 | 3 | |
| 4 | | typedef struct |
| 4 | struct calc1_hit_t |
| 5 | 5 | { |
| 6 | 6 | UINT16 x1p, y1p, x1s, y1s; |
| 7 | 7 | UINT16 x2p, y2p, x2s, y2s; |
| r17909 | r17910 | |
| 9 | 9 | INT16 x12, y12, x21, y21; |
| 10 | 10 | |
| 11 | 11 | UINT16 mult_a, mult_b; |
| 12 | | } calc1_hit_t; |
| 12 | }; |
| 13 | 13 | |
| 14 | | typedef struct |
| 14 | struct calc3_hit_t |
| 15 | 15 | { |
| 16 | 16 | int x1p, y1p, z1p, x1s, y1s, z1s; |
| 17 | 17 | int x2p, y2p, z2p, x2s, y2s, z2s; |
| r17909 | r17910 | |
| 29 | 29 | |
| 30 | 30 | UINT16 flags; |
| 31 | 31 | UINT16 mode; |
| 32 | | } calc3_hit_t; |
| 32 | }; |
| 33 | 33 | |
| 34 | 34 | |
| 35 | 35 | |
trunk/src/mame/machine/pxa255.h
| r17909 | r17910 | |
| 163 | 163 | #define PXA255_DCMD_WIDTH_2 (0x00008000) |
| 164 | 164 | #define PXA255_DCMD_WIDTH_4 (0x0000c000) |
| 165 | 165 | |
| 166 | | typedef struct |
| 166 | struct PXA255_DMA_Regs |
| 167 | 167 | { |
| 168 | 168 | UINT32 dcsr[16]; |
| 169 | 169 | |
| r17909 | r17910 | |
| 183 | 183 | UINT32 dcmd[16]; |
| 184 | 184 | |
| 185 | 185 | emu_timer* timer[16]; |
| 186 | | } PXA255_DMA_Regs; |
| 186 | }; |
| 187 | 187 | |
| 188 | 188 | /* |
| 189 | 189 | |
| r17909 | r17910 | |
| 230 | 230 | #define PXA255_SADIV (PXA255_I2S_BASE_ADDR + 0x00000060) |
| 231 | 231 | #define PXA255_SADR (PXA255_I2S_BASE_ADDR + 0x00000080) |
| 232 | 232 | |
| 233 | | typedef struct |
| 233 | struct PXA255_I2S_Regs |
| 234 | 234 | { |
| 235 | 235 | UINT32 sacr0; |
| 236 | 236 | UINT32 sacr1; |
| r17909 | r17910 | |
| 251 | 251 | UINT32 pad3[6]; |
| 252 | 252 | |
| 253 | 253 | UINT32 sadr; |
| 254 | | } PXA255_I2S_Regs; |
| 254 | }; |
| 255 | 255 | |
| 256 | 256 | /* |
| 257 | 257 | |
| r17909 | r17910 | |
| 279 | 279 | #define PXA255_OIER_E2 (0x00000004) |
| 280 | 280 | #define PXA255_OIER_E3 (0x00000008) |
| 281 | 281 | |
| 282 | | typedef struct |
| 282 | struct PXA255_OSTMR_Regs |
| 283 | 283 | { |
| 284 | 284 | UINT32 osmr[4]; |
| 285 | 285 | UINT32 oscr; |
| r17909 | r17910 | |
| 288 | 288 | UINT32 oier; |
| 289 | 289 | |
| 290 | 290 | emu_timer* timer[4]; |
| 291 | | } PXA255_OSTMR_Regs; |
| 291 | }; |
| 292 | 292 | |
| 293 | 293 | /* |
| 294 | 294 | |
| r17909 | r17910 | |
| 331 | 331 | #define PXA255_INT_RTC_HZ (1 << 30) |
| 332 | 332 | #define PXA255_INT_RTC_ALARM (1 << 31) |
| 333 | 333 | |
| 334 | | typedef struct |
| 334 | struct PXA255_INTC_Regs |
| 335 | 335 | { |
| 336 | 336 | UINT32 icip; |
| 337 | 337 | UINT32 icmr; |
| r17909 | r17910 | |
| 339 | 339 | UINT32 icfp; |
| 340 | 340 | UINT32 icpr; |
| 341 | 341 | UINT32 iccr; |
| 342 | | } PXA255_INTC_Regs; |
| 342 | }; |
| 343 | 343 | |
| 344 | 344 | /* |
| 345 | 345 | |
| r17909 | r17910 | |
| 378 | 378 | #define PXA255_GAFR2_L (PXA255_GPIO_BASE_ADDR + 0x00000064) |
| 379 | 379 | #define PXA255_GAFR2_U (PXA255_GPIO_BASE_ADDR + 0x00000068) |
| 380 | 380 | |
| 381 | | typedef struct |
| 381 | struct PXA255_GPIO_Regs |
| 382 | 382 | { |
| 383 | 383 | UINT32 gplr0; // GPIO Pin-Leve |
| 384 | 384 | UINT32 gplr1; |
| r17909 | r17910 | |
| 414 | 414 | UINT32 gafr1u; |
| 415 | 415 | UINT32 gafr2l; |
| 416 | 416 | UINT32 gafr2u; |
| 417 | | } PXA255_GPIO_Regs; |
| 417 | }; |
| 418 | 418 | |
| 419 | 419 | /* |
| 420 | 420 | |
| r17909 | r17910 | |
| 476 | 476 | #define PXA255_FIDR1 (PXA255_LCD_BASE_ADDR + 0x00000218) |
| 477 | 477 | #define PXA255_LDCMD1 (PXA255_LCD_BASE_ADDR + 0x0000021c) |
| 478 | 478 | |
| 479 | | typedef struct |
| 479 | struct PXA255_LCD_DMA_Regs |
| 480 | 480 | { |
| 481 | 481 | UINT32 fdadr; |
| 482 | 482 | UINT32 fsadr; |
| 483 | 483 | UINT32 fidr; |
| 484 | 484 | UINT32 ldcmd; |
| 485 | 485 | emu_timer *eof; |
| 486 | | } PXA255_LCD_DMA_Regs; |
| 486 | }; |
| 487 | 487 | |
| 488 | | typedef struct |
| 488 | struct PXA255_LCD_Regs |
| 489 | 489 | { |
| 490 | 490 | UINT32 lccr0; |
| 491 | 491 | UINT32 lccr1; |
| r17909 | r17910 | |
| 506 | 506 | UINT32 pad2[110]; |
| 507 | 507 | |
| 508 | 508 | PXA255_LCD_DMA_Regs dma[2]; |
| 509 | | } PXA255_LCD_Regs; |
| 509 | }; |
trunk/src/mame/machine/cdi070.h
| r17909 | r17910 | |
| 24 | 24 | |
| 25 | 25 | #include "emu.h" |
| 26 | 26 | |
| 27 | | typedef struct |
| 27 | struct scc68070_i2c_regs_t |
| 28 | 28 | { |
| 29 | 29 | UINT8 reserved0; |
| 30 | 30 | UINT8 data_register; |
| r17909 | r17910 | |
| 36 | 36 | UINT8 control_register; |
| 37 | 37 | UINT8 reserved; |
| 38 | 38 | UINT8 clock_control_register; |
| 39 | | } scc68070_i2c_regs_t; |
| 39 | }; |
| 40 | 40 | |
| 41 | 41 | #define ISR_MST 0x80 // Master |
| 42 | 42 | #define ISR_TRX 0x40 // Transmitter |
| r17909 | r17910 | |
| 47 | 47 | #define ISR_AD0 0x02 // Address Zero |
| 48 | 48 | #define ISR_LRB 0x01 // Last Received Bit |
| 49 | 49 | |
| 50 | | typedef struct |
| 50 | struct scc68070_uart_regs_t |
| 51 | 51 | { |
| 52 | 52 | UINT8 reserved0; |
| 53 | 53 | UINT8 mode_register; |
| r17909 | r17910 | |
| 69 | 69 | INT16 transmit_pointer; |
| 70 | 70 | UINT8 transmit_buffer[32768]; |
| 71 | 71 | emu_timer* tx_timer; |
| 72 | | } scc68070_uart_regs_t; |
| 72 | }; |
| 73 | 73 | |
| 74 | 74 | #define UMR_OM 0xc0 |
| 75 | 75 | #define UMR_OM_NORMAL 0x00 |
| r17909 | r17910 | |
| 90 | 90 | #define USR_TXRDY 0x04 |
| 91 | 91 | #define USR_RXRDY 0x01 |
| 92 | 92 | |
| 93 | | typedef struct |
| 93 | struct scc68070_timer_regs_t |
| 94 | 94 | { |
| 95 | 95 | UINT8 timer_status_register; |
| 96 | 96 | UINT8 timer_control_register; |
| r17909 | r17910 | |
| 99 | 99 | UINT16 timer1; |
| 100 | 100 | UINT16 timer2; |
| 101 | 101 | emu_timer* timer0_timer; |
| 102 | | } scc68070_timer_regs_t; |
| 102 | }; |
| 103 | 103 | |
| 104 | 104 | #define TSR_OV0 0x80 |
| 105 | 105 | #define TSR_MA1 0x40 |
| r17909 | r17910 | |
| 130 | 130 | #define TCR_M2_CAPTURE 0x02 |
| 131 | 131 | #define TCR_M2_COUNT 0x03 |
| 132 | 132 | |
| 133 | | typedef struct |
| 133 | struct scc68070_dma_channel_t |
| 134 | 134 | { |
| 135 | 135 | UINT8 channel_status; |
| 136 | 136 | UINT8 channel_error; |
| r17909 | r17910 | |
| 153 | 153 | UINT32 device_address_counter; |
| 154 | 154 | |
| 155 | 155 | UINT8 reserved3[40]; |
| 156 | | } scc68070_dma_channel_t; |
| 156 | }; |
| 157 | 157 | |
| 158 | 158 | #define CSR_COC 0x80 |
| 159 | 159 | #define CSR_NDT 0x20 |
| r17909 | r17910 | |
| 193 | 193 | #define CCR_INE 0x08 |
| 194 | 194 | #define CCR_IPL 0x07 |
| 195 | 195 | |
| 196 | | typedef struct |
| 196 | struct scc68070_dma_regs_t |
| 197 | 197 | { |
| 198 | 198 | scc68070_dma_channel_t channel[2]; |
| 199 | | } scc68070_dma_regs_t; |
| 199 | }; |
| 200 | 200 | |
| 201 | | typedef struct |
| 201 | struct scc68070_mmu_desc_t |
| 202 | 202 | { |
| 203 | 203 | UINT16 attr; |
| 204 | 204 | UINT16 length; |
| 205 | 205 | UINT8 undefined; |
| 206 | 206 | UINT8 segment; |
| 207 | 207 | UINT16 base; |
| 208 | | } scc68070_mmu_desc_t; |
| 208 | }; |
| 209 | 209 | |
| 210 | | typedef struct |
| 210 | struct scc68070_mmu_regs_t |
| 211 | 211 | { |
| 212 | 212 | UINT8 status; |
| 213 | 213 | UINT8 control; |
| r17909 | r17910 | |
| 215 | 215 | UINT8 reserved[0x3e]; |
| 216 | 216 | |
| 217 | 217 | scc68070_mmu_desc_t desc[8]; |
| 218 | | } scc68070_mmu_regs_t; |
| 218 | }; |
| 219 | 219 | |
| 220 | | typedef struct |
| 220 | struct scc68070_regs_t |
| 221 | 221 | { |
| 222 | 222 | UINT16 lir; |
| 223 | 223 | UINT8 picr1; |
| r17909 | r17910 | |
| 228 | 228 | scc68070_timer_regs_t timers; |
| 229 | 229 | scc68070_dma_regs_t dma; |
| 230 | 230 | scc68070_mmu_regs_t mmu; |
| 231 | | } scc68070_regs_t; |
| 231 | }; |
| 232 | 232 | |
| 233 | 233 | // Member functions |
| 234 | 234 | TIMER_CALLBACK( scc68070_timer0_callback ); |
trunk/src/mame/includes/3do.h
| r17909 | r17910 | |
| 7 | 7 | #ifndef _3DO_H_ |
| 8 | 8 | #define _3DO_H_ |
| 9 | 9 | |
| 10 | | typedef struct { |
| 10 | struct SLOW2 { |
| 11 | 11 | /* 03180000 - 0318003f - configuration group */ |
| 12 | 12 | /* 03180040 - 0318007f - diagnostic UART */ |
| 13 | 13 | |
| r17909 | r17910 | |
| 15 | 15 | UINT8 cg_w_count; |
| 16 | 16 | UINT32 cg_input; |
| 17 | 17 | UINT32 cg_output; |
| 18 | | } SLOW2; |
| 18 | }; |
| 19 | 19 | |
| 20 | 20 | |
| 21 | | typedef struct { |
| 21 | struct MADAM { |
| 22 | 22 | UINT32 revision; /* 03300000 */ |
| 23 | 23 | UINT32 msysbits; /* 03300004 */ |
| 24 | 24 | UINT32 mctl; /* 03300008 */ |
| r17909 | r17910 | |
| 51 | 51 | UINT32 mult[40]; /* 03300600-0330069c */ |
| 52 | 52 | UINT32 mult_control; /* 033007f0-033007f4 */ |
| 53 | 53 | UINT32 mult_status; /* 033007f8 */ |
| 54 | | } MADAM; |
| 54 | }; |
| 55 | 55 | |
| 56 | 56 | |
| 57 | | typedef struct { |
| 57 | struct CLIO { |
| 58 | 58 | screen_device *screen; |
| 59 | 59 | |
| 60 | 60 | UINT32 revision; /* 03400000 */ |
| r17909 | r17910 | |
| 150 | 150 | UINT32 uncle_soft_rev; /* 0340c004 */ |
| 151 | 151 | UINT32 uncle_addr; /* 0340c008 */ |
| 152 | 152 | UINT32 uncle_rom; /* 0340c00c */ |
| 153 | | } CLIO; |
| 153 | }; |
| 154 | 154 | |
| 155 | 155 | |
| 156 | | typedef struct { |
| 156 | struct SVF { |
| 157 | 157 | UINT32 sport[512]; |
| 158 | 158 | UINT32 color; |
| 159 | | } SVF; |
| 159 | }; |
| 160 | 160 | |
| 161 | 161 | |
| 162 | 162 | class _3do_state : public driver_device |
trunk/src/mame/includes/atari.h
| r17909 | r17910 | |
| 208 | 208 | } ANTIC_W; /* write registers */ |
| 209 | 209 | |
| 210 | 210 | /* per scanline buffer for video data (and optimization variables) */ |
| 211 | | typedef struct { |
| 211 | struct VIDEO { |
| 212 | 212 | UINT32 cmd; /* antic command for this scanline */ |
| 213 | 213 | UINT16 data[HWIDTH]; /* graphics data buffer (text through chargen) */ |
| 214 | | } VIDEO; |
| 214 | }; |
| 215 | 215 | |
| 216 | 216 | typedef void (*atari_renderer_func)(address_space *space, VIDEO *video); |
| 217 | 217 | |
| 218 | | typedef struct { |
| 218 | struct ANTIC { |
| 219 | 219 | atari_renderer_func renderer; /* current renderer */ |
| 220 | 220 | UINT32 cmd; /* currently executed display list command */ |
| 221 | 221 | UINT32 steal_cycles; /* steal how many cpu cycles for this line ? */ |
| r17909 | r17910 | |
| 261 | 261 | UINT8 *uc_g2; /* used colors for gfx GTIA 2 */ |
| 262 | 262 | UINT8 *uc_g3; /* used colors for gfx GTIA 3 */ |
| 263 | 263 | bitmap_ind16 *bitmap; |
| 264 | | } ANTIC; |
| 264 | }; |
| 265 | 265 | |
| 266 | 266 | #define RDANTIC(space) space->read_byte(antic.dpage+antic.doffs) |
| 267 | 267 | #define RDVIDEO(space,o) space->read_byte(antic.vpage+((antic.voffs+(o))&VOFFS)) |
trunk/src/mame/video/vdc.c
| r17909 | r17910 | |
| 20 | 20 | |
| 21 | 21 | /* the VDC context */ |
| 22 | 22 | |
| 23 | | typedef struct |
| 23 | struct VDC |
| 24 | 24 | { |
| 25 | 25 | int dvssr_write; /* Set when the DVSSR register has been written to */ |
| 26 | 26 | int physical_width; /* Width of the display */ |
| r17909 | r17910 | |
| 39 | 39 | pair vdc_data[32]; |
| 40 | 40 | int status; |
| 41 | 41 | int y_scroll; |
| 42 | | }VDC; |
| 42 | }; |
| 43 | 43 | |
| 44 | | typedef struct { |
| 44 | struct VCE { |
| 45 | 45 | UINT8 vce_control; /* VCE control register */ |
| 46 | 46 | pair vce_address; /* Current address in the palette */ |
| 47 | 47 | pair vce_data[512]; /* Palette data */ |
| 48 | 48 | int current_bitmap_line; /* The current line in the display we are on */ |
| 49 | 49 | bitmap_ind16 *bmp; |
| 50 | | }VCE; |
| 50 | }; |
| 51 | 51 | |
| 52 | | typedef struct { |
| 52 | struct VPC_PRIO { |
| 53 | 53 | UINT8 prio; |
| 54 | 54 | UINT8 vdc0_enabled; |
| 55 | 55 | UINT8 vdc1_enabled; |
| 56 | | } VPC_PRIO; |
| 56 | }; |
| 57 | 57 | |
| 58 | | typedef struct { |
| 58 | struct VPC { |
| 59 | 59 | VPC_PRIO vpc_prio[4]; |
| 60 | 60 | UINT8 prio_map[512]; /* Pre-calculated priority map */ |
| 61 | 61 | pair priority; /* Priority settings registers */ |
| 62 | 62 | pair window1; /* Window 1 setting */ |
| 63 | 63 | pair window2; /* Window 2 setting */ |
| 64 | 64 | UINT8 vdc_select; /* Which VDC do the ST0, ST1, and ST2 instructions write to */ |
| 65 | | }VPC; |
| 65 | }; |
| 66 | 66 | |
| 67 | 67 | static VDC vdc[2]; |
| 68 | 68 | static VCE vce; |
trunk/src/mame/video/dc.c
| r17909 | r17910 | |
| 150 | 150 | float x, y, w, u, v; |
| 151 | 151 | } vert; |
| 152 | 152 | |
| 153 | | typedef struct |
| 153 | struct strip |
| 154 | 154 | { |
| 155 | 155 | int svert, evert; |
| 156 | 156 | texinfo ti; |
| 157 | | } strip; |
| 157 | }; |
| 158 | 158 | |
| 159 | | typedef struct { |
| 159 | struct receiveddata { |
| 160 | 160 | vert verts[65536]; |
| 161 | 161 | strip strips[65536]; |
| 162 | 162 | |
| r17909 | r17910 | |
| 166 | 166 | UINT32 fbwsof2; |
| 167 | 167 | int busy; |
| 168 | 168 | int valid; |
| 169 | | } receiveddata; |
| 169 | }; |
| 170 | 170 | |
| 171 | | typedef struct { |
| 171 | struct pvrta_state { |
| 172 | 172 | int tafifo_pos, tafifo_mask, tafifo_vertexwords, tafifo_listtype; |
| 173 | 173 | int start_render_received; |
| 174 | 174 | int renderselect; |
| r17909 | r17910 | |
| 184 | 184 | UINT32 blend_mode, srcselect,dstselect,fogcontrol,colorclamp, use_alpha; |
| 185 | 185 | UINT32 ignoretexalpha,flipuv,clampuv,filtermode,sstexture,mmdadjust,tsinstruction; |
| 186 | 186 | UINT32 depthcomparemode,cullingmode,zwritedisable,cachebypass,dcalcctrl,volumeinstruction,mipmapped,vqcompressed,strideselect,paletteselector; |
| 187 | | } pvrta_state; |
| 187 | }; |
| 188 | 188 | |
| 189 | 189 | enum |
| 190 | 190 | { |
trunk/src/mame/drivers/namcos23.c
| r17909 | r17910 | |
| 1269 | 1269 | enum { RENDER_MAX_ENTRIES = 1000, POLY_MAX_ENTRIES = 10000 }; |
| 1270 | 1270 | |
| 1271 | 1271 | |
| 1272 | | typedef struct |
| 1272 | struct c417_t |
| 1273 | 1273 | { |
| 1274 | 1274 | UINT16 ram[0x10000]; |
| 1275 | 1275 | UINT16 adr; |
| 1276 | 1276 | UINT32 pointrom_adr; |
| 1277 | | } c417_t; |
| 1277 | }; |
| 1278 | 1278 | |
| 1279 | | typedef struct |
| 1279 | struct c412_t |
| 1280 | 1280 | { |
| 1281 | 1281 | UINT16 sdram_a[0x100000]; // Framebuffers, probably |
| 1282 | 1282 | UINT16 sdram_b[0x100000]; |
| 1283 | 1283 | UINT16 sram[0x20000]; // Ram-based tiles for rendering |
| 1284 | 1284 | UINT16 pczram[0x200]; // Ram-based tilemap for rendering, or something else |
| 1285 | 1285 | UINT32 adr; |
| 1286 | | } c412_t; |
| 1286 | }; |
| 1287 | 1287 | |
| 1288 | | typedef struct |
| 1288 | struct c421_t |
| 1289 | 1289 | { |
| 1290 | 1290 | UINT16 dram_a[0x40000]; |
| 1291 | 1291 | UINT16 dram_b[0x40000]; |
| 1292 | 1292 | UINT16 sram[0x8000]; |
| 1293 | 1293 | UINT32 adr; |
| 1294 | | } c421_t; |
| 1294 | }; |
| 1295 | 1295 | |
| 1296 | | typedef struct |
| 1296 | struct c422_t |
| 1297 | 1297 | { |
| 1298 | 1298 | INT16 regs[0x10]; |
| 1299 | | } c422_t; |
| 1299 | }; |
| 1300 | 1300 | |
| 1301 | | typedef struct |
| 1301 | struct c361_t |
| 1302 | 1302 | { |
| 1303 | 1303 | emu_timer *timer; |
| 1304 | 1304 | int scanline; |
| 1305 | | } c361_t; |
| 1305 | }; |
| 1306 | 1306 | |
| 1307 | | typedef struct |
| 1307 | struct render_t |
| 1308 | 1308 | { |
| 1309 | 1309 | poly_manager *polymgr; |
| 1310 | 1310 | int cur; |
| r17909 | r17910 | |
| 1313 | 1313 | namcos23_render_entry entries[2][RENDER_MAX_ENTRIES]; |
| 1314 | 1314 | namcos23_poly_entry polys[POLY_MAX_ENTRIES]; |
| 1315 | 1315 | namcos23_poly_entry *poly_order[POLY_MAX_ENTRIES]; |
| 1316 | | } render_t; |
| 1316 | }; |
| 1317 | 1317 | |
| 1318 | 1318 | class namcos23_state : public driver_device |
| 1319 | 1319 | { |
trunk/src/emu/cpu/h83002/h8speriph.c
| r17909 | r17910 | |
| 1158 | 1158 | // SERIAL CONTROLLER INTERFACE // |
| 1159 | 1159 | ///////////////////////////////// |
| 1160 | 1160 | |
| 1161 | | typedef struct |
| 1161 | struct H8S_SCI_ENTRY |
| 1162 | 1162 | { |
| 1163 | 1163 | UINT32 reg_smr, reg_brr, reg_scr, reg_tdr, reg_ssr, reg_rdr; |
| 1164 | 1164 | UINT32 reg_pdr, reg_port; |
| 1165 | 1165 | UINT8 port_mask_sck, port_mask_txd, port_mask_rxd; |
| 1166 | 1166 | UINT8 int_tx, int_rx; |
| 1167 | | } H8S_SCI_ENTRY; |
| 1167 | }; |
| 1168 | 1168 | |
| 1169 | 1169 | const H8S_SCI_ENTRY H8S_SCI_TABLE[] = |
| 1170 | 1170 | { |
trunk/src/emu/cpu/m68000/m68kmake.c
| r17909 | r17910 | |
| 175 | 175 | |
| 176 | 176 | |
| 177 | 177 | /* Everything we need to know about an opcode */ |
| 178 | | typedef struct |
| 178 | struct opcode_struct |
| 179 | 179 | { |
| 180 | 180 | char name[MAX_NAME_LENGTH]; /* opcode handler name */ |
| 181 | 181 | unsigned char size; /* Size of operation */ |
| r17909 | r17910 | |
| 188 | 188 | char cpu_mode[NUM_CPUS]; /* User or supervisor mode */ |
| 189 | 189 | char cpus[NUM_CPUS+1]; /* Allowed CPUs */ |
| 190 | 190 | unsigned char cycles[NUM_CPUS]; /* cycles for 000, 010, 020, 030, 040 */ |
| 191 | | } opcode_struct; |
| 191 | }; |
| 192 | 192 | |
| 193 | 193 | |
| 194 | 194 | /* All modifications necessary for a specific EA mode of an instruction */ |
| 195 | | typedef struct |
| 195 | struct ea_info_struct |
| 196 | 196 | { |
| 197 | 197 | const char* fname_add; |
| 198 | 198 | const char* ea_add; |
| 199 | 199 | unsigned int mask_add; |
| 200 | 200 | unsigned int match_add; |
| 201 | | } ea_info_struct; |
| 201 | }; |
| 202 | 202 | |
| 203 | 203 | |
| 204 | 204 | /* Holds the body of a function */ |
| 205 | | typedef struct |
| 205 | struct body_struct |
| 206 | 206 | { |
| 207 | 207 | char body[MAX_BODY_LENGTH][MAX_LINE_LENGTH+1]; |
| 208 | 208 | int length; |
| 209 | | } body_struct; |
| 209 | }; |
| 210 | 210 | |
| 211 | 211 | |
| 212 | 212 | /* Holds a sequence of search / replace strings */ |
| 213 | | typedef struct |
| 213 | struct replace_struct |
| 214 | 214 | { |
| 215 | 215 | char replace[MAX_REPLACE_LENGTH][2][MAX_LINE_LENGTH+1]; |
| 216 | 216 | int length; |
| 217 | | } replace_struct; |
| 217 | }; |
| 218 | 218 | |
| 219 | 219 | |
| 220 | 220 | /* Function Prototypes */ |
trunk/src/emu/cpu/tms57002/tmsmake.c
| r17909 | r17910 | |
| 31 | 31 | |
| 32 | 32 | enum { PA, PC, PD, PD24, PI, PML, PMO, PMV, PB, PWA, PWC, PWD, SFAI }; |
| 33 | 33 | |
| 34 | | typedef struct { |
| 34 | struct instr { |
| 35 | 35 | char *name; |
| 36 | 36 | char *dasm; |
| 37 | 37 | char *run; |
| 38 | 38 | int line, cycles, type, baseval, variants; |
| 39 | 39 | unsigned int flags; |
| 40 | | } instr; |
| 40 | }; |
| 41 | 41 | |
| 42 | | typedef struct { |
| 42 | struct pdesc { |
| 43 | 43 | const char *opt; |
| 44 | 44 | int pcount, id; |
| 45 | | } pdesc; |
| 45 | }; |
| 46 | 46 | |
| 47 | | typedef struct { |
| 47 | struct pinf { |
| 48 | 48 | const char *start; |
| 49 | 49 | int size; |
| 50 | 50 | int id; |
| 51 | 51 | int pcount; |
| 52 | 52 | int ppos[4]; |
| 53 | | } pinf; |
| 53 | }; |
| 54 | 54 | |
| 55 | 55 | static const pdesc pp_r[] = { |
| 56 | 56 | { "a", 0, PA }, |
| r17909 | r17910 | |
| 74 | 74 | static pinf parse_res[4096]; |
| 75 | 75 | static int parse_count; |
| 76 | 76 | |
| 77 | | typedef struct { |
| 77 | struct vinfo { |
| 78 | 78 | unsigned int mask; |
| 79 | 79 | int variants; |
| 80 | 80 | const char *name; |
| 81 | 81 | const char *getter; |
| 82 | | } vinfo; |
| 82 | }; |
| 83 | 83 | |
| 84 | 84 | enum { IxCMODE, IxDMODE, IxSFAI, IxCRM, IxDBP, IxSFAO, IxSFMO, IxRND, IxMOVM, IxSFMA, IxCOUNT }; |
| 85 | 85 | |
trunk/src/emu/cpu/dsp56k/dsp56k.h
| r17909 | r17910 | |
| 30 | 30 | STRUCTURES & TYPEDEFS |
| 31 | 31 | ***************************************************************************/ |
| 32 | 32 | // 5-4 Host Interface |
| 33 | | typedef struct |
| 33 | struct dsp56k_host_interface |
| 34 | 34 | { |
| 35 | 35 | // **** Dsp56k side **** // |
| 36 | 36 | // Host Control Register |
| r17909 | r17910 | |
| 62 | 62 | // HACK - Host interface bootstrap write offset |
| 63 | 63 | UINT16 bootstrap_offset; |
| 64 | 64 | |
| 65 | | } dsp56k_host_interface; |
| 65 | }; |
| 66 | 66 | |
| 67 | 67 | // 1-9 ALU |
| 68 | | typedef struct |
| 68 | struct dsp56k_data_alu |
| 69 | 69 | { |
| 70 | 70 | // Four 16-bit input registers (can be accessed as 2 32-bit registers) |
| 71 | 71 | PAIR x; |
| r17909 | r17910 | |
| 79 | 79 | // One data bus shifter/limiter |
| 80 | 80 | // A parallel, single cycle, non-pipelined Multiply-Accumulator (MAC) unit |
| 81 | 81 | // Basics |
| 82 | | } dsp56k_data_alu; |
| 82 | }; |
| 83 | 83 | |
| 84 | 84 | // 1-10 Address Generation Unit (AGU) |
| 85 | | typedef struct |
| 85 | struct dsp56k_agu |
| 86 | 86 | { |
| 87 | 87 | // Four address registers |
| 88 | 88 | UINT16 r0; |
| r17909 | r17910 | |
| 109 | 109 | // UINT8 status; |
| 110 | 110 | |
| 111 | 111 | // Basics |
| 112 | | } dsp56k_agu; |
| 112 | }; |
| 113 | 113 | |
| 114 | 114 | // 1-11 Program Control Unit (PCU) |
| 115 | | typedef struct |
| 115 | struct dsp56k_pcu |
| 116 | 116 | { |
| 117 | 117 | // Program Counter |
| 118 | 118 | UINT16 pc; |
| r17909 | r17910 | |
| 146 | 146 | // Other PCU internals |
| 147 | 147 | UINT16 reset_vector; |
| 148 | 148 | |
| 149 | | } dsp56k_pcu; |
| 149 | }; |
| 150 | 150 | |
| 151 | 151 | // 1-8 The dsp56156 CORE |
| 152 | | typedef struct |
| 152 | struct dsp56k_core |
| 153 | 153 | { |
| 154 | 154 | // PROGRAM CONTROLLER |
| 155 | 155 | dsp56k_pcu PCU; |
| r17909 | r17910 | |
| 197 | 197 | |
| 198 | 198 | UINT16 peripheral_ram[0x40]; |
| 199 | 199 | UINT16 program_ram[0x800]; |
| 200 | | } dsp56k_core; |
| 200 | }; |
| 201 | 201 | |
| 202 | 202 | |
| 203 | 203 | INLINE dsp56k_core *get_safe_token(device_t *device) |
trunk/src/emu/cpu/tms7000/7000dasm.c
| r17909 | r17910 | |
| 4 | 4 | |
| 5 | 5 | typedef enum { DONE, NONE, UI8, I8, UI16, I16, PCREL, PCABS, TRAP } operandtype; |
| 6 | 6 | |
| 7 | | typedef struct { |
| 7 | struct oprandinfo { |
| 8 | 8 | char opstr[4][12]; |
| 9 | 9 | operandtype decode[4]; |
| 10 | | } oprandinfo; |
| 10 | }; |
| 11 | 11 | |
| 12 | | typedef struct { |
| 12 | struct opcodeinfo { |
| 13 | 13 | int opcode; |
| 14 | 14 | char name[8]; |
| 15 | 15 | int operand; |
| 16 | 16 | UINT32 s_flag; |
| 17 | | } opcodeinfo; |
| 17 | }; |
| 18 | 18 | |
| 19 | 19 | static const oprandinfo of[] = { |
| 20 | 20 | /* 00 */ { {" B,A", "", "", ""}, {NONE, DONE, DONE, DONE} }, |
trunk/src/emu/video/rgbgen.h
| r17909 | r17910 | |
| 18 | 18 | ***************************************************************************/ |
| 19 | 19 | |
| 20 | 20 | /* intermediate RGB values are stored in a struct */ |
| 21 | | typedef struct { INT16 dummy, r, g, b; } rgbint; |
| 21 | struct rgbint { INT16 dummy, r, g, b; }; |
| 22 | 22 | |
| 23 | 23 | /* intermediate RGB values are stored in a struct */ |
| 24 | | typedef struct { INT16 a, r, g, b; } rgbaint; |
| 24 | struct rgbaint { INT16 a, r, g, b; }; |
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | |
trunk/src/emu/sound/ym2413.c
| r17909 | r17910 | |
| 164 | 164 | |
| 165 | 165 | |
| 166 | 166 | |
| 167 | | typedef struct |
| 167 | struct OPLL_SLOT |
| 168 | 168 | { |
| 169 | 169 | UINT32 ar; /* attack rate: AR<<2 */ |
| 170 | 170 | UINT32 dr; /* decay rate: DR<<2 */ |
| r17909 | r17910 | |
| 207 | 207 | |
| 208 | 208 | /* waveform select */ |
| 209 | 209 | unsigned int wavetable; |
| 210 | | } OPLL_SLOT; |
| 210 | }; |
| 211 | 211 | |
| 212 | | typedef struct |
| 212 | struct OPLL_CH |
| 213 | 213 | { |
| 214 | 214 | OPLL_SLOT SLOT[2]; |
| 215 | 215 | /* phase generator state */ |
| r17909 | r17910 | |
| 218 | 218 | UINT32 ksl_base; /* KeyScaleLevel Base step */ |
| 219 | 219 | UINT8 kcode; /* key code (for key scaling) */ |
| 220 | 220 | UINT8 sus; /* sus on/off (release speed in percussive mode)*/ |
| 221 | | } OPLL_CH; |
| 221 | }; |
| 222 | 222 | |
| 223 | 223 | /* chip state */ |
| 224 | | typedef struct |
| 224 | struct YM2413 |
| 225 | 225 | { |
| 226 | 226 | OPLL_CH P_CH[9]; /* OPLL chips have 9 channels*/ |
| 227 | 227 | UINT8 instvol_r[9]; /* instrument/volume (or volume/volume in percussive mode)*/ |
| r17909 | r17910 | |
| 272 | 272 | signed int output[2]; |
| 273 | 273 | signed int outchan; |
| 274 | 274 | |
| 275 | | } YM2413; |
| 275 | }; |
| 276 | 276 | |
| 277 | 277 | /* key scale level */ |
| 278 | 278 | /* table is 3dB/octave, DV converts this into 6dB/octave */ |
trunk/src/emu/sound/fm2612.c
| r17909 | r17910 | |
| 531 | 531 | |
| 532 | 532 | |
| 533 | 533 | /* struct describing a single operator (SLOT) */ |
| 534 | | typedef struct |
| 534 | struct FM_SLOT |
| 535 | 535 | { |
| 536 | 536 | INT32 *DT; /* detune :dt_tab[DT] */ |
| 537 | 537 | UINT8 KSR; /* key scale rate :3-KSR */ |
| r17909 | r17910 | |
| 570 | 570 | /* LFO */ |
| 571 | 571 | UINT32 AMmask; /* AM enable flag */ |
| 572 | 572 | |
| 573 | | } FM_SLOT; |
| 573 | }; |
| 574 | 574 | |
| 575 | | typedef struct |
| 575 | struct FM_CH |
| 576 | 576 | { |
| 577 | 577 | FM_SLOT SLOT[4]; /* four SLOTs (operators) */ |
| 578 | 578 | |
| r17909 | r17910 | |
| 594 | 594 | UINT32 fc; /* fnum,blk:adjusted to sample rate */ |
| 595 | 595 | UINT8 kcode; /* key code: */ |
| 596 | 596 | UINT32 block_fnum; /* current blk/fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ |
| 597 | | } FM_CH; |
| 597 | }; |
| 598 | 598 | |
| 599 | 599 | |
| 600 | | typedef struct |
| 600 | struct FM_ST |
| 601 | 601 | { |
| 602 | 602 | device_t *device; |
| 603 | 603 | void * param; /* this chip parameter */ |
| r17909 | r17910 | |
| 625 | 625 | FM_TIMERHANDLER timer_handler; |
| 626 | 626 | FM_IRQHANDLER IRQ_Handler; |
| 627 | 627 | const ssg_callbacks *SSG; |
| 628 | | } FM_ST; |
| 628 | }; |
| 629 | 629 | |
| 630 | 630 | |
| 631 | 631 | |
| r17909 | r17910 | |
| 634 | 634 | /***********************************************************/ |
| 635 | 635 | |
| 636 | 636 | /* OPN 3slot struct */ |
| 637 | | typedef struct |
| 637 | struct FM_3SLOT |
| 638 | 638 | { |
| 639 | 639 | UINT32 fc[3]; /* fnum3,blk3: calculated */ |
| 640 | 640 | UINT8 fn_h; /* freq3 latch */ |
| 641 | 641 | UINT8 kcode[3]; /* key code */ |
| 642 | 642 | UINT32 block_fnum[3]; /* current fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ |
| 643 | 643 | UINT8 key_csm; /* CSM mode Key-ON flag */ |
| 644 | | } FM_3SLOT; |
| 644 | }; |
| 645 | 645 | |
| 646 | 646 | /* OPN/A/B common state */ |
| 647 | | typedef struct |
| 647 | struct FM_OPN |
| 648 | 648 | { |
| 649 | 649 | UINT8 type; /* chip type */ |
| 650 | 650 | FM_ST ST; /* general state */ |
| r17909 | r17910 | |
| 675 | 675 | INT32 mem; /* one sample delay memory */ |
| 676 | 676 | INT32 out_fm[8]; /* outputs of working channels */ |
| 677 | 677 | |
| 678 | | } FM_OPN; |
| 678 | }; |
| 679 | 679 | |
| 680 | 680 | /* here's the virtual YM2612 */ |
| 681 | | typedef struct |
| 681 | struct YM2612 |
| 682 | 682 | { |
| 683 | 683 | UINT8 REGS[512]; /* registers */ |
| 684 | 684 | FM_OPN OPN; /* OPN state */ |
| r17909 | r17910 | |
| 688 | 688 | /* dac output (YM2612) */ |
| 689 | 689 | int dacen; |
| 690 | 690 | INT32 dacout; |
| 691 | | } YM2612; |
| 691 | }; |
| 692 | 692 | |
| 693 | 693 | /* log output level */ |
| 694 | 694 | #define LOG_ERR 3 /* ERROR */ |
trunk/src/emu/sound/ymf262.c
| r17909 | r17910 | |
| 141 | 141 | #define OPL3_TYPE_YMF262 (0) /* 36 operators, 8 waveforms */ |
| 142 | 142 | |
| 143 | 143 | |
| 144 | | typedef struct |
| 144 | struct OPL3_SLOT |
| 145 | 145 | { |
| 146 | 146 | UINT32 ar; /* attack rate: AR<<2 */ |
| 147 | 147 | UINT32 dr; /* decay rate: DR<<2 */ |
| r17909 | r17910 | |
| 190 | 190 | //unsigned char reserved[128-84];//speedup: pump up the struct size to power of 2 |
| 191 | 191 | unsigned char reserved[128-100];//speedup: pump up the struct size to power of 2 |
| 192 | 192 | |
| 193 | | } OPL3_SLOT; |
| 193 | }; |
| 194 | 194 | |
| 195 | | typedef struct |
| 195 | struct OPL3_CH |
| 196 | 196 | { |
| 197 | 197 | OPL3_SLOT SLOT[2]; |
| 198 | 198 | |
| r17909 | r17910 | |
| 215 | 215 | |
| 216 | 216 | unsigned char reserved[512-272];//speedup:pump up the struct size to power of 2 |
| 217 | 217 | |
| 218 | | } OPL3_CH; |
| 218 | }; |
| 219 | 219 | |
| 220 | 220 | /* OPL3 state */ |
| 221 | | typedef struct |
| 221 | struct OPL3 |
| 222 | 222 | { |
| 223 | 223 | OPL3_CH P_CH[18]; /* OPL3 chips have 18 channels */ |
| 224 | 224 | |
| r17909 | r17910 | |
| 278 | 278 | double freqbase; /* frequency base */ |
| 279 | 279 | attotime TimerBase; /* Timer base time (==sampling time)*/ |
| 280 | 280 | device_t *device; |
| 281 | | } OPL3; |
| 281 | }; |
| 282 | 282 | |
| 283 | 283 | |
| 284 | 284 | |
trunk/src/emu/sound/ymf271.c
| r17909 | r17910 | |
| 33 | 33 | |
| 34 | 34 | //#define log2(n) (log((float) n)/log((float) 2)) |
| 35 | 35 | |
| 36 | | typedef struct |
| 36 | struct YMF271Slot |
| 37 | 37 | { |
| 38 | 38 | INT8 extout; |
| 39 | 39 | UINT8 lfoFreq; |
| r17909 | r17910 | |
| 80 | 80 | INT32 lfo_phase, lfo_step; |
| 81 | 81 | INT32 lfo_amplitude; |
| 82 | 82 | double lfo_phasemod; |
| 83 | | } YMF271Slot; |
| 83 | }; |
| 84 | 84 | |
| 85 | | typedef struct |
| 85 | struct YMF271Group |
| 86 | 86 | { |
| 87 | 87 | INT8 sync, pfm; |
| 88 | | } YMF271Group; |
| 88 | }; |
| 89 | 89 | |
| 90 | | typedef struct |
| 90 | struct YMF271Chip |
| 91 | 91 | { |
| 92 | 92 | YMF271Slot slots[48]; |
| 93 | 93 | YMF271Group groups[12]; |
| r17909 | r17910 | |
| 112 | 112 | UINT32 clock; |
| 113 | 113 | sound_stream * stream; |
| 114 | 114 | device_t *device; |
| 115 | | } YMF271Chip; |
| 115 | }; |
| 116 | 116 | |
| 117 | 117 | // slot mapping assists |
| 118 | 118 | static const int fm_tab[] = { 0, 1, 2, -1, 3, 4, 5, -1, 6, 7, 8, -1, 9, 10, 11, -1 }; |
trunk/src/emu/sound/ym2151.c
| r17909 | r17910 | |
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | /* struct describing a single operator */ |
| 26 | | typedef struct |
| 26 | struct YM2151Operator |
| 27 | 27 | { |
| 28 | 28 | UINT32 phase; /* accumulated operator phase */ |
| 29 | 29 | UINT32 freq; /* operator frequency count */ |
| r17909 | r17910 | |
| 73 | 73 | UINT32 reserved0; /**/ |
| 74 | 74 | UINT32 reserved1; /**/ |
| 75 | 75 | |
| 76 | | } YM2151Operator; |
| 76 | }; |
| 77 | 77 | |
| 78 | 78 | |
| 79 | | typedef struct |
| 79 | struct YM2151 |
| 80 | 80 | { |
| 81 | 81 | signed int chanout[8]; |
| 82 | 82 | signed int m2,c1,c2; /* Phase Modulation input for operators 2,3,4 */ |
| r17909 | r17910 | |
| 168 | 168 | device_t *device; |
| 169 | 169 | unsigned int clock; /* chip clock in Hz (passed from 2151intf.c) */ |
| 170 | 170 | unsigned int sampfreq; /* sampling frequency in Hz (passed from 2151intf.c) */ |
| 171 | | } YM2151; |
| 171 | }; |
| 172 | 172 | |
| 173 | 173 | |
| 174 | 174 | #define FREQ_SH 16 /* 16.16 fixed point (frequency calculations) */ |
trunk/src/emu/sound/fm.c
| r17909 | r17910 | |
| 519 | 519 | |
| 520 | 520 | |
| 521 | 521 | /* struct describing a single operator (SLOT) */ |
| 522 | | typedef struct |
| 522 | struct FM_SLOT |
| 523 | 523 | { |
| 524 | 524 | INT32 *DT; /* detune :dt_tab[DT] */ |
| 525 | 525 | UINT8 KSR; /* key scale rate :3-KSR */ |
| r17909 | r17910 | |
| 558 | 558 | /* LFO */ |
| 559 | 559 | UINT32 AMmask; /* AM enable flag */ |
| 560 | 560 | |
| 561 | | } FM_SLOT; |
| 561 | }; |
| 562 | 562 | |
| 563 | | typedef struct |
| 563 | struct FM_CH |
| 564 | 564 | { |
| 565 | 565 | FM_SLOT SLOT[4]; /* four SLOTs (operators) */ |
| 566 | 566 | |
| r17909 | r17910 | |
| 582 | 582 | UINT32 fc; /* fnum,blk:adjusted to sample rate */ |
| 583 | 583 | UINT8 kcode; /* key code: */ |
| 584 | 584 | UINT32 block_fnum; /* current blk/fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ |
| 585 | | } FM_CH; |
| 585 | }; |
| 586 | 586 | |
| 587 | 587 | |
| 588 | | typedef struct |
| 588 | struct FM_ST |
| 589 | 589 | { |
| 590 | 590 | device_t *device; |
| 591 | 591 | void * param; /* this chip parameter */ |
| r17909 | r17910 | |
| 613 | 613 | FM_TIMERHANDLER timer_handler; |
| 614 | 614 | FM_IRQHANDLER IRQ_Handler; |
| 615 | 615 | const ssg_callbacks *SSG; |
| 616 | | } FM_ST; |
| 616 | }; |
| 617 | 617 | |
| 618 | 618 | |
| 619 | 619 | |
| r17909 | r17910 | |
| 622 | 622 | /***********************************************************/ |
| 623 | 623 | |
| 624 | 624 | /* OPN 3slot struct */ |
| 625 | | typedef struct |
| 625 | struct FM_3SLOT |
| 626 | 626 | { |
| 627 | 627 | UINT32 fc[3]; /* fnum3,blk3: calculated */ |
| 628 | 628 | UINT8 fn_h; /* freq3 latch */ |
| 629 | 629 | UINT8 kcode[3]; /* key code */ |
| 630 | 630 | UINT32 block_fnum[3]; /* current fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ |
| 631 | | } FM_3SLOT; |
| 631 | }; |
| 632 | 632 | |
| 633 | 633 | /* OPN/A/B common state */ |
| 634 | | typedef struct |
| 634 | struct FM_OPN |
| 635 | 635 | { |
| 636 | 636 | UINT8 type; /* chip type */ |
| 637 | 637 | FM_ST ST; /* general state */ |
| r17909 | r17910 | |
| 669 | 669 | INT32 out_adpcm[4]; /* channel output NONE,LEFT,RIGHT or CENTER for YM2608/YM2610 ADPCM */ |
| 670 | 670 | INT32 out_delta[4]; /* channel output NONE,LEFT,RIGHT or CENTER for YM2608/YM2610 DELTAT*/ |
| 671 | 671 | #endif |
| 672 | | } FM_OPN; |
| 672 | }; |
| 673 | 673 | |
| 674 | 674 | |
| 675 | 675 | |
| r17909 | r17910 | |
| 2089 | 2089 | /*****************************************************************************/ |
| 2090 | 2090 | |
| 2091 | 2091 | /* here's the virtual YM2203(OPN) */ |
| 2092 | | typedef struct |
| 2092 | struct YM2203 |
| 2093 | 2093 | { |
| 2094 | 2094 | UINT8 REGS[256]; /* registers */ |
| 2095 | 2095 | FM_OPN OPN; /* OPN state */ |
| 2096 | 2096 | FM_CH CH[3]; /* channel state */ |
| 2097 | | } YM2203; |
| 2097 | }; |
| 2098 | 2098 | |
| 2099 | 2099 | /* Generate samples for one of the YM2203s */ |
| 2100 | 2100 | void ym2203_update_one(void *chip, FMSAMPLE *buffer, int length) |
| r17909 | r17910 | |
| 2385 | 2385 | #if (BUILD_YM2608||BUILD_YM2610||BUILD_YM2610B) |
| 2386 | 2386 | |
| 2387 | 2387 | /* ADPCM type A channel struct */ |
| 2388 | | typedef struct |
| 2388 | struct ADPCM_CH |
| 2389 | 2389 | { |
| 2390 | 2390 | UINT8 flag; /* port state */ |
| 2391 | 2391 | UINT8 flagMask; /* arrived flag mask */ |
| r17909 | r17910 | |
| 2402 | 2402 | INT8 vol_mul; /* volume in "0.75dB" steps */ |
| 2403 | 2403 | UINT8 vol_shift; /* volume in "-6dB" steps */ |
| 2404 | 2404 | INT32 *pan; /* &out_adpcm[OPN_xxxx] */ |
| 2405 | | } ADPCM_CH; |
| 2405 | }; |
| 2406 | 2406 | |
| 2407 | 2407 | /* here's the virtual YM2610 */ |
| 2408 | | typedef struct |
| 2408 | struct YM2610 |
| 2409 | 2409 | { |
| 2410 | 2410 | UINT8 REGS[512]; /* registers */ |
| 2411 | 2411 | FM_OPN OPN; /* OPN state */ |
| r17909 | r17910 | |
| 2423 | 2423 | |
| 2424 | 2424 | UINT8 flagmask; /* YM2608 only */ |
| 2425 | 2425 | UINT8 irqmask; /* YM2608 only */ |
| 2426 | | } YM2610; |
| 2426 | }; |
| 2427 | 2427 | |
| 2428 | 2428 | /* here is the virtual YM2608 */ |
| 2429 | 2429 | typedef YM2610 YM2608; |
trunk/src/emu/machine/s3c2440.h
| r17909 | r17910 | |
| 527 | 527 | TYPE DEFINITIONS |
| 528 | 528 | *******************************************************************************/ |
| 529 | 529 | |
| 530 | | typedef struct |
| 530 | struct s3c24xx_memcon_regs_t |
| 531 | 531 | { |
| 532 | 532 | UINT32 data[0x34/4]; |
| 533 | | } s3c24xx_memcon_regs_t; |
| 533 | }; |
| 534 | 534 | |
| 535 | | typedef struct |
| 535 | struct s3c24xx_usbhost_regs_t |
| 536 | 536 | { |
| 537 | 537 | UINT32 data[0x5C/4]; |
| 538 | | } s3c24xx_usbhost_regs_t; |
| 538 | }; |
| 539 | 539 | |
| 540 | | typedef struct |
| 540 | struct s3c24xx_irq_regs_t |
| 541 | 541 | { |
| 542 | 542 | UINT32 srcpnd; |
| 543 | 543 | UINT32 intmod; |
| r17909 | r17910 | |
| 547 | 547 | UINT32 intoffset; |
| 548 | 548 | UINT32 subsrcpnd; |
| 549 | 549 | UINT32 intsubmsk; |
| 550 | | } s3c24xx_irq_regs_t; |
| 550 | }; |
| 551 | 551 | |
| 552 | | typedef struct |
| 552 | struct s3c24xx_dma_regs_t |
| 553 | 553 | { |
| 554 | 554 | UINT32 disrc; |
| 555 | 555 | UINT32 disrcc; |
| r17909 | r17910 | |
| 560 | 560 | UINT32 dcsrc; |
| 561 | 561 | UINT32 dcdst; |
| 562 | 562 | UINT32 dmasktrig; |
| 563 | | } s3c24xx_dma_regs_t; |
| 563 | }; |
| 564 | 564 | |
| 565 | | typedef struct |
| 565 | struct s3c24xx_clkpow_regs_t |
| 566 | 566 | { |
| 567 | 567 | UINT32 locktime; |
| 568 | 568 | UINT32 mpllcon; |
| r17909 | r17910 | |
| 571 | 571 | UINT32 clkslow; |
| 572 | 572 | UINT32 clkdivn; |
| 573 | 573 | UINT32 camdivn; |
| 574 | | } s3c24xx_clkpow_regs_t; |
| 574 | }; |
| 575 | 575 | |
| 576 | | typedef struct |
| 576 | struct s3c24xx_lcd_regs_t |
| 577 | 577 | { |
| 578 | 578 | UINT32 lcdcon1; |
| 579 | 579 | UINT32 lcdcon2; |
| r17909 | r17910 | |
| 593 | 593 | UINT32 lcdsrcpnd; |
| 594 | 594 | UINT32 lcdintmsk; |
| 595 | 595 | UINT32 tconsel; |
| 596 | | } s3c24xx_lcd_regs_t; |
| 596 | }; |
| 597 | 597 | |
| 598 | | typedef struct |
| 598 | struct s3c24xx_lcdpal_regs_t |
| 599 | 599 | { |
| 600 | 600 | UINT32 data[0x400/4]; |
| 601 | | } s3c24xx_lcdpal_regs_t; |
| 601 | }; |
| 602 | 602 | |
| 603 | | typedef struct |
| 603 | struct s3c24xx_nand_regs_t |
| 604 | 604 | { |
| 605 | 605 | UINT32 nfconf; |
| 606 | 606 | UINT32 nfcont; |
| r17909 | r17910 | |
| 618 | 618 | UINT32 nfsecc; |
| 619 | 619 | UINT32 nfsblk; |
| 620 | 620 | UINT32 nfeblk; |
| 621 | | } s3c24xx_nand_regs_t; |
| 621 | }; |
| 622 | 622 | |
| 623 | | typedef struct |
| 623 | struct s3c24xx_cam_regs_t |
| 624 | 624 | { |
| 625 | 625 | UINT32 data[0xA4/4]; |
| 626 | | } s3c24xx_cam_regs_t; |
| 626 | }; |
| 627 | 627 | |
| 628 | | typedef struct |
| 628 | struct s3c24xx_uart_regs_t |
| 629 | 629 | { |
| 630 | 630 | UINT32 ulcon; |
| 631 | 631 | UINT32 ucon; |
| r17909 | r17910 | |
| 638 | 638 | UINT32 utxh; |
| 639 | 639 | UINT32 urxh; |
| 640 | 640 | UINT32 ubrdiv; |
| 641 | | } s3c24xx_uart_regs_t; |
| 641 | }; |
| 642 | 642 | |
| 643 | | typedef struct |
| 643 | struct s3c24xx_pwm_regs_t |
| 644 | 644 | { |
| 645 | 645 | UINT32 tcfg0; |
| 646 | 646 | UINT32 tcfg1; |
| r17909 | r17910 | |
| 659 | 659 | UINT32 tcnto3; |
| 660 | 660 | UINT32 tcntb4; |
| 661 | 661 | UINT32 tcnto4; |
| 662 | | } s3c24xx_pwm_regs_t; |
| 662 | }; |
| 663 | 663 | |
| 664 | | typedef struct |
| 664 | struct s3c24xx_usbdev_regs_t |
| 665 | 665 | { |
| 666 | 666 | UINT32 data[0x130/4]; |
| 667 | | } s3c24xx_usbdev_regs_t; |
| 667 | }; |
| 668 | 668 | |
| 669 | | typedef struct |
| 669 | struct s3c24xx_wdt_regs_t |
| 670 | 670 | { |
| 671 | 671 | UINT32 wtcon; |
| 672 | 672 | UINT32 wtdat; |
| 673 | 673 | UINT32 wtcnt; |
| 674 | | } s3c24xx_wdt_regs_t; |
| 674 | }; |
| 675 | 675 | |
| 676 | | typedef struct |
| 676 | struct s3c24xx_iic_regs_t |
| 677 | 677 | { |
| 678 | 678 | UINT32 iiccon; |
| 679 | 679 | UINT32 iicstat; |
| 680 | 680 | UINT32 iicadd; |
| 681 | 681 | UINT32 iicds; |
| 682 | 682 | UINT32 iiclc; |
| 683 | | } s3c24xx_iic_regs_t; |
| 683 | }; |
| 684 | 684 | |
| 685 | | typedef struct |
| 685 | struct s3c24xx_iis_regs_t |
| 686 | 686 | { |
| 687 | 687 | UINT32 iiscon; |
| 688 | 688 | UINT32 iismod; |
| 689 | 689 | UINT32 iispsr; |
| 690 | 690 | UINT32 iisfcon; |
| 691 | 691 | UINT32 iisfifo; |
| 692 | | } s3c24xx_iis_regs_t; |
| 692 | }; |
| 693 | 693 | |
| 694 | | typedef struct |
| 694 | struct s3c24xx_gpio_regs_t |
| 695 | 695 | { |
| 696 | 696 | UINT32 gpacon; |
| 697 | 697 | UINT32 gpadat; |
| r17909 | r17910 | |
| 748 | 748 | UINT32 gpjcon; |
| 749 | 749 | UINT32 gpjdat; |
| 750 | 750 | UINT32 gpjup; |
| 751 | | } s3c24xx_gpio_regs_t; |
| 751 | }; |
| 752 | 752 | |
| 753 | | typedef struct |
| 753 | struct s3c24xx_rtc_regs_t |
| 754 | 754 | { |
| 755 | 755 | UINT32 rtccon; |
| 756 | 756 | UINT32 ticnt; |
| r17909 | r17910 | |
| 770 | 770 | UINT32 bcddow; |
| 771 | 771 | UINT32 bcdmon; |
| 772 | 772 | UINT32 bcdyear; |
| 773 | | } s3c24xx_rtc_regs_t; |
| 773 | }; |
| 774 | 774 | |
| 775 | | typedef struct |
| 775 | struct s3c24xx_adc_regs_t |
| 776 | 776 | { |
| 777 | 777 | UINT32 adccon; |
| 778 | 778 | UINT32 adctsc; |
| r17909 | r17910 | |
| 780 | 780 | UINT32 adcdat0; |
| 781 | 781 | UINT32 adcdat1; |
| 782 | 782 | UINT32 adcupdn; |
| 783 | | } s3c24xx_adc_regs_t; |
| 783 | }; |
| 784 | 784 | |
| 785 | | typedef struct |
| 785 | struct s3c24xx_spi_regs_t |
| 786 | 786 | { |
| 787 | 787 | UINT32 spcon; |
| 788 | 788 | UINT32 spsta; |
| r17909 | r17910 | |
| 790 | 790 | UINT32 sppre; |
| 791 | 791 | UINT32 sptdat; |
| 792 | 792 | UINT32 sprdat; |
| 793 | | } s3c24xx_spi_regs_t; |
| 793 | }; |
| 794 | 794 | |
| 795 | | typedef struct |
| 795 | struct s3c24xx_sdi_regs_t |
| 796 | 796 | { |
| 797 | 797 | UINT32 data[0x44/4]; |
| 798 | | } s3c24xx_sdi_regs_t; |
| 798 | }; |
| 799 | 799 | |
| 800 | | typedef struct |
| 800 | struct s3c24xx_ac97_regs_t |
| 801 | 801 | { |
| 802 | 802 | UINT32 data[0x20/4]; |
| 803 | | } s3c24xx_ac97_regs_t; |
| 803 | }; |
| 804 | 804 | |
| 805 | | typedef struct |
| 805 | struct s3c24xx_memcon_t |
| 806 | 806 | { |
| 807 | 807 | s3c24xx_memcon_regs_t regs; |
| 808 | | } s3c24xx_memcon_t; |
| 808 | }; |
| 809 | 809 | |
| 810 | | typedef struct |
| 810 | struct s3c24xx_usbhost_t |
| 811 | 811 | { |
| 812 | 812 | s3c24xx_usbhost_regs_t regs; |
| 813 | | } s3c24xx_usbhost_t; |
| 813 | }; |
| 814 | 814 | |
| 815 | | typedef struct |
| 815 | struct s3c24xx_irq_t |
| 816 | 816 | { |
| 817 | 817 | s3c24xx_irq_regs_t regs; |
| 818 | 818 | int line_irq, line_fiq; |
| 819 | | } s3c24xx_irq_t; |
| 819 | }; |
| 820 | 820 | |
| 821 | | typedef struct |
| 821 | struct s3c24xx_dma_t |
| 822 | 822 | { |
| 823 | 823 | s3c24xx_dma_regs_t regs; |
| 824 | 824 | emu_timer *timer; |
| 825 | | } s3c24xx_dma_t; |
| 825 | }; |
| 826 | 826 | |
| 827 | | typedef struct |
| 827 | struct s3c24xx_clkpow_t |
| 828 | 828 | { |
| 829 | 829 | s3c24xx_clkpow_regs_t regs; |
| 830 | | } s3c24xx_clkpow_t; |
| 830 | }; |
| 831 | 831 | |
| 832 | | typedef struct |
| 832 | struct s3c24xx_lcd_t |
| 833 | 833 | { |
| 834 | 834 | s3c24xx_lcd_regs_t regs; |
| 835 | 835 | emu_timer *timer; |
| r17909 | r17910 | |
| 846 | 846 | UINT32 tpal; |
| 847 | 847 | UINT32 hpos_min, hpos_max, vpos_min, vpos_max; |
| 848 | 848 | UINT32 dma_data, dma_bits; |
| 849 | | } s3c24xx_lcd_t; |
| 849 | }; |
| 850 | 850 | |
| 851 | | typedef struct |
| 851 | struct s3c24xx_lcdpal_t |
| 852 | 852 | { |
| 853 | 853 | s3c24xx_lcdpal_regs_t regs; |
| 854 | | } s3c24xx_lcdpal_t; |
| 854 | }; |
| 855 | 855 | |
| 856 | | typedef struct |
| 856 | struct s3c24xx_nand_t |
| 857 | 857 | { |
| 858 | 858 | s3c24xx_nand_regs_t regs; |
| 859 | 859 | UINT8 mecc[4]; |
| 860 | 860 | UINT8 secc[2]; |
| 861 | 861 | int ecc_pos, data_count; |
| 862 | | } s3c24xx_nand_t; |
| 862 | }; |
| 863 | 863 | |
| 864 | | typedef struct |
| 864 | struct s3c24xx_cam_t |
| 865 | 865 | { |
| 866 | 866 | s3c24xx_cam_regs_t regs; |
| 867 | | } s3c24xx_cam_t; |
| 867 | }; |
| 868 | 868 | |
| 869 | | typedef struct |
| 869 | struct s3c24xx_uart_t |
| 870 | 870 | { |
| 871 | 871 | s3c24xx_uart_regs_t regs; |
| 872 | | } s3c24xx_uart_t; |
| 872 | }; |
| 873 | 873 | |
| 874 | | typedef struct |
| 874 | struct s3c24xx_pwm_t |
| 875 | 875 | { |
| 876 | 876 | s3c24xx_pwm_regs_t regs; |
| 877 | 877 | emu_timer *timer[5]; |
| 878 | 878 | UINT32 cnt[5]; |
| 879 | 879 | UINT32 cmp[5]; |
| 880 | 880 | UINT32 freq[5]; |
| 881 | | } s3c24xx_pwm_t; |
| 881 | }; |
| 882 | 882 | |
| 883 | | typedef struct |
| 883 | struct s3c24xx_usbdev_t |
| 884 | 884 | { |
| 885 | 885 | s3c24xx_usbdev_regs_t regs; |
| 886 | | } s3c24xx_usbdev_t; |
| 886 | }; |
| 887 | 887 | |
| 888 | | typedef struct |
| 888 | struct s3c24xx_wdt_t |
| 889 | 889 | { |
| 890 | 890 | s3c24xx_wdt_regs_t regs; |
| 891 | 891 | emu_timer *timer; |
| 892 | | } s3c24xx_wdt_t; |
| 892 | }; |
| 893 | 893 | |
| 894 | | typedef struct |
| 894 | struct s3c24xx_iic_t |
| 895 | 895 | { |
| 896 | 896 | s3c24xx_iic_regs_t regs; |
| 897 | 897 | emu_timer *timer; |
| 898 | 898 | int count; |
| 899 | | } s3c24xx_iic_t; |
| 899 | }; |
| 900 | 900 | |
| 901 | | typedef struct |
| 901 | struct s3c24xx_iis_t |
| 902 | 902 | { |
| 903 | 903 | s3c24xx_iis_regs_t regs; |
| 904 | 904 | emu_timer *timer; |
| 905 | 905 | UINT16 fifo[16/2]; |
| 906 | 906 | int fifo_index; |
| 907 | | } s3c24xx_iis_t; |
| 907 | }; |
| 908 | 908 | |
| 909 | | typedef struct |
| 909 | struct s3c24xx_gpio_t |
| 910 | 910 | { |
| 911 | 911 | s3c24xx_gpio_regs_t regs; |
| 912 | | } s3c24xx_gpio_t; |
| 912 | }; |
| 913 | 913 | |
| 914 | | typedef struct |
| 914 | struct s3c24xx_rtc_t |
| 915 | 915 | { |
| 916 | 916 | s3c24xx_rtc_regs_t regs; |
| 917 | 917 | emu_timer *timer_tick_count; |
| 918 | 918 | emu_timer *timer_update; |
| 919 | | } s3c24xx_rtc_t; |
| 919 | }; |
| 920 | 920 | |
| 921 | | typedef struct |
| 921 | struct s3c24xx_adc_t |
| 922 | 922 | { |
| 923 | 923 | s3c24xx_adc_regs_t regs; |
| 924 | | } s3c24xx_adc_t; |
| 924 | }; |
| 925 | 925 | |
| 926 | | typedef struct |
| 926 | struct s3c24xx_spi_t |
| 927 | 927 | { |
| 928 | 928 | s3c24xx_spi_regs_t regs; |
| 929 | | } s3c24xx_spi_t; |
| 929 | }; |
| 930 | 930 | |
| 931 | | typedef struct |
| 931 | struct s3c24xx_sdi_t |
| 932 | 932 | { |
| 933 | 933 | s3c24xx_sdi_regs_t regs; |
| 934 | | } s3c24xx_sdi_t; |
| 934 | }; |
| 935 | 935 | |
| 936 | | typedef struct |
| 936 | struct s3c24xx_ac97_t |
| 937 | 937 | { |
| 938 | 938 | s3c24xx_ac97_regs_t regs; |
| 939 | | } s3c24xx_ac97_t; |
| 939 | }; |
| 940 | 940 | |
| 941 | | typedef struct |
| 941 | struct s3c24xx_t |
| 942 | 942 | { |
| 943 | 943 | const s3c2440_interface *iface; |
| 944 | 944 | UINT8 steppingstone[4*1024]; |
| r17909 | r17910 | |
| 963 | 963 | s3c24xx_spi_t spi[S3C24XX_SPI_COUNT]; |
| 964 | 964 | s3c24xx_sdi_t sdi; |
| 965 | 965 | s3c24xx_ac97_t ac97; |
| 966 | | } s3c24xx_t; |
| 966 | }; |
| 967 | 967 | |
| 968 | 968 | #endif |
trunk/src/emu/machine/s3c2400.h
| r17909 | r17910 | |
| 407 | 407 | TYPE DEFINITIONS |
| 408 | 408 | *******************************************************************************/ |
| 409 | 409 | |
| 410 | | typedef struct |
| 410 | struct s3c24xx_memcon_regs_t |
| 411 | 411 | { |
| 412 | 412 | UINT32 data[0x34/4]; |
| 413 | | } s3c24xx_memcon_regs_t; |
| 413 | }; |
| 414 | 414 | |
| 415 | | typedef struct |
| 415 | struct s3c24xx_usbhost_regs_t |
| 416 | 416 | { |
| 417 | 417 | UINT32 data[0x5C/4]; |
| 418 | | } s3c24xx_usbhost_regs_t; |
| 418 | }; |
| 419 | 419 | |
| 420 | | typedef struct |
| 420 | struct s3c24xx_irq_regs_t |
| 421 | 421 | { |
| 422 | 422 | UINT32 srcpnd; |
| 423 | 423 | UINT32 intmod; |
| r17909 | r17910 | |
| 425 | 425 | UINT32 priority; |
| 426 | 426 | UINT32 intpnd; |
| 427 | 427 | UINT32 intoffset; |
| 428 | | } s3c24xx_irq_regs_t; |
| 428 | }; |
| 429 | 429 | |
| 430 | | typedef struct |
| 430 | struct s3c24xx_dma_regs_t |
| 431 | 431 | { |
| 432 | 432 | UINT32 disrc; |
| 433 | 433 | UINT32 didst; |
| r17909 | r17910 | |
| 436 | 436 | UINT32 dcsrc; |
| 437 | 437 | UINT32 dcdst; |
| 438 | 438 | UINT32 dmasktrig; |
| 439 | | } s3c24xx_dma_regs_t; |
| 439 | }; |
| 440 | 440 | |
| 441 | | typedef struct |
| 441 | struct s3c24xx_clkpow_regs_t |
| 442 | 442 | { |
| 443 | 443 | UINT32 locktime; |
| 444 | 444 | UINT32 mpllcon; |
| r17909 | r17910 | |
| 446 | 446 | UINT32 clkcon; |
| 447 | 447 | UINT32 clkslow; |
| 448 | 448 | UINT32 clkdivn; |
| 449 | | } s3c24xx_clkpow_regs_t; |
| 449 | }; |
| 450 | 450 | |
| 451 | | typedef struct |
| 451 | struct s3c24xx_lcd_regs_t |
| 452 | 452 | { |
| 453 | 453 | UINT32 lcdcon1; |
| 454 | 454 | UINT32 lcdcon2; |
| r17909 | r17910 | |
| 464 | 464 | UINT32 reserved[8]; |
| 465 | 465 | UINT32 dithmode; |
| 466 | 466 | UINT32 tpal; |
| 467 | | } s3c24xx_lcd_regs_t; |
| 467 | }; |
| 468 | 468 | |
| 469 | | typedef struct |
| 469 | struct s3c24xx_lcdpal_regs_t |
| 470 | 470 | { |
| 471 | 471 | UINT32 data[0x400/4]; |
| 472 | | } s3c24xx_lcdpal_regs_t; |
| 472 | }; |
| 473 | 473 | |
| 474 | | typedef struct |
| 474 | struct s3c24xx_uart_regs_t |
| 475 | 475 | { |
| 476 | 476 | UINT32 ulcon; |
| 477 | 477 | UINT32 ucon; |
| r17909 | r17910 | |
| 484 | 484 | UINT32 utxh; |
| 485 | 485 | UINT32 urxh; |
| 486 | 486 | UINT32 ubrdiv; |
| 487 | | } s3c24xx_uart_regs_t; |
| 487 | }; |
| 488 | 488 | |
| 489 | | typedef struct |
| 489 | struct s3c24xx_pwm_regs_t |
| 490 | 490 | { |
| 491 | 491 | UINT32 tcfg0; |
| 492 | 492 | UINT32 tcfg1; |
| r17909 | r17910 | |
| 505 | 505 | UINT32 tcnto3; |
| 506 | 506 | UINT32 tcntb4; |
| 507 | 507 | UINT32 tcnto4; |
| 508 | | } s3c24xx_pwm_regs_t; |
| 508 | }; |
| 509 | 509 | |
| 510 | | typedef struct |
| 510 | struct s3c24xx_usbdev_regs_t |
| 511 | 511 | { |
| 512 | 512 | UINT32 data[0xBC/4]; |
| 513 | | } s3c24xx_usbdev_regs_t; |
| 513 | }; |
| 514 | 514 | |
| 515 | | typedef struct |
| 515 | struct s3c24xx_wdt_regs_t |
| 516 | 516 | { |
| 517 | 517 | UINT32 wtcon; |
| 518 | 518 | UINT32 wtdat; |
| 519 | 519 | UINT32 wtcnt; |
| 520 | | } s3c24xx_wdt_regs_t; |
| 520 | }; |
| 521 | 521 | |
| 522 | | typedef struct |
| 522 | struct s3c24xx_iic_regs_t |
| 523 | 523 | { |
| 524 | 524 | UINT32 iiccon; |
| 525 | 525 | UINT32 iicstat; |
| 526 | 526 | UINT32 iicadd; |
| 527 | 527 | UINT32 iicds; |
| 528 | | } s3c24xx_iic_regs_t; |
| 528 | }; |
| 529 | 529 | |
| 530 | | typedef struct |
| 530 | struct s3c24xx_iis_regs_t |
| 531 | 531 | { |
| 532 | 532 | UINT32 iiscon; |
| 533 | 533 | UINT32 iismod; |
| 534 | 534 | UINT32 iispsr; |
| 535 | 535 | UINT32 iisfcon; |
| 536 | 536 | UINT32 iisfifo; |
| 537 | | } s3c24xx_iis_regs_t; |
| 537 | }; |
| 538 | 538 | |
| 539 | | typedef struct |
| 539 | struct s3c24xx_gpio_regs_t |
| 540 | 540 | { |
| 541 | 541 | UINT32 gpacon; |
| 542 | 542 | UINT32 gpadat; |
| r17909 | r17910 | |
| 561 | 561 | UINT32 opencr; |
| 562 | 562 | UINT32 misccr; |
| 563 | 563 | UINT32 extint; |
| 564 | | } s3c24xx_gpio_regs_t; |
| 564 | }; |
| 565 | 565 | |
| 566 | | typedef struct |
| 566 | struct s3c24xx_rtc_regs_t |
| 567 | 567 | { |
| 568 | 568 | UINT32 rtccon; |
| 569 | 569 | UINT32 ticnt; |
| r17909 | r17910 | |
| 583 | 583 | UINT32 bcddow; |
| 584 | 584 | UINT32 bcdmon; |
| 585 | 585 | UINT32 bcdyear; |
| 586 | | } s3c24xx_rtc_regs_t; |
| 586 | }; |
| 587 | 587 | |
| 588 | | typedef struct |
| 588 | struct s3c24xx_adc_regs_t |
| 589 | 589 | { |
| 590 | 590 | UINT32 adccon; |
| 591 | 591 | UINT32 adcdat; |
| 592 | | } s3c24xx_adc_regs_t; |
| 592 | }; |
| 593 | 593 | |
| 594 | | typedef struct |
| 594 | struct s3c24xx_spi_regs_t |
| 595 | 595 | { |
| 596 | 596 | UINT32 spcon; |
| 597 | 597 | UINT32 spsta; |
| r17909 | r17910 | |
| 599 | 599 | UINT32 sppre; |
| 600 | 600 | UINT32 sptdat; |
| 601 | 601 | UINT32 sprdat; |
| 602 | | } s3c24xx_spi_regs_t; |
| 602 | }; |
| 603 | 603 | |
| 604 | | typedef struct |
| 604 | struct s3c24xx_mmc_regs_t |
| 605 | 605 | { |
| 606 | 606 | UINT32 data[0x40/4]; |
| 607 | | } s3c24xx_mmc_regs_t; |
| 607 | }; |
| 608 | 608 | |
| 609 | | typedef struct |
| 609 | struct s3c24xx_memcon_t |
| 610 | 610 | { |
| 611 | 611 | s3c24xx_memcon_regs_t regs; |
| 612 | | } s3c24xx_memcon_t; |
| 612 | }; |
| 613 | 613 | |
| 614 | | typedef struct |
| 614 | struct s3c24xx_usbhost_t |
| 615 | 615 | { |
| 616 | 616 | s3c24xx_usbhost_regs_t regs; |
| 617 | | } s3c24xx_usbhost_t; |
| 617 | }; |
| 618 | 618 | |
| 619 | | typedef struct |
| 619 | struct s3c24xx_irq_t |
| 620 | 620 | { |
| 621 | 621 | s3c24xx_irq_regs_t regs; |
| 622 | 622 | int line_irq, line_fiq; |
| 623 | | } s3c24xx_irq_t; |
| 623 | }; |
| 624 | 624 | |
| 625 | | typedef struct |
| 625 | struct s3c24xx_dma_t |
| 626 | 626 | { |
| 627 | 627 | s3c24xx_dma_regs_t regs; |
| 628 | 628 | emu_timer *timer; |
| 629 | | } s3c24xx_dma_t; |
| 629 | }; |
| 630 | 630 | |
| 631 | | typedef struct |
| 631 | struct s3c24xx_clkpow_t |
| 632 | 632 | { |
| 633 | 633 | s3c24xx_clkpow_regs_t regs; |
| 634 | | } s3c24xx_clkpow_t; |
| 634 | }; |
| 635 | 635 | |
| 636 | | typedef struct |
| 636 | struct s3c24xx_lcd_t |
| 637 | 637 | { |
| 638 | 638 | s3c24xx_lcd_regs_t regs; |
| 639 | 639 | emu_timer *timer; |
| r17909 | r17910 | |
| 650 | 650 | UINT32 tpal; |
| 651 | 651 | UINT32 hpos_min, hpos_max, vpos_min, vpos_max; |
| 652 | 652 | UINT32 dma_data, dma_bits; |
| 653 | | } s3c24xx_lcd_t; |
| 653 | }; |
| 654 | 654 | |
| 655 | | typedef struct |
| 655 | struct s3c24xx_lcdpal_t |
| 656 | 656 | { |
| 657 | 657 | s3c24xx_lcdpal_regs_t regs; |
| 658 | | } s3c24xx_lcdpal_t; |
| 658 | }; |
| 659 | 659 | |
| 660 | | typedef struct |
| 660 | struct s3c24xx_uart_t |
| 661 | 661 | { |
| 662 | 662 | s3c24xx_uart_regs_t regs; |
| 663 | | } s3c24xx_uart_t; |
| 663 | }; |
| 664 | 664 | |
| 665 | | typedef struct |
| 665 | struct s3c24xx_pwm_t |
| 666 | 666 | { |
| 667 | 667 | s3c24xx_pwm_regs_t regs; |
| 668 | 668 | emu_timer *timer[5]; |
| 669 | 669 | UINT32 cnt[5]; |
| 670 | 670 | UINT32 cmp[5]; |
| 671 | 671 | UINT32 freq[5]; |
| 672 | | } s3c24xx_pwm_t; |
| 672 | }; |
| 673 | 673 | |
| 674 | | typedef struct |
| 674 | struct s3c24xx_usbdev_t |
| 675 | 675 | { |
| 676 | 676 | s3c24xx_usbdev_regs_t regs; |
| 677 | | } s3c24xx_usbdev_t; |
| 677 | }; |
| 678 | 678 | |
| 679 | | typedef struct |
| 679 | struct s3c24xx_wdt_t |
| 680 | 680 | { |
| 681 | 681 | s3c24xx_wdt_regs_t regs; |
| 682 | 682 | emu_timer *timer; |
| 683 | | } s3c24xx_wdt_t; |
| 683 | }; |
| 684 | 684 | |
| 685 | | typedef struct |
| 685 | struct s3c24xx_iic_t |
| 686 | 686 | { |
| 687 | 687 | s3c24xx_iic_regs_t regs; |
| 688 | 688 | emu_timer *timer; |
| 689 | 689 | int count; |
| 690 | | } s3c24xx_iic_t; |
| 690 | }; |
| 691 | 691 | |
| 692 | | typedef struct |
| 692 | struct s3c24xx_iis_t |
| 693 | 693 | { |
| 694 | 694 | s3c24xx_iis_regs_t regs; |
| 695 | 695 | emu_timer *timer; |
| 696 | 696 | UINT16 fifo[16/2]; |
| 697 | 697 | int fifo_index; |
| 698 | | } s3c24xx_iis_t; |
| 698 | }; |
| 699 | 699 | |
| 700 | | typedef struct |
| 700 | struct s3c24xx_gpio_t |
| 701 | 701 | { |
| 702 | 702 | s3c24xx_gpio_regs_t regs; |
| 703 | | } s3c24xx_gpio_t; |
| 703 | }; |
| 704 | 704 | |
| 705 | | typedef struct |
| 705 | struct s3c24xx_rtc_t |
| 706 | 706 | { |
| 707 | 707 | s3c24xx_rtc_regs_t regs; |
| 708 | 708 | emu_timer *timer_tick_count; |
| 709 | 709 | emu_timer *timer_update; |
| 710 | | } s3c24xx_rtc_t; |
| 710 | }; |
| 711 | 711 | |
| 712 | | typedef struct |
| 712 | struct s3c24xx_adc_t |
| 713 | 713 | { |
| 714 | 714 | s3c24xx_adc_regs_t regs; |
| 715 | | } s3c24xx_adc_t; |
| 715 | }; |
| 716 | 716 | |
| 717 | | typedef struct |
| 717 | struct s3c24xx_spi_t |
| 718 | 718 | { |
| 719 | 719 | s3c24xx_spi_regs_t regs; |
| 720 | | } s3c24xx_spi_t; |
| 720 | }; |
| 721 | 721 | |
| 722 | | typedef struct |
| 722 | struct s3c24xx_mmc_t |
| 723 | 723 | { |
| 724 | 724 | s3c24xx_mmc_regs_t regs; |
| 725 | | } s3c24xx_mmc_t; |
| 725 | }; |
| 726 | 726 | |
| 727 | | typedef struct |
| 727 | struct s3c24xx_t |
| 728 | 728 | { |
| 729 | 729 | const s3c2400_interface *iface; |
| 730 | 730 | s3c24xx_memcon_t memcon; |
| r17909 | r17910 | |
| 745 | 745 | s3c24xx_adc_t adc; |
| 746 | 746 | s3c24xx_spi_t spi[S3C24XX_SPI_COUNT]; |
| 747 | 747 | s3c24xx_mmc_t mmc; |
| 748 | | } s3c24xx_t; |
| 748 | }; |
| 749 | 749 | |
| 750 | 750 | #endif |
trunk/src/emu/machine/s3c2410.h
| r17909 | r17910 | |
| 498 | 498 | TYPE DEFINITIONS |
| 499 | 499 | *******************************************************************************/ |
| 500 | 500 | |
| 501 | | typedef struct |
| 501 | struct s3c24xx_memcon_regs_t |
| 502 | 502 | { |
| 503 | 503 | UINT32 data[0x34/4]; |
| 504 | | } s3c24xx_memcon_regs_t; |
| 504 | }; |
| 505 | 505 | |
| 506 | | typedef struct |
| 506 | struct s3c24xx_usbhost_regs_t |
| 507 | 507 | { |
| 508 | 508 | UINT32 data[0x5C/4]; |
| 509 | | } s3c24xx_usbhost_regs_t; |
| 509 | }; |
| 510 | 510 | |
| 511 | | typedef struct |
| 511 | struct s3c24xx_irq_regs_t |
| 512 | 512 | { |
| 513 | 513 | UINT32 srcpnd; |
| 514 | 514 | UINT32 intmod; |
| r17909 | r17910 | |
| 518 | 518 | UINT32 intoffset; |
| 519 | 519 | UINT32 subsrcpnd; |
| 520 | 520 | UINT32 intsubmsk; |
| 521 | | } s3c24xx_irq_regs_t; |
| 521 | }; |
| 522 | 522 | |
| 523 | | typedef struct |
| 523 | struct s3c24xx_dma_regs_t |
| 524 | 524 | { |
| 525 | 525 | UINT32 disrc; |
| 526 | 526 | UINT32 disrcc; |
| r17909 | r17910 | |
| 531 | 531 | UINT32 dcsrc; |
| 532 | 532 | UINT32 dcdst; |
| 533 | 533 | UINT32 dmasktrig; |
| 534 | | } s3c24xx_dma_regs_t; |
| 534 | }; |
| 535 | 535 | |
| 536 | | typedef struct |
| 536 | struct s3c24xx_clkpow_regs_t |
| 537 | 537 | { |
| 538 | 538 | UINT32 locktime; |
| 539 | 539 | UINT32 mpllcon; |
| r17909 | r17910 | |
| 541 | 541 | UINT32 clkcon; |
| 542 | 542 | UINT32 clkslow; |
| 543 | 543 | UINT32 clkdivn; |
| 544 | | } s3c24xx_clkpow_regs_t; |
| 544 | }; |
| 545 | 545 | |
| 546 | | typedef struct |
| 546 | struct s3c24xx_lcd_regs_t |
| 547 | 547 | { |
| 548 | 548 | UINT32 lcdcon1; |
| 549 | 549 | UINT32 lcdcon2; |
| r17909 | r17910 | |
| 563 | 563 | UINT32 lcdsrcpnd; |
| 564 | 564 | UINT32 lcdintmsk; |
| 565 | 565 | UINT32 lpcsel; |
| 566 | | } s3c24xx_lcd_regs_t; |
| 566 | }; |
| 567 | 567 | |
| 568 | | typedef struct |
| 568 | struct s3c24xx_lcdpal_regs_t |
| 569 | 569 | { |
| 570 | 570 | UINT32 data[0x400/4]; |
| 571 | | } s3c24xx_lcdpal_regs_t; |
| 571 | }; |
| 572 | 572 | |
| 573 | | typedef struct |
| 573 | struct s3c24xx_nand_regs_t |
| 574 | 574 | { |
| 575 | 575 | UINT32 nfconf; |
| 576 | 576 | UINT32 nfcmd; |
| r17909 | r17910 | |
| 578 | 578 | UINT32 nfdata; |
| 579 | 579 | UINT32 nfstat; |
| 580 | 580 | UINT32 nfecc; |
| 581 | | } s3c24xx_nand_regs_t; |
| 581 | }; |
| 582 | 582 | |
| 583 | | typedef struct |
| 583 | struct s3c24xx_uart_regs_t |
| 584 | 584 | { |
| 585 | 585 | UINT32 ulcon; |
| 586 | 586 | UINT32 ucon; |
| r17909 | r17910 | |
| 593 | 593 | UINT32 utxh; |
| 594 | 594 | UINT32 urxh; |
| 595 | 595 | UINT32 ubrdiv; |
| 596 | | } s3c24xx_uart_regs_t; |
| 596 | }; |
| 597 | 597 | |
| 598 | | typedef struct |
| 598 | struct s3c24xx_pwm_regs_t |
| 599 | 599 | { |
| 600 | 600 | UINT32 tcfg0; |
| 601 | 601 | UINT32 tcfg1; |
| r17909 | r17910 | |
| 614 | 614 | UINT32 tcnto3; |
| 615 | 615 | UINT32 tcntb4; |
| 616 | 616 | UINT32 tcnto4; |
| 617 | | } s3c24xx_pwm_regs_t; |
| 617 | }; |
| 618 | 618 | |
| 619 | | typedef struct |
| 619 | struct s3c24xx_usbdev_regs_t |
| 620 | 620 | { |
| 621 | 621 | UINT32 data[0x130/4]; |
| 622 | | } s3c24xx_usbdev_regs_t; |
| 622 | }; |
| 623 | 623 | |
| 624 | | typedef struct |
| 624 | struct s3c24xx_wdt_regs_t |
| 625 | 625 | { |
| 626 | 626 | UINT32 wtcon; |
| 627 | 627 | UINT32 wtdat; |
| 628 | 628 | UINT32 wtcnt; |
| 629 | | } s3c24xx_wdt_regs_t; |
| 629 | }; |
| 630 | 630 | |
| 631 | | typedef struct |
| 631 | struct s3c24xx_iic_regs_t |
| 632 | 632 | { |
| 633 | 633 | UINT32 iiccon; |
| 634 | 634 | UINT32 iicstat; |
| 635 | 635 | UINT32 iicadd; |
| 636 | 636 | UINT32 iicds; |
| 637 | | } s3c24xx_iic_regs_t; |
| 637 | }; |
| 638 | 638 | |
| 639 | | typedef struct |
| 639 | struct s3c24xx_iis_regs_t |
| 640 | 640 | { |
| 641 | 641 | UINT32 iiscon; |
| 642 | 642 | UINT32 iismod; |
| 643 | 643 | UINT32 iispsr; |
| 644 | 644 | UINT32 iisfcon; |
| 645 | 645 | UINT32 iisfifo; |
| 646 | | } s3c24xx_iis_regs_t; |
| 646 | }; |
| 647 | 647 | |
| 648 | | typedef struct |
| 648 | struct s3c24xx_gpio_regs_t |
| 649 | 649 | { |
| 650 | 650 | UINT32 gpacon; |
| 651 | 651 | UINT32 gpadat; |
| r17909 | r17910 | |
| 695 | 695 | UINT32 gstatus2; |
| 696 | 696 | UINT32 gstatus3; |
| 697 | 697 | UINT32 gstatus4; |
| 698 | | } s3c24xx_gpio_regs_t; |
| 698 | }; |
| 699 | 699 | |
| 700 | | typedef struct |
| 700 | struct s3c24xx_rtc_regs_t |
| 701 | 701 | { |
| 702 | 702 | UINT32 rtccon; |
| 703 | 703 | UINT32 ticnt; |
| r17909 | r17910 | |
| 717 | 717 | UINT32 bcddow; |
| 718 | 718 | UINT32 bcdmon; |
| 719 | 719 | UINT32 bcdyear; |
| 720 | | } s3c24xx_rtc_regs_t; |
| 720 | }; |
| 721 | 721 | |
| 722 | | typedef struct |
| 722 | struct s3c24xx_adc_regs_t |
| 723 | 723 | { |
| 724 | 724 | UINT32 adccon; |
| 725 | 725 | UINT32 adctsc; |
| 726 | 726 | UINT32 adcdly; |
| 727 | 727 | UINT32 adcdat0; |
| 728 | 728 | UINT32 adcdat1; |
| 729 | | } s3c24xx_adc_regs_t; |
| 729 | }; |
| 730 | 730 | |
| 731 | | typedef struct |
| 731 | struct s3c24xx_spi_regs_t |
| 732 | 732 | { |
| 733 | 733 | UINT32 spcon; |
| 734 | 734 | UINT32 spsta; |
| r17909 | r17910 | |
| 736 | 736 | UINT32 sppre; |
| 737 | 737 | UINT32 sptdat; |
| 738 | 738 | UINT32 sprdat; |
| 739 | | } s3c24xx_spi_regs_t; |
| 739 | }; |
| 740 | 740 | |
| 741 | | typedef struct |
| 741 | struct s3c24xx_sdi_regs_t |
| 742 | 742 | { |
| 743 | 743 | UINT32 data[0x44/4]; |
| 744 | | } s3c24xx_sdi_regs_t; |
| 744 | }; |
| 745 | 745 | |
| 746 | | typedef struct |
| 746 | struct s3c24xx_memcon_t |
| 747 | 747 | { |
| 748 | 748 | s3c24xx_memcon_regs_t regs; |
| 749 | | } s3c24xx_memcon_t; |
| 749 | }; |
| 750 | 750 | |
| 751 | | typedef struct |
| 751 | struct s3c24xx_usbhost_t |
| 752 | 752 | { |
| 753 | 753 | s3c24xx_usbhost_regs_t regs; |
| 754 | | } s3c24xx_usbhost_t; |
| 754 | }; |
| 755 | 755 | |
| 756 | | typedef struct |
| 756 | struct s3c24xx_irq_t |
| 757 | 757 | { |
| 758 | 758 | s3c24xx_irq_regs_t regs; |
| 759 | 759 | int line_irq, line_fiq; |
| 760 | | } s3c24xx_irq_t; |
| 760 | }; |
| 761 | 761 | |
| 762 | | typedef struct |
| 762 | struct s3c24xx_dma_t |
| 763 | 763 | { |
| 764 | 764 | s3c24xx_dma_regs_t regs; |
| 765 | 765 | emu_timer *timer; |
| 766 | | } s3c24xx_dma_t; |
| 766 | }; |
| 767 | 767 | |
| 768 | | typedef struct |
| 768 | struct s3c24xx_clkpow_t |
| 769 | 769 | { |
| 770 | 770 | s3c24xx_clkpow_regs_t regs; |
| 771 | | } s3c24xx_clkpow_t; |
| 771 | }; |
| 772 | 772 | |
| 773 | | typedef struct |
| 773 | struct s3c24xx_lcd_t |
| 774 | 774 | { |
| 775 | 775 | s3c24xx_lcd_regs_t regs; |
| 776 | 776 | emu_timer *timer; |
| r17909 | r17910 | |
| 787 | 787 | UINT32 tpal; |
| 788 | 788 | UINT32 hpos_min, hpos_max, vpos_min, vpos_max; |
| 789 | 789 | UINT32 dma_data, dma_bits; |
| 790 | | } s3c24xx_lcd_t; |
| 790 | }; |
| 791 | 791 | |
| 792 | | typedef struct |
| 792 | struct s3c24xx_lcdpal_t |
| 793 | 793 | { |
| 794 | 794 | s3c24xx_lcdpal_regs_t regs; |
| 795 | | } s3c24xx_lcdpal_t; |
| 795 | }; |
| 796 | 796 | |
| 797 | | typedef struct |
| 797 | struct s3c24xx_nand_t |
| 798 | 798 | { |
| 799 | 799 | s3c24xx_nand_regs_t regs; |
| 800 | 800 | UINT8 mecc[3]; |
| 801 | 801 | int ecc_pos, data_count; |
| 802 | | } s3c24xx_nand_t; |
| 802 | }; |
| 803 | 803 | |
| 804 | | typedef struct |
| 804 | struct s3c24xx_uart_t |
| 805 | 805 | { |
| 806 | 806 | s3c24xx_uart_regs_t regs; |
| 807 | | } s3c24xx_uart_t; |
| 807 | }; |
| 808 | 808 | |
| 809 | | typedef struct |
| 809 | struct s3c24xx_pwm_t |
| 810 | 810 | { |
| 811 | 811 | s3c24xx_pwm_regs_t regs; |
| 812 | 812 | emu_timer *timer[5]; |
| 813 | 813 | UINT32 cnt[5]; |
| 814 | 814 | UINT32 cmp[5]; |
| 815 | 815 | UINT32 freq[5]; |
| 816 | | } s3c24xx_pwm_t; |
| 816 | }; |
| 817 | 817 | |
| 818 | | typedef struct |
| 818 | struct s3c24xx_usbdev_t |
| 819 | 819 | { |
| 820 | 820 | s3c24xx_usbdev_regs_t regs; |
| 821 | | } s3c24xx_usbdev_t; |
| 821 | }; |
| 822 | 822 | |
| 823 | | typedef struct |
| 823 | struct s3c24xx_wdt_t |
| 824 | 824 | { |
| 825 | 825 | s3c24xx_wdt_regs_t regs; |
| 826 | 826 | emu_timer *timer; |
| 827 | 827 | UINT32 freq, cnt; |
| 828 | | } s3c24xx_wdt_t; |
| 828 | }; |
| 829 | 829 | |
| 830 | | typedef struct |
| 830 | struct s3c24xx_iic_t |
| 831 | 831 | { |
| 832 | 832 | s3c24xx_iic_regs_t regs; |
| 833 | 833 | emu_timer *timer; |
| 834 | 834 | int count; |
| 835 | | } s3c24xx_iic_t; |
| 835 | }; |
| 836 | 836 | |
| 837 | | typedef struct |
| 837 | struct s3c24xx_iis_t |
| 838 | 838 | { |
| 839 | 839 | s3c24xx_iis_regs_t regs; |
| 840 | 840 | emu_timer *timer; |
| 841 | 841 | UINT16 fifo[16/2]; |
| 842 | 842 | int fifo_index; |
| 843 | | } s3c24xx_iis_t; |
| 843 | }; |
| 844 | 844 | |
| 845 | | typedef struct |
| 845 | struct s3c24xx_gpio_t |
| 846 | 846 | { |
| 847 | 847 | s3c24xx_gpio_regs_t regs; |
| 848 | | } s3c24xx_gpio_t; |
| 848 | }; |
| 849 | 849 | |
| 850 | | typedef struct |
| 850 | struct s3c24xx_rtc_t |
| 851 | 851 | { |
| 852 | 852 | s3c24xx_rtc_regs_t regs; |
| 853 | 853 | emu_timer *timer_tick_count; |
| 854 | 854 | emu_timer *timer_update; |
| 855 | | } s3c24xx_rtc_t; |
| 855 | }; |
| 856 | 856 | |
| 857 | | typedef struct |
| 857 | struct s3c24xx_adc_t |
| 858 | 858 | { |
| 859 | 859 | s3c24xx_adc_regs_t regs; |
| 860 | | } s3c24xx_adc_t; |
| 860 | }; |
| 861 | 861 | |
| 862 | | typedef struct |
| 862 | struct s3c24xx_spi_t |
| 863 | 863 | { |
| 864 | 864 | s3c24xx_spi_regs_t regs; |
| 865 | | } s3c24xx_spi_t; |
| 865 | }; |
| 866 | 866 | |
| 867 | | typedef struct |
| 867 | struct s3c24xx_sdi_t |
| 868 | 868 | { |
| 869 | 869 | s3c24xx_sdi_regs_t regs; |
| 870 | | } s3c24xx_sdi_t; |
| 870 | }; |
| 871 | 871 | |
| 872 | | typedef struct |
| 872 | struct s3c24xx_t |
| 873 | 873 | { |
| 874 | 874 | const s3c2410_interface *iface; |
| 875 | 875 | UINT8 steppingstone[4*1024]; |
| r17909 | r17910 | |
| 892 | 892 | s3c24xx_adc_t adc; |
| 893 | 893 | s3c24xx_spi_t spi[S3C24XX_SPI_COUNT]; |
| 894 | 894 | s3c24xx_sdi_t sdi; |
| 895 | | } s3c24xx_t; |
| 895 | }; |
| 896 | 896 | |
| 897 | 897 | #endif |
trunk/src/mess/tools/imgtool/library.h
| r17909 | r17910 | |
| 57 | 57 | ITLS_DESCRIPTION |
| 58 | 58 | } imgtool_libsort_t; |
| 59 | 59 | |
| 60 | | typedef struct |
| 60 | struct imgtool_dirent |
| 61 | 61 | { |
| 62 | 62 | char filename[1024]; |
| 63 | 63 | char attr[64]; |
| r17909 | r17910 | |
| 75 | 75 | unsigned int corrupt : 1; |
| 76 | 76 | unsigned int directory : 1; |
| 77 | 77 | unsigned int hardlink : 1; |
| 78 | | } imgtool_dirent; |
| 78 | }; |
| 79 | 79 | |
| 80 | | typedef struct |
| 80 | struct imgtool_chainent |
| 81 | 81 | { |
| 82 | 82 | UINT8 level; |
| 83 | 83 | UINT64 block; |
| 84 | | } imgtool_chainent; |
| 84 | }; |
| 85 | 85 | |
| 86 | 86 | typedef enum |
| 87 | 87 | { |
| r17909 | r17910 | |
| 91 | 91 | FORK_ALTERNATE |
| 92 | 92 | } imgtool_forktype_t; |
| 93 | 93 | |
| 94 | | typedef struct |
| 94 | struct imgtool_forkent |
| 95 | 95 | { |
| 96 | 96 | imgtool_forktype_t type; |
| 97 | 97 | UINT64 size; |
| 98 | 98 | char forkname[64]; |
| 99 | | } imgtool_forkent; |
| 99 | }; |
| 100 | 100 | |
| 101 | | typedef struct |
| 101 | struct imgtool_transfer_suggestion |
| 102 | 102 | { |
| 103 | 103 | imgtool_suggestion_viability_t viability; |
| 104 | 104 | filter_getinfoproc filter; |
| 105 | 105 | const char *fork; |
| 106 | 106 | const char *description; |
| 107 | | } imgtool_transfer_suggestion; |
| 107 | }; |
| 108 | 108 | |
| 109 | 109 | enum |
| 110 | 110 | { |
| r17909 | r17910 | |
| 140 | 140 | time_t t; |
| 141 | 141 | } imgtool_attribute; |
| 142 | 142 | |
| 143 | | typedef struct |
| 143 | struct imgtool_iconinfo |
| 144 | 144 | { |
| 145 | 145 | unsigned icon16x16_specified : 1; |
| 146 | 146 | unsigned icon32x32_specified : 1; |
| 147 | 147 | UINT32 icon16x16[16][16]; |
| 148 | 148 | UINT32 icon32x32[32][32]; |
| 149 | | } imgtool_iconinfo; |
| 149 | }; |
| 150 | 150 | |
| 151 | 151 | enum |
| 152 | 152 | { |
trunk/src/mess/machine/strata.c
| r17909 | r17910 | |
| 44 | 44 | FM_CONFPART1, // first half of configuration, awaiting second |
| 45 | 45 | FM_WRPROTPART1 // first half of protection program, awaiting second |
| 46 | 46 | }; |
| 47 | | typedef struct |
| 47 | struct strata_t |
| 48 | 48 | { |
| 49 | 49 | fm_mode_t mode; // current operation mode |
| 50 | 50 | int hard_unlock; // 1 if RP* pin is at Vhh (not fully implemented) |
| r17909 | r17910 | |
| 57 | 57 | UINT8 *data_ptr; // main FEEPROM area |
| 58 | 58 | UINT8 *blocklock; // block lock flags |
| 59 | 59 | UINT8 *prot_regs; // protection registers |
| 60 | | } strata_t; |
| 60 | }; |
| 61 | 61 | |
| 62 | 62 | /* accessors for individual block lock flags */ |
| 63 | 63 | #define READ_BLOCKLOCK(strata, block) (((strata)->blocklock[(block) >> 3] >> ((block) & 7)) & 1) |
trunk/src/mess/machine/s3c44b0.h
| r17909 | r17910 | |
| 373 | 373 | TYPE DEFINITIONS |
| 374 | 374 | *******************************************************************************/ |
| 375 | 375 | |
| 376 | | typedef struct |
| 376 | struct s3c44b0_memcon_regs_t |
| 377 | 377 | { |
| 378 | 378 | UINT32 data[0x34/4]; |
| 379 | | } s3c44b0_memcon_regs_t; |
| 379 | }; |
| 380 | 380 | |
| 381 | | typedef struct |
| 381 | struct s3c44b0_irq_regs_t |
| 382 | 382 | { |
| 383 | 383 | UINT32 intcon; |
| 384 | 384 | UINT32 intpnd; |
| r17909 | r17910 | |
| 393 | 393 | UINT32 reserved[4]; |
| 394 | 394 | UINT32 f_ispr; |
| 395 | 395 | UINT32 f_ispc; |
| 396 | | } s3c44b0_irq_regs_t; |
| 396 | }; |
| 397 | 397 | |
| 398 | | typedef struct |
| 398 | struct s3c44b0_dma_regs_t |
| 399 | 399 | { |
| 400 | 400 | UINT32 dcon; |
| 401 | 401 | UINT32 disrc; |
| r17909 | r17910 | |
| 404 | 404 | UINT32 dcsrc; |
| 405 | 405 | UINT32 dcdst; |
| 406 | 406 | UINT32 dccnt; |
| 407 | | } s3c44b0_dma_regs_t; |
| 407 | }; |
| 408 | 408 | |
| 409 | | typedef struct |
| 409 | struct s3c44b0_clkpow_regs_t |
| 410 | 410 | { |
| 411 | 411 | UINT32 pllcon; |
| 412 | 412 | UINT32 clkcon; |
| 413 | 413 | UINT32 clkslow; |
| 414 | 414 | UINT32 locktime; |
| 415 | | } s3c44b0_clkpow_regs_t; |
| 415 | }; |
| 416 | 416 | |
| 417 | | typedef struct |
| 417 | struct s3c44b0_lcd_regs_t |
| 418 | 418 | { |
| 419 | 419 | UINT32 lcdcon1; |
| 420 | 420 | UINT32 lcdcon2; |
| r17909 | r17910 | |
| 427 | 427 | UINT32 reserved[8]; |
| 428 | 428 | UINT32 lcdcon3; |
| 429 | 429 | UINT32 dithmode; |
| 430 | | } s3c44b0_lcd_regs_t; |
| 430 | }; |
| 431 | 431 | |
| 432 | | typedef struct |
| 432 | struct s3c44b0_uart_regs_t |
| 433 | 433 | { |
| 434 | 434 | UINT32 ulcon; |
| 435 | 435 | UINT32 ucon; |
| r17909 | r17910 | |
| 442 | 442 | UINT32 utxh; |
| 443 | 443 | UINT32 urxh; |
| 444 | 444 | UINT32 ubrdiv; |
| 445 | | } s3c44b0_uart_regs_t; |
| 445 | }; |
| 446 | 446 | |
| 447 | | typedef struct |
| 447 | struct s3c44b0_sio_regs_t |
| 448 | 448 | { |
| 449 | 449 | UINT32 siocon; |
| 450 | 450 | UINT32 siodat; |
| 451 | 451 | UINT32 sbrdr; |
| 452 | 452 | UINT32 itvcnt; |
| 453 | 453 | UINT32 dcntz; |
| 454 | | } s3c44b0_sio_regs_t; |
| 454 | }; |
| 455 | 455 | |
| 456 | | typedef struct |
| 456 | struct s3c44b0_pwm_regs_t |
| 457 | 457 | { |
| 458 | 458 | UINT32 tcfg0; |
| 459 | 459 | UINT32 tcfg1; |
| r17909 | r17910 | |
| 475 | 475 | UINT32 tcnto4; |
| 476 | 476 | UINT32 tcntb5; |
| 477 | 477 | UINT32 tcnto5; |
| 478 | | } s3c44b0_pwm_regs_t; |
| 478 | }; |
| 479 | 479 | |
| 480 | | typedef struct |
| 480 | struct s3c44b0_wdt_regs_t |
| 481 | 481 | { |
| 482 | 482 | UINT32 wtcon; |
| 483 | 483 | UINT32 wtdat; |
| 484 | 484 | UINT32 wtcnt; |
| 485 | | } s3c44b0_wdt_regs_t; |
| 485 | }; |
| 486 | 486 | |
| 487 | | typedef struct |
| 487 | struct s3c44b0_iic_regs_t |
| 488 | 488 | { |
| 489 | 489 | UINT32 iiccon; |
| 490 | 490 | UINT32 iicstat; |
| 491 | 491 | UINT32 iicadd; |
| 492 | 492 | UINT32 iicds; |
| 493 | | } s3c44b0_iic_regs_t; |
| 493 | }; |
| 494 | 494 | |
| 495 | | typedef struct |
| 495 | struct s3c44b0_iis_regs_t |
| 496 | 496 | { |
| 497 | 497 | UINT32 iiscon; |
| 498 | 498 | UINT32 iismod; |
| 499 | 499 | UINT32 iispsr; |
| 500 | 500 | UINT32 iisfcon; |
| 501 | 501 | UINT32 iisfifo; |
| 502 | | } s3c44b0_iis_regs_t; |
| 502 | }; |
| 503 | 503 | |
| 504 | | typedef struct |
| 504 | struct s3c44b0_gpio_regs_t |
| 505 | 505 | { |
| 506 | 506 | UINT32 gpacon; |
| 507 | 507 | UINT32 gpadat; |
| r17909 | r17910 | |
| 525 | 525 | UINT32 spucr; |
| 526 | 526 | UINT32 extint; |
| 527 | 527 | UINT32 extintpnd; |
| 528 | | } s3c44b0_gpio_regs_t; |
| 528 | }; |
| 529 | 529 | |
| 530 | | typedef struct |
| 530 | struct s3c44b0_rtc_regs_t |
| 531 | 531 | { |
| 532 | 532 | UINT32 rtccon; |
| 533 | 533 | UINT32 reserved[3]; |
| r17909 | r17910 | |
| 547 | 547 | UINT32 bcdmon; |
| 548 | 548 | UINT32 bcdyear; |
| 549 | 549 | UINT32 ticnt; |
| 550 | | } s3c44b0_rtc_regs_t; |
| 550 | }; |
| 551 | 551 | |
| 552 | | typedef struct |
| 552 | struct s3c44b0_adc_regs_t |
| 553 | 553 | { |
| 554 | 554 | UINT32 adccon; |
| 555 | 555 | UINT32 adcpsr; |
| 556 | 556 | UINT32 adcdat; |
| 557 | | } s3c44b0_adc_regs_t; |
| 557 | }; |
| 558 | 558 | |
| 559 | | typedef struct |
| 559 | struct s3c44b0_cpuwrap_regs_t |
| 560 | 560 | { |
| 561 | 561 | UINT32 syscfg; |
| 562 | 562 | UINT32 ncachbe0; |
| 563 | 563 | UINT32 ncachbe1; |
| 564 | | } s3c44b0_cpuwrap_regs_t; |
| 564 | }; |
| 565 | 565 | |
| 566 | | typedef struct |
| 566 | struct s3c44b0_memcon_t |
| 567 | 567 | { |
| 568 | 568 | s3c44b0_memcon_regs_t regs; |
| 569 | | } s3c44b0_memcon_t; |
| 569 | }; |
| 570 | 570 | |
| 571 | | typedef struct |
| 571 | struct s3c44b0_irq_t |
| 572 | 572 | { |
| 573 | 573 | s3c44b0_irq_regs_t regs; |
| 574 | 574 | int line_irq, line_fiq; |
| 575 | | } s3c44b0_irq_t; |
| 575 | }; |
| 576 | 576 | |
| 577 | | typedef struct |
| 577 | struct s3c44b0_dma_t |
| 578 | 578 | { |
| 579 | 579 | s3c44b0_dma_regs_t regs; |
| 580 | 580 | emu_timer *timer; |
| 581 | | } s3c44b0_dma_t; |
| 581 | }; |
| 582 | 582 | |
| 583 | | typedef struct |
| 583 | struct s3c44b0_clkpow_t |
| 584 | 584 | { |
| 585 | 585 | s3c44b0_clkpow_regs_t regs; |
| 586 | | } s3c44b0_clkpow_t; |
| 586 | }; |
| 587 | 587 | |
| 588 | | typedef struct |
| 588 | struct rectangle_t |
| 589 | 589 | { |
| 590 | 590 | int x1, y1, x2, y2; |
| 591 | | } rectangle_t; |
| 591 | }; |
| 592 | 592 | |
| 593 | | typedef struct |
| 593 | struct s3c44b0_lcd_t |
| 594 | 594 | { |
| 595 | 595 | s3c44b0_lcd_regs_t regs; |
| 596 | 596 | emu_timer *timer; |
| r17909 | r17910 | |
| 607 | 607 | UINT32 hpos_min, hpos_max, hpos_end, vpos_min, vpos_max, vpos_end; |
| 608 | 608 | attotime frame_time; |
| 609 | 609 | attoseconds_t frame_period, pixeltime, scantime; |
| 610 | | } s3c44b0_lcd_t; |
| 610 | }; |
| 611 | 611 | |
| 612 | | typedef struct |
| 612 | struct s3c44b0_uart_t |
| 613 | 613 | { |
| 614 | 614 | s3c44b0_uart_regs_t regs; |
| 615 | 615 | emu_timer *timer; |
| 616 | | } s3c44b0_uart_t; |
| 616 | }; |
| 617 | 617 | |
| 618 | | typedef struct |
| 618 | struct s3c44b0_sio_t |
| 619 | 619 | { |
| 620 | 620 | s3c44b0_sio_regs_t regs; |
| 621 | 621 | emu_timer *timer; |
| 622 | | } s3c44b0_sio_t; |
| 622 | }; |
| 623 | 623 | |
| 624 | | typedef struct |
| 624 | struct s3c44b0_pwm_t |
| 625 | 625 | { |
| 626 | 626 | s3c44b0_pwm_regs_t regs; |
| 627 | 627 | emu_timer *timer[6]; |
| 628 | 628 | UINT32 cnt[6]; |
| 629 | 629 | UINT32 cmp[6]; |
| 630 | 630 | UINT32 freq[6]; |
| 631 | | } s3c44b0_pwm_t; |
| 631 | }; |
| 632 | 632 | |
| 633 | | typedef struct |
| 633 | struct s3c44b0_wdt_t |
| 634 | 634 | { |
| 635 | 635 | s3c44b0_wdt_regs_t regs; |
| 636 | 636 | emu_timer *timer; |
| 637 | | } s3c44b0_wdt_t; |
| 637 | }; |
| 638 | 638 | |
| 639 | | typedef struct |
| 639 | struct s3c44b0_iic_t |
| 640 | 640 | { |
| 641 | 641 | s3c44b0_iic_regs_t regs; |
| 642 | 642 | emu_timer *timer; |
| 643 | 643 | int count; |
| 644 | | } s3c44b0_iic_t; |
| 644 | }; |
| 645 | 645 | |
| 646 | | typedef struct |
| 646 | struct s3c44b0_iis_t |
| 647 | 647 | { |
| 648 | 648 | s3c44b0_iis_regs_t regs; |
| 649 | 649 | emu_timer *timer; |
| 650 | 650 | UINT16 fifo[16/2]; |
| 651 | 651 | int fifo_index; |
| 652 | | } s3c44b0_iis_t; |
| 652 | }; |
| 653 | 653 | |
| 654 | | typedef struct |
| 654 | struct s3c44b0_gpio_t |
| 655 | 655 | { |
| 656 | 656 | s3c44b0_gpio_regs_t regs; |
| 657 | | } s3c44b0_gpio_t; |
| 657 | }; |
| 658 | 658 | |
| 659 | | typedef struct |
| 659 | struct s3c44b0_rtc_t |
| 660 | 660 | { |
| 661 | 661 | s3c44b0_rtc_regs_t regs; |
| 662 | 662 | emu_timer *timer_tick_count; |
| 663 | 663 | emu_timer *timer_update; |
| 664 | | } s3c44b0_rtc_t; |
| 664 | }; |
| 665 | 665 | |
| 666 | | typedef struct |
| 666 | struct s3c44b0_adc_t |
| 667 | 667 | { |
| 668 | 668 | s3c44b0_adc_regs_t regs; |
| 669 | 669 | emu_timer *timer; |
| 670 | | } s3c44b0_adc_t; |
| 670 | }; |
| 671 | 671 | |
| 672 | | typedef struct |
| 672 | struct s3c44b0_cpuwrap_t |
| 673 | 673 | { |
| 674 | 674 | s3c44b0_cpuwrap_regs_t regs; |
| 675 | | } s3c44b0_cpuwrap_t; |
| 675 | }; |
| 676 | 676 | |
| 677 | | typedef struct |
| 677 | struct s3c44b0_t |
| 678 | 678 | { |
| 679 | 679 | const s3c44b0_interface *iface; |
| 680 | 680 | address_space* space; |
| r17909 | r17910 | |
| 695 | 695 | s3c44b0_rtc_t rtc; |
| 696 | 696 | s3c44b0_adc_t adc; |
| 697 | 697 | s3c44b0_cpuwrap_t cpuwrap; |
| 698 | | } s3c44b0_t; |
| 698 | }; |
| 699 | 699 | |
| 700 | 700 | #endif |
trunk/src/mess/machine/corvushd.c
| r17909 | r17910 | |
| 89 | 89 | // |
| 90 | 90 | |
| 91 | 91 | // Sector addressing scheme for Rev B/H drives used in various commands (Called a DADR in the docs) |
| 92 | | typedef struct { |
| 92 | struct dadr_t { |
| 93 | 93 | UINT8 address_msn_and_drive;// Most significant nibble: Most signficant nibble of sector address, Least significant nibble: Drive # |
| 94 | 94 | UINT8 address_lsb; // Least significant byte of sector address |
| 95 | 95 | UINT8 address_mid; // Middle byte of sector address |
| 96 | | } dadr_t; |
| 96 | }; |
| 97 | 97 | |
| 98 | 98 | // Controller structure |
| 99 | | typedef struct { |
| 99 | struct corvus_hdc_t { |
| 100 | 100 | UINT8 status; // Controller status byte (DIRECTION + BUSY/READY) |
| 101 | 101 | char prep_mode; // Whether the controller is in Prep Mode or not |
| 102 | 102 | // Physical drive info |
| r17909 | r17910 | |
| 317 | 317 | UINT8 pattern[512]; // Pattern to be written |
| 318 | 318 | } format_drive_revbh_command; |
| 319 | 319 | } buffer; |
| 320 | | } corvus_hdc_t; |
| 320 | }; |
| 321 | 321 | |
| 322 | 322 | // Structure of Block #1, the Disk Parameter Block |
| 323 | 323 | typedef struct { |
| r17909 | r17910 | |
| 340 | 340 | } disk_parameter_block_t; |
| 341 | 341 | |
| 342 | 342 | // Structure of Block #3, the Constellation Parameter Block |
| 343 | | typedef struct { |
| 343 | struct constellation_parameter_block_t { |
| 344 | 344 | UINT8 mux_parameters[12]; |
| 345 | 345 | UINT8 pipe_name_table_ptr[2]; |
| 346 | 346 | UINT8 pipe_ptr_table_ptr[2]; |
| r17909 | r17910 | |
| 348 | 348 | UINT8 reserved[470]; |
| 349 | 349 | UINT8 software_protection[12]; |
| 350 | 350 | UINT8 serial_number[12]; |
| 351 | | } constellation_parameter_block_t; |
| 351 | }; |
| 352 | 352 | |
| 353 | 353 | // Structure of Block #7, the Semaphore Table Block |
| 354 | 354 | typedef struct { |
| r17909 | r17910 | |
| 362 | 362 | } semaphore_table_block_t; |
| 363 | 363 | |
| 364 | 364 | // Command size structure (number of bytes to xmit and recv for each command) |
| 365 | | typedef struct { |
| 365 | struct corvus_cmd_t { |
| 366 | 366 | UINT16 recv_bytes; // Number of bytes from host for this command |
| 367 | 367 | UINT16 xmit_bytes; // Number of bytes to return to host |
| 368 | | } corvus_cmd_t; |
| 368 | }; |
| 369 | 369 | |
| 370 | 370 | // |
| 371 | 371 | // Prototypes |
trunk/src/mess/includes/compis.h
| r17909 | r17910 | |
| 73 | 73 | UINT16 ext[4]; |
| 74 | 74 | }; |
| 75 | 75 | |
| 76 | | typedef struct |
| 76 | struct i186_state |
| 77 | 77 | { |
| 78 | 78 | struct timer_state timer[3]; |
| 79 | 79 | struct dma_state dma[2]; |
| 80 | 80 | struct intr_state intr; |
| 81 | 81 | struct mem_state mem; |
| 82 | | } i186_state; |
| 82 | }; |
| 83 | 83 | |
| 84 | 84 | |
| 85 | 85 | /* Keyboard */ |
| 86 | | typedef struct |
| 86 | struct TYP_COMPIS_KEYBOARD |
| 87 | 87 | { |
| 88 | 88 | UINT8 nationality; /* Character set, keyboard layout (Swedish) */ |
| 89 | 89 | UINT8 release_time; /* Autorepeat release time (0.8) */ |
| r17909 | r17910 | |
| 99 | 99 | UINT8 boot_order[4]; /* Boot device order (FD HD NW PD) */ |
| 100 | 100 | UINT8 key_code; |
| 101 | 101 | UINT8 key_status; |
| 102 | | } TYP_COMPIS_KEYBOARD; |
| 102 | }; |
| 103 | 103 | |
| 104 | 104 | /* USART 8251 */ |
| 105 | | typedef struct |
| 105 | struct TYP_COMPIS_USART |
| 106 | 106 | { |
| 107 | 107 | UINT8 status; |
| 108 | 108 | UINT8 bytes_sent; |
| 109 | | } TYP_COMPIS_USART; |
| 109 | }; |
| 110 | 110 | |
| 111 | 111 | /* Printer */ |
| 112 | | typedef struct |
| 112 | struct TYP_COMPIS_PRINTER |
| 113 | 113 | { |
| 114 | 114 | UINT8 data; |
| 115 | 115 | UINT8 strobe; |
| 116 | | } TYP_COMPIS_PRINTER; |
| 116 | }; |
| 117 | 117 | |
| 118 | 118 | |
| 119 | 119 | /* Main emulation */ |
| 120 | | typedef struct |
| 120 | struct TYP_COMPIS |
| 121 | 121 | { |
| 122 | 122 | TYP_COMPIS_PRINTER printer; /* Printer */ |
| 123 | 123 | TYP_COMPIS_USART usart; /* USART 8251 */ |
| 124 | 124 | TYP_COMPIS_KEYBOARD keyboard; /* Keyboard */ |
| 125 | | } TYP_COMPIS; |
| 125 | }; |
| 126 | 126 | |
| 127 | 127 | |
| 128 | 128 | class compis_state : public driver_device |
trunk/src/mess/includes/wswan.h
| r17909 | r17910 | |
| 40 | 40 | #include "machine/nvram.h" |
| 41 | 41 | |
| 42 | 42 | |
| 43 | | typedef struct |
| 43 | struct EEPROM |
| 44 | 44 | { |
| 45 | 45 | UINT8 mode; /* eeprom mode */ |
| 46 | 46 | UINT16 address; /* Read/write address */ |
| r17909 | r17910 | |
| 50 | 50 | int size; /* size of eeprom/sram area */ |
| 51 | 51 | UINT8 *data; /* pointer to start of sram/eeprom data */ |
| 52 | 52 | UINT8 *page; /* pointer to current sram/eeprom page */ |
| 53 | | } EEPROM; |
| 53 | }; |
| 54 | 54 | |
| 55 | | typedef struct |
| 55 | struct RTC |
| 56 | 56 | { |
| 57 | 57 | UINT8 present; /* Is an RTC present */ |
| 58 | 58 | UINT8 setting; /* Timer setting byte */ |
| r17909 | r17910 | |
| 64 | 64 | UINT8 minute; /* Minute */ |
| 65 | 65 | UINT8 second; /* Second */ |
| 66 | 66 | UINT8 index; /* index for reading/writing of current of alarm time */ |
| 67 | | } RTC; |
| 67 | }; |
| 68 | 68 | |
| 69 | | typedef struct |
| 69 | struct SoundDMA |
| 70 | 70 | { |
| 71 | 71 | UINT32 source; /* Source address */ |
| 72 | 72 | UINT16 size; /* Size */ |
| 73 | 73 | UINT8 enable; /* Enabled */ |
| 74 | | } SoundDMA; |
| 74 | }; |
| 75 | 75 | |
| 76 | | typedef struct |
| 76 | struct VDP |
| 77 | 77 | { |
| 78 | 78 | UINT8 layer_bg_enable; /* Background layer on/off */ |
| 79 | 79 | UINT8 layer_fg_enable; /* Foreground layer on/off */ |
| r17909 | r17910 | |
| 117 | 117 | UINT8 *palette_vram; /* pointer to start of palette area in ram/vram (set by MACHINE_RESET), WSC only */ |
| 118 | 118 | int main_palette[8]; |
| 119 | 119 | emu_timer *timer; |
| 120 | | } VDP; |
| 120 | }; |
| 121 | 121 | |
| 122 | 122 | class wswan_state : public driver_device |
| 123 | 123 | { |
trunk/src/mess/includes/msx_slot.h
| r17909 | r17910 | |
| 15 | 15 | MSX_LAYOUT_LAST |
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | | typedef struct { |
| 18 | struct msx_slot_layout { |
| 19 | 19 | int entry; |
| 20 | 20 | int type; |
| 21 | 21 | int slot_primary, slot_secondary, slot_page, page_extent; |
| 22 | 22 | int size, option; |
| 23 | | } msx_slot_layout; |
| 23 | }; |
| 24 | 24 | |
| 25 | 25 | #define MSX_LAYOUT_INIT(msx) \ |
| 26 | 26 | static const msx_slot_layout msx_slot_layout_##msx[] = { |
| r17909 | r17910 | |
| 112 | 112 | MSX_MEM_HANDLER |
| 113 | 113 | }; |
| 114 | 114 | |
| 115 | | typedef struct { |
| 115 | struct slot_state { |
| 116 | 116 | int m_type; |
| 117 | 117 | int m_start_page; |
| 118 | 118 | int m_bank_mask; |
| r17909 | r17910 | |
| 143 | 143 | int mode; |
| 144 | 144 | } sccp; |
| 145 | 145 | } m_cart; |
| 146 | | } slot_state; |
| 146 | }; |
| 147 | 147 | |
| 148 | | typedef struct { |
| 148 | struct msx_slot { |
| 149 | 149 | int slot_type; |
| 150 | 150 | int mem_type; |
| 151 | 151 | char name[32]; |
| r17909 | r17910 | |
| 155 | 155 | void (*write)(running_machine &machine, slot_state*, UINT16, UINT8); |
| 156 | 156 | int (*loadsram)(running_machine &machine, slot_state*); |
| 157 | 157 | int (*savesram)(running_machine &machine, slot_state*); |
| 158 | | } msx_slot; |
| 158 | }; |
| 159 | 159 | |
| 160 | 160 | extern const msx_slot msx_slot_list[]; |
| 161 | 161 | |
| r17909 | r17910 | |
| 239 | 239 | #define MSX_SLOT_SAVESRAM(nm) \ |
| 240 | 240 | static int slot_##nm##_savesram (running_machine &machine, slot_state *state) |
| 241 | 241 | |
| 242 | | typedef struct { |
| 242 | struct msx_driver_struct { |
| 243 | 243 | char name[9]; |
| 244 | 244 | const msx_slot_layout *layout; |
| 245 | | } msx_driver_struct; |
| 245 | }; |
| 246 | 246 | |
| 247 | 247 | extern const msx_driver_struct msx_driver_list[]; |
| 248 | 248 | |
trunk/src/mess/includes/nes.h
| r17909 | r17910 | |
| 35 | 35 | #define CHRROM 0 |
| 36 | 36 | #define CHRRAM 1 |
| 37 | 37 | |
| 38 | | typedef struct |
| 38 | struct chr_bank |
| 39 | 39 | { |
| 40 | 40 | int source; //defines source of base pointer |
| 41 | 41 | int origin; //defines offset of 0x400 byte segment at base pointer |
| 42 | 42 | UINT8* access; //source translated + origin -> valid pointer! |
| 43 | | } chr_bank; |
| 43 | }; |
| 44 | 44 | |
| 45 | 45 | /*PPU nametable fast banking constants and structures */ |
| 46 | 46 | |
| r17909 | r17910 | |
| 53 | 53 | #define NES_BATTERY 0 |
| 54 | 54 | #define NES_WRAM 1 |
| 55 | 55 | |
| 56 | | typedef struct |
| 56 | struct name_table |
| 57 | 57 | { |
| 58 | 58 | int source; /* defines source of base pointer */ |
| 59 | 59 | int origin; /* defines offset of 0x400 byte segment at base pointer */ |
| 60 | 60 | int writable; /* ExRAM, at least, can be write-protected AND used as nametable */ |
| 61 | 61 | UINT8* access; /* direct access when possible */ |
| 62 | | } name_table; |
| 62 | }; |
| 63 | 63 | |
| 64 | 64 | typedef void (*nes_prg_callback)(running_machine &machine, int start, int bank); |
| 65 | 65 | typedef void (*nes_chr_callback)(running_machine &machine, int start, int bank, int source); |
trunk/src/mess/includes/oric.h
| r17909 | r17910 | |
| 30 | 30 | TELESTRAT_MEM_BLOCK_ROM |
| 31 | 31 | }; |
| 32 | 32 | |
| 33 | | typedef struct |
| 33 | struct telestrat_mem_block |
| 34 | 34 | { |
| 35 | 35 | int MemType; |
| 36 | 36 | unsigned char *ptr; |
| 37 | | } telestrat_mem_block; |
| 37 | }; |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | /* current state of the display */ |
| 41 | 41 | /* some attributes persist until they are turned off. |
| 42 | 42 | This structure holds this persistant information */ |
| 43 | | typedef struct |
| 43 | struct oric_vh_state |
| 44 | 44 | { |
| 45 | 45 | /* foreground and background colour used for rendering */ |
| 46 | 46 | /* if flash attribute is set, these two will both be equal to background colour */ |
| r17909 | r17910 | |
| 63 | 63 | /* if (1<<3), display graphics, if 0, hide graphics */ |
| 64 | 64 | /* current count */ |
| 65 | 65 | UINT8 flash_count; |
| 66 | | } oric_vh_state; |
| 66 | }; |
| 67 | 67 | |
| 68 | 68 | |
| 69 | 69 | class oric_state : public driver_device |
trunk/src/mess/includes/amstrad.h
| r17909 | r17910 | |
| 23 | 23 | /**************************** |
| 24 | 24 | * Gate Array data (CPC) - |
| 25 | 25 | ****************************/ |
| 26 | | typedef struct |
| 26 | struct gate_array_t |
| 27 | 27 | { |
| 28 | 28 | bitmap_ind16 *bitmap; /* The bitmap we work on */ |
| 29 | 29 | UINT8 pen_selected; /* Pen selection */ |
| r17909 | r17910 | |
| 55 | 55 | UINT16 line_ticks; |
| 56 | 56 | UINT8 colour_ticks; |
| 57 | 57 | UINT8 max_colour_ticks; |
| 58 | | } gate_array_t; |
| 58 | }; |
| 59 | 59 | |
| 60 | 60 | /**************************** |
| 61 | 61 | * ASIC data (CPC plus) |
| 62 | 62 | ****************************/ |
| 63 | | typedef struct |
| 63 | struct asic_t |
| 64 | 64 | { |
| 65 | 65 | UINT8 *ram; /* pointer to RAM used for the CPC+ ASIC memory-mapped registers */ |
| 66 | 66 | UINT8 enabled; /* Are CPC plus features enabled/unlocked */ |
| r17909 | r17910 | |
| 85 | 85 | UINT16 dma_addr[3]; /* DMA channel address */ |
| 86 | 86 | UINT16 dma_loopcount[3]; /* Count loops taken on this channel */ |
| 87 | 87 | UINT16 dma_pause[3]; /* DMA pause count */ |
| 88 | | } asic_t; |
| 88 | }; |
| 89 | 89 | |
| 90 | 90 | |
| 91 | 91 | class amstrad_state : public driver_device |
trunk/src/mess/includes/rmnimbus.h
| r17909 | r17910 | |
| 26 | 26 | |
| 27 | 27 | /* Nimbus sub-bios structures for debugging */ |
| 28 | 28 | |
| 29 | | typedef struct |
| 29 | struct t_area_params |
| 30 | 30 | { |
| 31 | 31 | UINT16 ofs_brush; |
| 32 | 32 | UINT16 seg_brush; |
| 33 | 33 | UINT16 ofs_data; |
| 34 | 34 | UINT16 seg_data; |
| 35 | 35 | UINT16 count; |
| 36 | | } t_area_params; |
| 36 | }; |
| 37 | 37 | |
| 38 | | typedef struct |
| 38 | struct t_plot_string_params |
| 39 | 39 | { |
| 40 | 40 | UINT16 ofs_font; |
| 41 | 41 | UINT16 seg_font; |
| r17909 | r17910 | |
| 44 | 44 | UINT16 x; |
| 45 | 45 | UINT16 y; |
| 46 | 46 | UINT16 length; |
| 47 | | } t_plot_string_params; |
| 47 | }; |
| 48 | 48 | |
| 49 | | typedef struct |
| 49 | struct t_nimbus_brush |
| 50 | 50 | { |
| 51 | 51 | UINT16 style; |
| 52 | 52 | UINT16 style_index; |
| r17909 | r17910 | |
| 56 | 56 | UINT16 boundary_spec; |
| 57 | 57 | UINT16 boundary_colour; |
| 58 | 58 | UINT16 save_colour; |
| 59 | | } t_nimbus_brush; |
| 59 | }; |
| 60 | 60 | |
| 61 | 61 | #define SCREEN_WIDTH_PIXELS 640 |
| 62 | 62 | #define SCREEN_HEIGHT_LINES 250 |
| r17909 | r17910 | |
| 110 | 110 | UINT16 ext_vector[2]; // external vectors, when in cascade mode |
| 111 | 111 | }; |
| 112 | 112 | |
| 113 | | typedef struct |
| 113 | struct i186_state |
| 114 | 114 | { |
| 115 | 115 | struct timer_state timer[3]; |
| 116 | 116 | struct dma_state dma[2]; |
| 117 | 117 | struct intr_state intr; |
| 118 | 118 | struct mem_state mem; |
| 119 | | } i186_state; |
| 119 | }; |
| 120 | 120 | |
| 121 | | typedef struct |
| 121 | struct keyboard_t |
| 122 | 122 | { |
| 123 | 123 | UINT8 keyrows[NIMBUS_KEYROWS]; |
| 124 | 124 | emu_timer *keyscan_timer; |
| 125 | 125 | UINT8 queue[KEYBOARD_QUEUE_SIZE]; |
| 126 | 126 | UINT8 head; |
| 127 | 127 | UINT8 tail; |
| 128 | | } keyboard_t; |
| 128 | }; |
| 129 | 129 | |
| 130 | 130 | // Static data related to Floppy and SCSI hard disks |
| 131 | | typedef struct |
| 131 | struct nimbus_drives_t |
| 132 | 132 | { |
| 133 | 133 | UINT8 reg400; |
| 134 | 134 | UINT8 reg410_in; |
| r17909 | r17910 | |
| 137 | 137 | |
| 138 | 138 | UINT8 drq_ff; |
| 139 | 139 | UINT8 int_ff; |
| 140 | | } nimbus_drives_t; |
| 140 | }; |
| 141 | 141 | |
| 142 | 142 | /* 8031 Peripheral controler */ |
| 143 | | typedef struct |
| 143 | struct ipc_interface_t |
| 144 | 144 | { |
| 145 | 145 | UINT8 ipc_in; |
| 146 | 146 | UINT8 ipc_out; |
| r17909 | r17910 | |
| 149 | 149 | UINT8 int_8c_pending; |
| 150 | 150 | UINT8 int_8e_pending; |
| 151 | 151 | UINT8 int_8f_pending; |
| 152 | | } ipc_interface_t; |
| 152 | }; |
| 153 | 153 | |
| 154 | 154 | /* Mouse/Joystick */ |
| 155 | | typedef struct |
| 155 | struct _mouse_joy_state |
| 156 | 156 | { |
| 157 | 157 | UINT8 m_mouse_px; |
| 158 | 158 | UINT8 m_mouse_py; |
| r17909 | r17910 | |
| 169 | 169 | UINT8 m_reg0a4; |
| 170 | 170 | |
| 171 | 171 | emu_timer *m_mouse_timer; |
| 172 | | } _mouse_joy_state; |
| 172 | }; |
| 173 | 173 | |
| 174 | 174 | |
| 175 | 175 | class rmnimbus_state : public driver_device |
trunk/src/mess/video/newport.c
| r17909 | r17910 | |
| 52 | 52 | static READ32_HANDLER( newport_vc2_r ); |
| 53 | 53 | static WRITE32_HANDLER( newport_vc2_w ); |
| 54 | 54 | |
| 55 | | typedef struct |
| 55 | struct VC2_t |
| 56 | 56 | { |
| 57 | 57 | UINT16 nRegister[0x21]; |
| 58 | 58 | UINT16 nRAM[0x8000]; |
| 59 | 59 | UINT8 nRegIdx; |
| 60 | 60 | UINT16 nRegData; |
| 61 | | } VC2_t; |
| 61 | }; |
| 62 | 62 | |
| 63 | 63 | #define VC2_VIDENTRY pNVID->VC2.nRegister[0x00] |
| 64 | 64 | #define VC2_CURENTRY pNVID->VC2.nRegister[0x01] |
| r17909 | r17910 | |
| 79 | 79 | #define VC2_DISPLAYCTRL pNVID->VC2.nRegister[0x10] |
| 80 | 80 | #define VC2_CONFIG pNVID->VC2.nRegister[0x1f] |
| 81 | 81 | |
| 82 | | typedef struct |
| 82 | struct XMAP_t |
| 83 | 83 | { |
| 84 | 84 | UINT32 nRegister[0x08]; |
| 85 | 85 | UINT32 nModeTable[0x20]; |
| 86 | | } XMAP_t; |
| 86 | }; |
| 87 | 87 | |
| 88 | 88 | #define XMAP0_CONFIG pNVID->XMAP0.nRegister[0x00] |
| 89 | 89 | #define XMAP0_REVISION pNVID->XMAP0.nRegister[0x01] |
| r17909 | r17910 | |
| 100 | 100 | #define XMAP1_MODETBLIDX pNVID->XMAP1.nRegister[0x07] |
| 101 | 101 | |
| 102 | 102 | |
| 103 | | typedef struct |
| 103 | struct REX3_t |
| 104 | 104 | { |
| 105 | 105 | UINT32 nDrawMode1; |
| 106 | 106 | UINT32 nDrawMode0; |
| r17909 | r17910 | |
| 177 | 177 | UINT32 nCurrentY; |
| 178 | 178 | #endif |
| 179 | 179 | UINT32 nKludge_SkipLine; |
| 180 | | } REX3_t; |
| 180 | }; |
| 181 | 181 | |
| 182 | 182 | |
| 183 | | typedef struct |
| 183 | struct CMAP_t |
| 184 | 184 | { |
| 185 | 185 | UINT16 nPaletteIndex; |
| 186 | 186 | UINT32 nPalette[0x10000]; |
| 187 | | } CMAP_t; |
| 187 | }; |
| 188 | 188 | |
| 189 | 189 | struct newport_video_t |
| 190 | 190 | { |
trunk/src/mess/video/crt.c
| r17909 | r17910 | |
| 32 | 32 | #include "video/crt.h" |
| 33 | 33 | |
| 34 | 34 | |
| 35 | | typedef struct |
| 35 | struct point |
| 36 | 36 | { |
| 37 | 37 | int intensity; /* current intensity of the pixel */ |
| 38 | 38 | /* a node is not in the list when (intensity == -1) */ |
| 39 | 39 | int next; /* index of next pixel in list */ |
| 40 | | } point; |
| 40 | }; |
| 41 | 41 | |
| 42 | 42 | enum |
| 43 | 43 | { |
| 44 | 44 | intensity_pixel_not_in_list = -1 /* special value that tells that the node is not in list */ |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | | typedef struct |
| 47 | struct crt_t |
| 48 | 48 | { |
| 49 | 49 | point *list; /* array of (crt_window_width*crt_window_height) point */ |
| 50 | 50 | int *list_head; /* head of the list of lit pixels (index in the array) */ |
| r17909 | r17910 | |
| 56 | 56 | int num_intensity_levels; |
| 57 | 57 | int window_offset_x, window_offset_y; |
| 58 | 58 | int window_width, window_height; |
| 59 | | } crt_t; |
| 59 | }; |
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | INLINE crt_t *get_safe_token(device_t *device) |
trunk/src/mess/drivers/cgenie.c
| r17909 | r17910 | |
| 626 | 626 | // GATL GAT Length |
| 627 | 627 | // GATM GAT Mask |
| 628 | 628 | // DDGA Disk Directory Granule Allocation |
| 629 | | typedef struct |
| 629 | struct PDRIVE |
| 630 | 630 | { |
| 631 | 631 | UINT8 DDSL; // Disk Directory Start Lump (lump number of GAT) |
| 632 | 632 | UINT8 GATL; // # of bytes used in the Granule Allocation Table sector |
| r17909 | r17910 | |
| 638 | 638 | UINT8 FLAGS; // ???? some flags (SS/DS bit 6) |
| 639 | 639 | UINT8 GPL; // Sectors per granule (always 5 for the Colour Genie) |
| 640 | 640 | UINT8 DDGA; // Disk Directory Granule allocation (number of driectory granules) |
| 641 | | } PDRIVE; |
| 641 | }; |
| 642 | 642 | |
| 643 | 643 | static const PDRIVE pd_list[12] = { |
| 644 | 644 | {0x14, 0x28, 0x07, 0x28, 0x0A, 0x02, 0x00, 0x00, 0x05, 0x02}, // CMD"<0=A" 40 tracks, SS, SD |