ascreg.h revision 1.4 1 1.4 nat /* $NetBSD: ascreg.h,v 1.4 2025/04/09 13:07:54 nat Exp $ */
2 1.1 nat
3 1.1 nat /*-
4 1.1 nat * Copyright (c) 2017, 2023 Nathanial Sloss <nathanialsloss (at) yahoo.com.au>
5 1.1 nat * All rights reserved.
6 1.1 nat *
7 1.1 nat * Redistribution and use in source and binary forms, with or without
8 1.1 nat * modification, are permitted provided that the following conditions
9 1.1 nat * are met:
10 1.1 nat * 1. Redistributions of source code must retain the above copyright
11 1.1 nat * notice, this list of conditions and the following disclaimer.
12 1.1 nat * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 nat * notice, this list of conditions and the following disclaimer in the
14 1.1 nat * documentation and/or other materials provided with the distribution.
15 1.1 nat *
16 1.1 nat * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 1.1 nat * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 1.1 nat * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 1.1 nat * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 1.1 nat * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 1.1 nat * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 1.1 nat * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 1.1 nat * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 1.1 nat * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 1.1 nat * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 1.1 nat * POSSIBILITY OF SUCH DAMAGE.
27 1.1 nat */
28 1.1 nat
29 1.1 nat #ifndef _SYS_ARCH_MAC68K_OBIO_ASCREG_H
30 1.1 nat #define _SYS_ARCH_MAC68K_OBIO_ASCREG_H
31 1.1 nat
32 1.1 nat #define ASCIRQ 5
33 1.1 nat
34 1.4 nat #define EASC_VER 0xb0
35 1.4 nat #define EASC_VER2 0xbb
36 1.4 nat
37 1.1 nat #define FIFO_A 0
38 1.1 nat #define FIFO_B 0x400
39 1.2 nat #define FIFO_A_ALT 0x1000
40 1.2 nat #define FIFO_B_ALT 0x1800
41 1.1 nat #define FIFO_LEN 0x400
42 1.1 nat
43 1.1 nat #define VERLOC 0x800
44 1.1 nat
45 1.3 riastrad #define ASCMODE 0x801
46 1.1 nat #define MODESTOP 0
47 1.1 nat #define MODEFIFO 1
48 1.1 nat #define MODEWAVE 2 /* not in easc */
49 1.1 nat
50 1.1 nat #define ASCTRL 0x802
51 1.1 nat #define UNDERRUN __BIT(7)
52 1.1 nat #define STEREO __BIT(1)
53 1.1 nat #define ANAPWM __BIT(0)
54 1.1 nat
55 1.1 nat #define FIFOPARAM 0x803
56 1.1 nat #define CLEARFIFO __BIT(7)
57 1.1 nat #define NONCOMP __BIT(1)
58 1.1 nat #define ROMCOMP __BIT(0)
59 1.1 nat
60 1.1 nat #define FIFOSTATUS 0x804
61 1.1 nat #define A_HALF __BIT(0)
62 1.1 nat #define A_FULL __BIT(1)
63 1.1 nat #define B_HALF __BIT(2)
64 1.1 nat #define B_FULL __BIT(3)
65 1.1 nat
66 1.1 nat #define INTVOL 0x806 /* b2-b4 Int volume. b5-b7 ext. */
67 1.1 nat
68 1.1 nat #define ASCRATE 0x807
69 1.1 nat #define MACFREQ 0 /* 22254 Hz */
70 1.1 nat #define F22KHZ 2 /* 22050 Hz */
71 1.3 riastrad #define F44KHZ 3 /* 44100 Hz */
72 1.1 nat
73 1.1 nat #define APLAYREC 0x80a
74 1.1 nat #define RECORDA __BIT(0)
75 1.1 nat #define REC22KHZ __BIT(1)
76 1.1 nat
77 1.1 nat #define ASCTEST 0x80f
78 1.1 nat
79 1.1 nat #define A_WRITEPTRHI 0xf00
80 1.1 nat #define A_WRITEPTRLO 0xf01
81 1.1 nat #define A_READPTRHI 0xf02
82 1.1 nat #define A_READPTRLO 0xf03
83 1.1 nat #define B_WRITEPTRHI 0xf20
84 1.1 nat #define B_WRITEPTRLO 0xf21
85 1.1 nat #define B_READPTRHI 0xf22
86 1.1 nat #define B_READPTRLO 0xf23
87 1.1 nat
88 1.2 nat #define MACOS_HIGH_VOL 0x36 /* Should NOT exceed this value */
89 1.2 nat
90 1.1 nat #define A_LEFT_VOL 0xf06
91 1.1 nat #define A_RIGHT_VOL 0xf07
92 1.1 nat #define B_LEFT_VOL 0xf26
93 1.1 nat #define B_RIGHT_VOL 0xf27
94 1.1 nat
95 1.1 nat #define FIFOCTRLA 0xf08
96 1.1 nat #define FIFOCTRLB 0xf28
97 1.1 nat #define CDQUALITY 0x81
98 1.1 nat #define MACDEFAULTS 0x80
99 1.1 nat
100 1.1 nat #define IRQA 0xf09
101 1.1 nat #define IRQB 0xf29
102 1.1 nat #define DISABLEHALFIRQ __BIT(0)
103 1.1 nat
104 1.1 nat #endif /* !_SYS_ARCH_MAC68K_OBIO_ASCREG_H */
105