1#[repr(C)]
4#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
5pub struct __BindgenBitfieldUnit<Storage> {
6 storage: Storage,
7}
8impl<Storage> __BindgenBitfieldUnit<Storage> {
9 #[inline]
10 pub const fn new(storage: Storage) -> Self {
11 Self { storage }
12 }
13}
14impl<Storage> __BindgenBitfieldUnit<Storage>
15where
16 Storage: AsRef<[u8]> + AsMut<[u8]>,
17{
18 #[inline]
19 fn extract_bit(byte: u8, index: usize) -> bool {
20 let bit_index = if cfg!(target_endian = "big") {
21 7 - (index % 8)
22 } else {
23 index % 8
24 };
25 let mask = 1 << bit_index;
26 byte & mask == mask
27 }
28 #[inline]
29 pub fn get_bit(&self, index: usize) -> bool {
30 debug_assert!(index / 8 < self.storage.as_ref().len());
31 let byte_index = index / 8;
32 let byte = self.storage.as_ref()[byte_index];
33 Self::extract_bit(byte, index)
34 }
35 #[inline]
36 pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
37 debug_assert!(index / 8 < core::mem::size_of::<Storage>());
38 let byte_index = index / 8;
39 let byte = unsafe {
40 *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
41 };
42 Self::extract_bit(byte, index)
43 }
44 #[inline]
45 fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
46 let bit_index = if cfg!(target_endian = "big") {
47 7 - (index % 8)
48 } else {
49 index % 8
50 };
51 let mask = 1 << bit_index;
52 if val { byte | mask } else { byte & !mask }
53 }
54 #[inline]
55 pub fn set_bit(&mut self, index: usize, val: bool) {
56 debug_assert!(index / 8 < self.storage.as_ref().len());
57 let byte_index = index / 8;
58 let byte = &mut self.storage.as_mut()[byte_index];
59 *byte = Self::change_bit(*byte, index, val);
60 }
61 #[inline]
62 pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
63 debug_assert!(index / 8 < core::mem::size_of::<Storage>());
64 let byte_index = index / 8;
65 let byte = unsafe {
66 (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
67 };
68 unsafe { *byte = Self::change_bit(*byte, index, val) };
69 }
70 #[inline]
71 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
72 debug_assert!(bit_width <= 64);
73 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
74 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
75 let mut val = 0;
76 for i in 0..(bit_width as usize) {
77 if self.get_bit(i + bit_offset) {
78 let index = if cfg!(target_endian = "big") {
79 bit_width as usize - 1 - i
80 } else {
81 i
82 };
83 val |= 1 << index;
84 }
85 }
86 val
87 }
88 #[inline]
89 pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
90 debug_assert!(bit_width <= 64);
91 debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
92 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
93 let mut val = 0;
94 for i in 0..(bit_width as usize) {
95 if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
96 let index = if cfg!(target_endian = "big") {
97 bit_width as usize - 1 - i
98 } else {
99 i
100 };
101 val |= 1 << index;
102 }
103 }
104 val
105 }
106 #[inline]
107 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
108 debug_assert!(bit_width <= 64);
109 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
110 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
111 for i in 0..(bit_width as usize) {
112 let mask = 1 << i;
113 let val_bit_is_set = val & mask == mask;
114 let index = if cfg!(target_endian = "big") {
115 bit_width as usize - 1 - i
116 } else {
117 i
118 };
119 self.set_bit(index + bit_offset, val_bit_is_set);
120 }
121 }
122 #[inline]
123 pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
124 debug_assert!(bit_width <= 64);
125 debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
126 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
127 for i in 0..(bit_width as usize) {
128 let mask = 1 << i;
129 let val_bit_is_set = val & mask == mask;
130 let index = if cfg!(target_endian = "big") {
131 bit_width as usize - 1 - i
132 } else {
133 i
134 };
135 unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
136 }
137 }
138}
139#[repr(C)]
140#[derive(Default)]
141pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
142impl<T> __IncompleteArrayField<T> {
143 #[inline]
144 pub const fn new() -> Self {
145 __IncompleteArrayField(::core::marker::PhantomData, [])
146 }
147 #[inline]
148 pub fn as_ptr(&self) -> *const T {
149 self as *const _ as *const T
150 }
151 #[inline]
152 pub fn as_mut_ptr(&mut self) -> *mut T {
153 self as *mut _ as *mut T
154 }
155 #[inline]
156 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
157 unsafe { ::core::slice::from_raw_parts(self.as_ptr(), len) }
158 }
159 #[inline]
160 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
161 unsafe { ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) }
162 }
163}
164impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
165 fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
166 fmt.write_str("__IncompleteArrayField")
167 }
168}
169pub type __int64_t = ::core::ffi::c_longlong;
170pub type __darwin_time_t = ::core::ffi::c_long;
171pub type __darwin_off_t = __int64_t;
172pub type time_t = __darwin_time_t;
173pub const GB_model_t_GB_MODEL_DMG_B: GB_model_t = 2;
174pub const GB_model_t_GB_MODEL_SGB: GB_model_t = 4;
175pub const GB_model_t_GB_MODEL_SGB_NTSC: GB_model_t = 4;
176pub const GB_model_t_GB_MODEL_SGB_PAL: GB_model_t = 68;
177pub const GB_model_t_GB_MODEL_SGB_NTSC_NO_SFC: GB_model_t = 132;
178pub const GB_model_t_GB_MODEL_SGB_NO_SFC: GB_model_t = 132;
179pub const GB_model_t_GB_MODEL_SGB_PAL_NO_SFC: GB_model_t = 196;
180pub const GB_model_t_GB_MODEL_MGB: GB_model_t = 256;
181pub const GB_model_t_GB_MODEL_SGB2: GB_model_t = 257;
182pub const GB_model_t_GB_MODEL_SGB2_NO_SFC: GB_model_t = 385;
183pub const GB_model_t_GB_MODEL_CGB_0: GB_model_t = 512;
184pub const GB_model_t_GB_MODEL_CGB_A: GB_model_t = 513;
185pub const GB_model_t_GB_MODEL_CGB_B: GB_model_t = 514;
186pub const GB_model_t_GB_MODEL_CGB_C: GB_model_t = 515;
187pub const GB_model_t_GB_MODEL_CGB_D: GB_model_t = 516;
188pub const GB_model_t_GB_MODEL_CGB_E: GB_model_t = 517;
189pub const GB_model_t_GB_MODEL_AGB_A: GB_model_t = 519;
190pub const GB_model_t_GB_MODEL_GBP_A: GB_model_t = 551;
191pub const GB_model_t_GB_MODEL_AGB: GB_model_t = 519;
192pub const GB_model_t_GB_MODEL_GBP: GB_model_t = 551;
193pub type GB_model_t = ::core::ffi::c_uint;
194pub type GB_gameboy_t = GB_gameboy_s;
195unsafe extern "C" {
196 pub fn GB_save_state(
197 gb: *mut GB_gameboy_t,
198 path: *const ::core::ffi::c_char,
199 ) -> ::core::ffi::c_int;
200}
201unsafe extern "C" {
202 pub fn GB_get_save_state_size(gb: *mut GB_gameboy_t) -> usize;
203}
204unsafe extern "C" {
205 pub fn GB_save_state_to_buffer(gb: *mut GB_gameboy_t, buffer: *mut u8);
206}
207unsafe extern "C" {
208 pub fn GB_load_state(
209 gb: *mut GB_gameboy_t,
210 path: *const ::core::ffi::c_char,
211 ) -> ::core::ffi::c_int;
212}
213unsafe extern "C" {
214 pub fn GB_load_state_from_buffer(
215 gb: *mut GB_gameboy_t,
216 buffer: *const u8,
217 length: usize,
218 ) -> ::core::ffi::c_int;
219}
220unsafe extern "C" {
221 pub fn GB_is_save_state(path: *const ::core::ffi::c_char) -> bool;
222}
223unsafe extern "C" {
224 pub fn GB_get_state_model(
225 path: *const ::core::ffi::c_char,
226 model: *mut GB_model_t,
227 ) -> ::core::ffi::c_int;
228}
229unsafe extern "C" {
230 pub fn GB_get_state_model_from_buffer(
231 buffer: *const u8,
232 length: usize,
233 model: *mut GB_model_t,
234 ) -> ::core::ffi::c_int;
235}
236pub type fpos_t = __darwin_off_t;
237#[repr(C)]
238#[derive(Debug, Copy, Clone)]
239pub struct __sbuf {
240 pub _base: *mut ::core::ffi::c_uchar,
241 pub _size: ::core::ffi::c_int,
242}
243#[allow(clippy::unnecessary_operation, clippy::identity_op)]
244const _: () = {
245 ["Size of __sbuf"][::core::mem::size_of::<__sbuf>() - 16usize];
246 ["Alignment of __sbuf"][::core::mem::align_of::<__sbuf>() - 8usize];
247 ["Offset of field: __sbuf::_base"][::core::mem::offset_of!(__sbuf, _base) - 0usize];
248 ["Offset of field: __sbuf::_size"][::core::mem::offset_of!(__sbuf, _size) - 8usize];
249};
250#[repr(C)]
251#[derive(Debug, Copy, Clone)]
252pub struct __sFILEX {
253 _unused: [u8; 0],
254}
255#[repr(C)]
256#[derive(Debug, Copy, Clone)]
257pub struct __sFILE {
258 pub _p: *mut ::core::ffi::c_uchar,
259 pub _r: ::core::ffi::c_int,
260 pub _w: ::core::ffi::c_int,
261 pub _flags: ::core::ffi::c_short,
262 pub _file: ::core::ffi::c_short,
263 pub _bf: __sbuf,
264 pub _lbfsize: ::core::ffi::c_int,
265 pub _cookie: *mut ::core::ffi::c_void,
266 pub _close: ::core::option::Option<
267 unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int,
268 >,
269 pub _read: ::core::option::Option<
270 unsafe extern "C" fn(
271 arg1: *mut ::core::ffi::c_void,
272 arg2: *mut ::core::ffi::c_char,
273 arg3: ::core::ffi::c_int,
274 ) -> ::core::ffi::c_int,
275 >,
276 pub _seek: ::core::option::Option<
277 unsafe extern "C" fn(
278 arg1: *mut ::core::ffi::c_void,
279 arg2: fpos_t,
280 arg3: ::core::ffi::c_int,
281 ) -> fpos_t,
282 >,
283 pub _write: ::core::option::Option<
284 unsafe extern "C" fn(
285 arg1: *mut ::core::ffi::c_void,
286 arg2: *const ::core::ffi::c_char,
287 arg3: ::core::ffi::c_int,
288 ) -> ::core::ffi::c_int,
289 >,
290 pub _ub: __sbuf,
291 pub _extra: *mut __sFILEX,
292 pub _ur: ::core::ffi::c_int,
293 pub _ubuf: [::core::ffi::c_uchar; 3usize],
294 pub _nbuf: [::core::ffi::c_uchar; 1usize],
295 pub _lb: __sbuf,
296 pub _blksize: ::core::ffi::c_int,
297 pub _offset: fpos_t,
298}
299#[allow(clippy::unnecessary_operation, clippy::identity_op)]
300const _: () = {
301 ["Size of __sFILE"][::core::mem::size_of::<__sFILE>() - 152usize];
302 ["Alignment of __sFILE"][::core::mem::align_of::<__sFILE>() - 8usize];
303 ["Offset of field: __sFILE::_p"][::core::mem::offset_of!(__sFILE, _p) - 0usize];
304 ["Offset of field: __sFILE::_r"][::core::mem::offset_of!(__sFILE, _r) - 8usize];
305 ["Offset of field: __sFILE::_w"][::core::mem::offset_of!(__sFILE, _w) - 12usize];
306 ["Offset of field: __sFILE::_flags"][::core::mem::offset_of!(__sFILE, _flags) - 16usize];
307 ["Offset of field: __sFILE::_file"][::core::mem::offset_of!(__sFILE, _file) - 18usize];
308 ["Offset of field: __sFILE::_bf"][::core::mem::offset_of!(__sFILE, _bf) - 24usize];
309 ["Offset of field: __sFILE::_lbfsize"][::core::mem::offset_of!(__sFILE, _lbfsize) - 40usize];
310 ["Offset of field: __sFILE::_cookie"][::core::mem::offset_of!(__sFILE, _cookie) - 48usize];
311 ["Offset of field: __sFILE::_close"][::core::mem::offset_of!(__sFILE, _close) - 56usize];
312 ["Offset of field: __sFILE::_read"][::core::mem::offset_of!(__sFILE, _read) - 64usize];
313 ["Offset of field: __sFILE::_seek"][::core::mem::offset_of!(__sFILE, _seek) - 72usize];
314 ["Offset of field: __sFILE::_write"][::core::mem::offset_of!(__sFILE, _write) - 80usize];
315 ["Offset of field: __sFILE::_ub"][::core::mem::offset_of!(__sFILE, _ub) - 88usize];
316 ["Offset of field: __sFILE::_extra"][::core::mem::offset_of!(__sFILE, _extra) - 104usize];
317 ["Offset of field: __sFILE::_ur"][::core::mem::offset_of!(__sFILE, _ur) - 112usize];
318 ["Offset of field: __sFILE::_ubuf"][::core::mem::offset_of!(__sFILE, _ubuf) - 116usize];
319 ["Offset of field: __sFILE::_nbuf"][::core::mem::offset_of!(__sFILE, _nbuf) - 119usize];
320 ["Offset of field: __sFILE::_lb"][::core::mem::offset_of!(__sFILE, _lb) - 120usize];
321 ["Offset of field: __sFILE::_blksize"][::core::mem::offset_of!(__sFILE, _blksize) - 136usize];
322 ["Offset of field: __sFILE::_offset"][::core::mem::offset_of!(__sFILE, _offset) - 144usize];
323};
324pub type FILE = __sFILE;
325#[repr(C)]
326#[derive(Debug, Copy, Clone)]
327pub struct GB_sample_t {
328 pub left: i16,
329 pub right: i16,
330}
331#[allow(clippy::unnecessary_operation, clippy::identity_op)]
332const _: () = {
333 ["Size of GB_sample_t"][::core::mem::size_of::<GB_sample_t>() - 4usize];
334 ["Alignment of GB_sample_t"][::core::mem::align_of::<GB_sample_t>() - 2usize];
335 ["Offset of field: GB_sample_t::left"][::core::mem::offset_of!(GB_sample_t, left) - 0usize];
336 ["Offset of field: GB_sample_t::right"][::core::mem::offset_of!(GB_sample_t, right) - 2usize];
337};
338#[repr(C)]
339#[derive(Debug, Copy, Clone)]
340pub struct GB_double_sample_t {
341 pub left: f64,
342 pub right: f64,
343}
344#[allow(clippy::unnecessary_operation, clippy::identity_op)]
345const _: () = {
346 ["Size of GB_double_sample_t"][::core::mem::size_of::<GB_double_sample_t>() - 16usize];
347 ["Alignment of GB_double_sample_t"][::core::mem::align_of::<GB_double_sample_t>() - 8usize];
348 ["Offset of field: GB_double_sample_t::left"]
349 [::core::mem::offset_of!(GB_double_sample_t, left) - 0usize];
350 ["Offset of field: GB_double_sample_t::right"]
351 [::core::mem::offset_of!(GB_double_sample_t, right) - 8usize];
352};
353pub const GB_channel_t_GB_SQUARE_1: GB_channel_t = 0;
354pub const GB_channel_t_GB_SQUARE_2: GB_channel_t = 1;
355pub const GB_channel_t_GB_WAVE: GB_channel_t = 2;
356pub const GB_channel_t_GB_NOISE: GB_channel_t = 3;
357pub const GB_channel_t_GB_N_CHANNELS: GB_channel_t = 4;
358pub type GB_channel_t = ::core::ffi::c_uint;
359#[repr(C)]
360#[derive(Debug, Copy, Clone)]
361pub struct GB_envelope_clock_t {
362 pub _bitfield_align_1: [u8; 0],
363 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
364}
365#[allow(clippy::unnecessary_operation, clippy::identity_op)]
366const _: () = {
367 ["Size of GB_envelope_clock_t"][::core::mem::size_of::<GB_envelope_clock_t>() - 1usize];
368 ["Alignment of GB_envelope_clock_t"][::core::mem::align_of::<GB_envelope_clock_t>() - 1usize];
369};
370impl GB_envelope_clock_t {
371 #[inline]
372 pub fn locked(&self) -> bool {
373 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
374 }
375 #[inline]
376 pub fn set_locked(&mut self, val: bool) {
377 unsafe {
378 let val: u8 = ::core::mem::transmute(val);
379 self._bitfield_1.set(0usize, 1u8, val as u64)
380 }
381 }
382 #[inline]
383 pub unsafe fn locked_raw(this: *const Self) -> bool {
384 unsafe {
385 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
386 ::core::ptr::addr_of!((*this)._bitfield_1),
387 0usize,
388 1u8,
389 ) as u8)
390 }
391 }
392 #[inline]
393 pub unsafe fn set_locked_raw(this: *mut Self, val: bool) {
394 unsafe {
395 let val: u8 = ::core::mem::transmute(val);
396 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
397 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
398 0usize,
399 1u8,
400 val as u64,
401 )
402 }
403 }
404 #[inline]
405 pub fn clock(&self) -> bool {
406 unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
407 }
408 #[inline]
409 pub fn set_clock(&mut self, val: bool) {
410 unsafe {
411 let val: u8 = ::core::mem::transmute(val);
412 self._bitfield_1.set(1usize, 1u8, val as u64)
413 }
414 }
415 #[inline]
416 pub unsafe fn clock_raw(this: *const Self) -> bool {
417 unsafe {
418 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
419 ::core::ptr::addr_of!((*this)._bitfield_1),
420 1usize,
421 1u8,
422 ) as u8)
423 }
424 }
425 #[inline]
426 pub unsafe fn set_clock_raw(this: *mut Self, val: bool) {
427 unsafe {
428 let val: u8 = ::core::mem::transmute(val);
429 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
430 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
431 1usize,
432 1u8,
433 val as u64,
434 )
435 }
436 }
437 #[inline]
438 pub fn should_lock(&self) -> bool {
439 unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
440 }
441 #[inline]
442 pub fn set_should_lock(&mut self, val: bool) {
443 unsafe {
444 let val: u8 = ::core::mem::transmute(val);
445 self._bitfield_1.set(2usize, 1u8, val as u64)
446 }
447 }
448 #[inline]
449 pub unsafe fn should_lock_raw(this: *const Self) -> bool {
450 unsafe {
451 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
452 ::core::ptr::addr_of!((*this)._bitfield_1),
453 2usize,
454 1u8,
455 ) as u8)
456 }
457 }
458 #[inline]
459 pub unsafe fn set_should_lock_raw(this: *mut Self, val: bool) {
460 unsafe {
461 let val: u8 = ::core::mem::transmute(val);
462 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
463 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
464 2usize,
465 1u8,
466 val as u64,
467 )
468 }
469 }
470 #[inline]
471 pub fn padding(&self) -> u8 {
472 unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u8) }
473 }
474 #[inline]
475 pub fn set_padding(&mut self, val: u8) {
476 unsafe {
477 let val: u8 = ::core::mem::transmute(val);
478 self._bitfield_1.set(3usize, 5u8, val as u64)
479 }
480 }
481 #[inline]
482 pub unsafe fn padding_raw(this: *const Self) -> u8 {
483 unsafe {
484 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
485 ::core::ptr::addr_of!((*this)._bitfield_1),
486 3usize,
487 5u8,
488 ) as u8)
489 }
490 }
491 #[inline]
492 pub unsafe fn set_padding_raw(this: *mut Self, val: u8) {
493 unsafe {
494 let val: u8 = ::core::mem::transmute(val);
495 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
496 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
497 3usize,
498 5u8,
499 val as u64,
500 )
501 }
502 }
503 #[inline]
504 pub fn new_bitfield_1(
505 locked: bool,
506 clock: bool,
507 should_lock: bool,
508 padding: u8,
509 ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
510 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
511 __bindgen_bitfield_unit.set(0usize, 1u8, {
512 let locked: u8 = unsafe { ::core::mem::transmute(locked) };
513 locked as u64
514 });
515 __bindgen_bitfield_unit.set(1usize, 1u8, {
516 let clock: u8 = unsafe { ::core::mem::transmute(clock) };
517 clock as u64
518 });
519 __bindgen_bitfield_unit.set(2usize, 1u8, {
520 let should_lock: u8 = unsafe { ::core::mem::transmute(should_lock) };
521 should_lock as u64
522 });
523 __bindgen_bitfield_unit.set(3usize, 5u8, {
524 let padding: u8 = unsafe { ::core::mem::transmute(padding) };
525 padding as u64
526 });
527 __bindgen_bitfield_unit
528 }
529}
530pub type GB_sample_callback_t =
531 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, sample: *mut GB_sample_t)>;
532#[repr(C)]
533#[derive(Debug, Copy, Clone)]
534pub struct GB_apu_t {
535 pub global_enable: bool,
536 pub apu_cycles: u16,
537 pub samples: [u8; 4usize],
538 pub is_active: [bool; 4usize],
539 pub div_divider: u8,
540 pub lf_div: u8,
541 pub square_sweep_countdown: u8,
542 pub square_sweep_calculate_countdown: u8,
543 pub square_sweep_calculate_countdown_reload_timer: u8,
544 pub sweep_length_addend: u16,
545 pub shadow_sweep_sample_length: u16,
546 pub unshifted_sweep: bool,
547 pub square_sweep_instant_calculation_done: bool,
548 pub channel_1_restart_hold: u8,
549 pub channel1_completed_addend: u16,
550 pub square_channels: [GB_apu_t__bindgen_ty_1; 2usize],
551 pub wave_channel: GB_apu_t__bindgen_ty_2,
552 pub noise_channel: GB_apu_t__bindgen_ty_3,
553 pub skip_div_event: GB_apu_t__bindgen_ty_4,
554 pub pcm_mask: [u8; 2usize],
555 pub apu_cycles_in_2mhz: bool,
556 pub pending_envelope_tick: bool,
557}
558#[repr(C)]
559#[derive(Debug, Copy, Clone)]
560pub struct GB_apu_t__bindgen_ty_1 {
561 pub pulse_length: u16,
562 pub current_volume: u8,
563 pub volume_countdown: u8,
564 pub current_sample_index: u8,
565 pub sample_surpressed: bool,
566 pub sample_countdown: u16,
567 pub sample_length: u16,
568 pub length_enabled: bool,
569 pub envelope_clock: GB_envelope_clock_t,
570 pub delay: u8,
571 pub _bitfield_align_1: [u8; 0],
572 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
573}
574#[allow(clippy::unnecessary_operation, clippy::identity_op)]
575const _: () = {
576 ["Size of GB_apu_t__bindgen_ty_1"][::core::mem::size_of::<GB_apu_t__bindgen_ty_1>() - 14usize];
577 ["Alignment of GB_apu_t__bindgen_ty_1"]
578 [::core::mem::align_of::<GB_apu_t__bindgen_ty_1>() - 2usize];
579 ["Offset of field: GB_apu_t__bindgen_ty_1::pulse_length"]
580 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, pulse_length) - 0usize];
581 ["Offset of field: GB_apu_t__bindgen_ty_1::current_volume"]
582 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, current_volume) - 2usize];
583 ["Offset of field: GB_apu_t__bindgen_ty_1::volume_countdown"]
584 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, volume_countdown) - 3usize];
585 ["Offset of field: GB_apu_t__bindgen_ty_1::current_sample_index"]
586 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, current_sample_index) - 4usize];
587 ["Offset of field: GB_apu_t__bindgen_ty_1::sample_surpressed"]
588 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, sample_surpressed) - 5usize];
589 ["Offset of field: GB_apu_t__bindgen_ty_1::sample_countdown"]
590 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, sample_countdown) - 6usize];
591 ["Offset of field: GB_apu_t__bindgen_ty_1::sample_length"]
592 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, sample_length) - 8usize];
593 ["Offset of field: GB_apu_t__bindgen_ty_1::length_enabled"]
594 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, length_enabled) - 10usize];
595 ["Offset of field: GB_apu_t__bindgen_ty_1::envelope_clock"]
596 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, envelope_clock) - 11usize];
597 ["Offset of field: GB_apu_t__bindgen_ty_1::delay"]
598 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_1, delay) - 12usize];
599};
600impl GB_apu_t__bindgen_ty_1 {
601 #[inline]
602 pub fn did_tick(&self) -> bool {
603 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
604 }
605 #[inline]
606 pub fn set_did_tick(&mut self, val: bool) {
607 unsafe {
608 let val: u8 = ::core::mem::transmute(val);
609 self._bitfield_1.set(0usize, 1u8, val as u64)
610 }
611 }
612 #[inline]
613 pub unsafe fn did_tick_raw(this: *const Self) -> bool {
614 unsafe {
615 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
616 ::core::ptr::addr_of!((*this)._bitfield_1),
617 0usize,
618 1u8,
619 ) as u8)
620 }
621 }
622 #[inline]
623 pub unsafe fn set_did_tick_raw(this: *mut Self, val: bool) {
624 unsafe {
625 let val: u8 = ::core::mem::transmute(val);
626 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
627 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
628 0usize,
629 1u8,
630 val as u64,
631 )
632 }
633 }
634 #[inline]
635 pub fn just_reloaded(&self) -> bool {
636 unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
637 }
638 #[inline]
639 pub fn set_just_reloaded(&mut self, val: bool) {
640 unsafe {
641 let val: u8 = ::core::mem::transmute(val);
642 self._bitfield_1.set(1usize, 1u8, val as u64)
643 }
644 }
645 #[inline]
646 pub unsafe fn just_reloaded_raw(this: *const Self) -> bool {
647 unsafe {
648 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
649 ::core::ptr::addr_of!((*this)._bitfield_1),
650 1usize,
651 1u8,
652 ) as u8)
653 }
654 }
655 #[inline]
656 pub unsafe fn set_just_reloaded_raw(this: *mut Self, val: bool) {
657 unsafe {
658 let val: u8 = ::core::mem::transmute(val);
659 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
660 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
661 1usize,
662 1u8,
663 val as u64,
664 )
665 }
666 }
667 #[inline]
668 pub fn padding(&self) -> u8 {
669 unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) }
670 }
671 #[inline]
672 pub fn set_padding(&mut self, val: u8) {
673 unsafe {
674 let val: u8 = ::core::mem::transmute(val);
675 self._bitfield_1.set(2usize, 6u8, val as u64)
676 }
677 }
678 #[inline]
679 pub unsafe fn padding_raw(this: *const Self) -> u8 {
680 unsafe {
681 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
682 ::core::ptr::addr_of!((*this)._bitfield_1),
683 2usize,
684 6u8,
685 ) as u8)
686 }
687 }
688 #[inline]
689 pub unsafe fn set_padding_raw(this: *mut Self, val: u8) {
690 unsafe {
691 let val: u8 = ::core::mem::transmute(val);
692 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
693 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
694 2usize,
695 6u8,
696 val as u64,
697 )
698 }
699 }
700 #[inline]
701 pub fn new_bitfield_1(
702 did_tick: bool,
703 just_reloaded: bool,
704 padding: u8,
705 ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
706 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
707 __bindgen_bitfield_unit.set(0usize, 1u8, {
708 let did_tick: u8 = unsafe { ::core::mem::transmute(did_tick) };
709 did_tick as u64
710 });
711 __bindgen_bitfield_unit.set(1usize, 1u8, {
712 let just_reloaded: u8 = unsafe { ::core::mem::transmute(just_reloaded) };
713 just_reloaded as u64
714 });
715 __bindgen_bitfield_unit.set(2usize, 6u8, {
716 let padding: u8 = unsafe { ::core::mem::transmute(padding) };
717 padding as u64
718 });
719 __bindgen_bitfield_unit
720 }
721}
722#[repr(C)]
723#[derive(Debug, Copy, Clone)]
724pub struct GB_apu_t__bindgen_ty_2 {
725 pub enable: bool,
726 pub pulse_length: u16,
727 pub shift: u8,
728 pub sample_length: u16,
729 pub length_enabled: bool,
730 pub sample_countdown: u16,
731 pub current_sample_index: u8,
732 pub current_sample_byte: u8,
733 pub wave_form_just_read: bool,
734 pub pulsed: bool,
735 pub bugged_read_countdown: u8,
736}
737#[allow(clippy::unnecessary_operation, clippy::identity_op)]
738const _: () = {
739 ["Size of GB_apu_t__bindgen_ty_2"][::core::mem::size_of::<GB_apu_t__bindgen_ty_2>() - 18usize];
740 ["Alignment of GB_apu_t__bindgen_ty_2"]
741 [::core::mem::align_of::<GB_apu_t__bindgen_ty_2>() - 2usize];
742 ["Offset of field: GB_apu_t__bindgen_ty_2::enable"]
743 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, enable) - 0usize];
744 ["Offset of field: GB_apu_t__bindgen_ty_2::pulse_length"]
745 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, pulse_length) - 2usize];
746 ["Offset of field: GB_apu_t__bindgen_ty_2::shift"]
747 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, shift) - 4usize];
748 ["Offset of field: GB_apu_t__bindgen_ty_2::sample_length"]
749 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, sample_length) - 6usize];
750 ["Offset of field: GB_apu_t__bindgen_ty_2::length_enabled"]
751 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, length_enabled) - 8usize];
752 ["Offset of field: GB_apu_t__bindgen_ty_2::sample_countdown"]
753 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, sample_countdown) - 10usize];
754 ["Offset of field: GB_apu_t__bindgen_ty_2::current_sample_index"]
755 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, current_sample_index) - 12usize];
756 ["Offset of field: GB_apu_t__bindgen_ty_2::current_sample_byte"]
757 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, current_sample_byte) - 13usize];
758 ["Offset of field: GB_apu_t__bindgen_ty_2::wave_form_just_read"]
759 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, wave_form_just_read) - 14usize];
760 ["Offset of field: GB_apu_t__bindgen_ty_2::pulsed"]
761 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, pulsed) - 15usize];
762 ["Offset of field: GB_apu_t__bindgen_ty_2::bugged_read_countdown"]
763 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_2, bugged_read_countdown) - 16usize];
764};
765#[repr(C)]
766#[derive(Debug, Copy, Clone)]
767pub struct GB_apu_t__bindgen_ty_3 {
768 pub pulse_length: u16,
769 pub current_volume: u8,
770 pub volume_countdown: u8,
771 pub lfsr: u16,
772 pub narrow: bool,
773 pub counter_countdown: u8,
774 pub counter: u16,
775 pub length_enabled: bool,
776 pub alignment: u8,
777 pub current_lfsr_sample: bool,
778 pub delta: i8,
779 pub countdown_reloaded: bool,
780 pub dmg_delayed_start: u8,
781 pub envelope_clock: GB_envelope_clock_t,
782}
783#[allow(clippy::unnecessary_operation, clippy::identity_op)]
784const _: () = {
785 ["Size of GB_apu_t__bindgen_ty_3"][::core::mem::size_of::<GB_apu_t__bindgen_ty_3>() - 18usize];
786 ["Alignment of GB_apu_t__bindgen_ty_3"]
787 [::core::mem::align_of::<GB_apu_t__bindgen_ty_3>() - 2usize];
788 ["Offset of field: GB_apu_t__bindgen_ty_3::pulse_length"]
789 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, pulse_length) - 0usize];
790 ["Offset of field: GB_apu_t__bindgen_ty_3::current_volume"]
791 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, current_volume) - 2usize];
792 ["Offset of field: GB_apu_t__bindgen_ty_3::volume_countdown"]
793 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, volume_countdown) - 3usize];
794 ["Offset of field: GB_apu_t__bindgen_ty_3::lfsr"]
795 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, lfsr) - 4usize];
796 ["Offset of field: GB_apu_t__bindgen_ty_3::narrow"]
797 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, narrow) - 6usize];
798 ["Offset of field: GB_apu_t__bindgen_ty_3::counter_countdown"]
799 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, counter_countdown) - 7usize];
800 ["Offset of field: GB_apu_t__bindgen_ty_3::counter"]
801 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, counter) - 8usize];
802 ["Offset of field: GB_apu_t__bindgen_ty_3::length_enabled"]
803 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, length_enabled) - 10usize];
804 ["Offset of field: GB_apu_t__bindgen_ty_3::alignment"]
805 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, alignment) - 11usize];
806 ["Offset of field: GB_apu_t__bindgen_ty_3::current_lfsr_sample"]
807 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, current_lfsr_sample) - 12usize];
808 ["Offset of field: GB_apu_t__bindgen_ty_3::delta"]
809 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, delta) - 13usize];
810 ["Offset of field: GB_apu_t__bindgen_ty_3::countdown_reloaded"]
811 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, countdown_reloaded) - 14usize];
812 ["Offset of field: GB_apu_t__bindgen_ty_3::dmg_delayed_start"]
813 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, dmg_delayed_start) - 15usize];
814 ["Offset of field: GB_apu_t__bindgen_ty_3::envelope_clock"]
815 [::core::mem::offset_of!(GB_apu_t__bindgen_ty_3, envelope_clock) - 16usize];
816};
817pub const GB_apu_t_GB_SKIP_DIV_EVENT_INACTIVE: GB_apu_t__bindgen_ty_4 = 0;
818pub const GB_apu_t_GB_SKIP_DIV_EVENT_SKIPPED: GB_apu_t__bindgen_ty_4 = 1;
819pub const GB_apu_t_GB_SKIP_DIV_EVENT_SKIP: GB_apu_t__bindgen_ty_4 = 2;
820pub type GB_apu_t__bindgen_ty_4 = u8;
821#[allow(clippy::unnecessary_operation, clippy::identity_op)]
822const _: () = {
823 ["Size of GB_apu_t"][::core::mem::size_of::<GB_apu_t>() - 98usize];
824 ["Alignment of GB_apu_t"][::core::mem::align_of::<GB_apu_t>() - 2usize];
825 ["Offset of field: GB_apu_t::global_enable"]
826 [::core::mem::offset_of!(GB_apu_t, global_enable) - 0usize];
827 ["Offset of field: GB_apu_t::apu_cycles"]
828 [::core::mem::offset_of!(GB_apu_t, apu_cycles) - 2usize];
829 ["Offset of field: GB_apu_t::samples"][::core::mem::offset_of!(GB_apu_t, samples) - 4usize];
830 ["Offset of field: GB_apu_t::is_active"][::core::mem::offset_of!(GB_apu_t, is_active) - 8usize];
831 ["Offset of field: GB_apu_t::div_divider"]
832 [::core::mem::offset_of!(GB_apu_t, div_divider) - 12usize];
833 ["Offset of field: GB_apu_t::lf_div"][::core::mem::offset_of!(GB_apu_t, lf_div) - 13usize];
834 ["Offset of field: GB_apu_t::square_sweep_countdown"]
835 [::core::mem::offset_of!(GB_apu_t, square_sweep_countdown) - 14usize];
836 ["Offset of field: GB_apu_t::square_sweep_calculate_countdown"]
837 [::core::mem::offset_of!(GB_apu_t, square_sweep_calculate_countdown) - 15usize];
838 ["Offset of field: GB_apu_t::square_sweep_calculate_countdown_reload_timer"][::core::mem::offset_of!(
839 GB_apu_t,
840 square_sweep_calculate_countdown_reload_timer
841 ) - 16usize];
842 ["Offset of field: GB_apu_t::sweep_length_addend"]
843 [::core::mem::offset_of!(GB_apu_t, sweep_length_addend) - 18usize];
844 ["Offset of field: GB_apu_t::shadow_sweep_sample_length"]
845 [::core::mem::offset_of!(GB_apu_t, shadow_sweep_sample_length) - 20usize];
846 ["Offset of field: GB_apu_t::unshifted_sweep"]
847 [::core::mem::offset_of!(GB_apu_t, unshifted_sweep) - 22usize];
848 ["Offset of field: GB_apu_t::square_sweep_instant_calculation_done"]
849 [::core::mem::offset_of!(GB_apu_t, square_sweep_instant_calculation_done) - 23usize];
850 ["Offset of field: GB_apu_t::channel_1_restart_hold"]
851 [::core::mem::offset_of!(GB_apu_t, channel_1_restart_hold) - 24usize];
852 ["Offset of field: GB_apu_t::channel1_completed_addend"]
853 [::core::mem::offset_of!(GB_apu_t, channel1_completed_addend) - 26usize];
854 ["Offset of field: GB_apu_t::square_channels"]
855 [::core::mem::offset_of!(GB_apu_t, square_channels) - 28usize];
856 ["Offset of field: GB_apu_t::wave_channel"]
857 [::core::mem::offset_of!(GB_apu_t, wave_channel) - 56usize];
858 ["Offset of field: GB_apu_t::noise_channel"]
859 [::core::mem::offset_of!(GB_apu_t, noise_channel) - 74usize];
860 ["Offset of field: GB_apu_t::skip_div_event"]
861 [::core::mem::offset_of!(GB_apu_t, skip_div_event) - 92usize];
862 ["Offset of field: GB_apu_t::pcm_mask"][::core::mem::offset_of!(GB_apu_t, pcm_mask) - 93usize];
863 ["Offset of field: GB_apu_t::apu_cycles_in_2mhz"]
864 [::core::mem::offset_of!(GB_apu_t, apu_cycles_in_2mhz) - 95usize];
865 ["Offset of field: GB_apu_t::pending_envelope_tick"]
866 [::core::mem::offset_of!(GB_apu_t, pending_envelope_tick) - 96usize];
867};
868pub const GB_highpass_mode_t_GB_HIGHPASS_OFF: GB_highpass_mode_t = 0;
869pub const GB_highpass_mode_t_GB_HIGHPASS_ACCURATE: GB_highpass_mode_t = 1;
870pub const GB_highpass_mode_t_GB_HIGHPASS_REMOVE_DC_OFFSET: GB_highpass_mode_t = 2;
871pub const GB_highpass_mode_t_GB_HIGHPASS_MAX: GB_highpass_mode_t = 3;
872pub type GB_highpass_mode_t = ::core::ffi::c_uint;
873pub const GB_audio_format_t_GB_AUDIO_FORMAT_RAW: GB_audio_format_t = 0;
874pub const GB_audio_format_t_GB_AUDIO_FORMAT_AIFF: GB_audio_format_t = 1;
875pub const GB_audio_format_t_GB_AUDIO_FORMAT_WAV: GB_audio_format_t = 2;
876pub type GB_audio_format_t = ::core::ffi::c_uint;
877#[repr(C)]
878#[derive(Debug, Copy, Clone)]
879pub struct GB_band_limited_t {
880 pub buffer: [GB_band_limited_t__bindgen_ty_1; 128usize],
881 pub output: GB_band_limited_t__bindgen_ty_1,
882 pub pos: u8,
883 pub input: GB_sample_t,
884 pub last_output: GB_sample_t,
885 pub silence_detection: ::core::ffi::c_uint,
886}
887#[repr(C)]
888#[derive(Debug, Copy, Clone)]
889pub struct GB_band_limited_t__bindgen_ty_1 {
890 pub left: i32,
891 pub right: i32,
892}
893#[allow(clippy::unnecessary_operation, clippy::identity_op)]
894const _: () = {
895 ["Size of GB_band_limited_t__bindgen_ty_1"]
896 [::core::mem::size_of::<GB_band_limited_t__bindgen_ty_1>() - 8usize];
897 ["Alignment of GB_band_limited_t__bindgen_ty_1"]
898 [::core::mem::align_of::<GB_band_limited_t__bindgen_ty_1>() - 4usize];
899 ["Offset of field: GB_band_limited_t__bindgen_ty_1::left"]
900 [::core::mem::offset_of!(GB_band_limited_t__bindgen_ty_1, left) - 0usize];
901 ["Offset of field: GB_band_limited_t__bindgen_ty_1::right"]
902 [::core::mem::offset_of!(GB_band_limited_t__bindgen_ty_1, right) - 4usize];
903};
904#[allow(clippy::unnecessary_operation, clippy::identity_op)]
905const _: () = {
906 ["Size of GB_band_limited_t"][::core::mem::size_of::<GB_band_limited_t>() - 1048usize];
907 ["Alignment of GB_band_limited_t"][::core::mem::align_of::<GB_band_limited_t>() - 4usize];
908 ["Offset of field: GB_band_limited_t::buffer"]
909 [::core::mem::offset_of!(GB_band_limited_t, buffer) - 0usize];
910 ["Offset of field: GB_band_limited_t::output"]
911 [::core::mem::offset_of!(GB_band_limited_t, output) - 1024usize];
912 ["Offset of field: GB_band_limited_t::pos"]
913 [::core::mem::offset_of!(GB_band_limited_t, pos) - 1032usize];
914 ["Offset of field: GB_band_limited_t::input"]
915 [::core::mem::offset_of!(GB_band_limited_t, input) - 1034usize];
916 ["Offset of field: GB_band_limited_t::last_output"]
917 [::core::mem::offset_of!(GB_band_limited_t, last_output) - 1038usize];
918 ["Offset of field: GB_band_limited_t::silence_detection"]
919 [::core::mem::offset_of!(GB_band_limited_t, silence_detection) - 1044usize];
920};
921#[repr(C)]
922#[derive(Debug, Copy, Clone)]
923pub struct GB_apu_output_t {
924 pub sample_rate: ::core::ffi::c_uint,
925 pub sample_cycles: ::core::ffi::c_uint,
926 pub max_cycles_per_sample: ::core::ffi::c_uint,
927 pub cycles_since_render: u32,
928 pub sample_fraction: u32,
929 pub quick_fraction_multiply_cache: [u32; 64usize],
930 pub band_limited: [GB_band_limited_t; 4usize],
931 pub dac_discharge: [f64; 4usize],
932 pub channel_muted: [bool; 4usize],
933 pub edge_triggered: [bool; 4usize],
934 pub highpass_mode: GB_highpass_mode_t,
935 pub highpass_rate: f64,
936 pub highpass_diff: GB_double_sample_t,
937 pub sample_callback: GB_sample_callback_t,
938 pub interference_volume: f64,
939 pub interference_highpass: f64,
940 pub output_file: *mut FILE,
941 pub output_format: GB_audio_format_t,
942 pub output_error: ::core::ffi::c_int,
943 pub square_sweep_disable_stepping: bool,
944}
945#[allow(clippy::unnecessary_operation, clippy::identity_op)]
946const _: () = {
947 ["Size of GB_apu_output_t"][::core::mem::size_of::<GB_apu_output_t>() - 4592usize];
948 ["Alignment of GB_apu_output_t"][::core::mem::align_of::<GB_apu_output_t>() - 8usize];
949 ["Offset of field: GB_apu_output_t::sample_rate"]
950 [::core::mem::offset_of!(GB_apu_output_t, sample_rate) - 0usize];
951 ["Offset of field: GB_apu_output_t::sample_cycles"]
952 [::core::mem::offset_of!(GB_apu_output_t, sample_cycles) - 4usize];
953 ["Offset of field: GB_apu_output_t::max_cycles_per_sample"]
954 [::core::mem::offset_of!(GB_apu_output_t, max_cycles_per_sample) - 8usize];
955 ["Offset of field: GB_apu_output_t::cycles_since_render"]
956 [::core::mem::offset_of!(GB_apu_output_t, cycles_since_render) - 12usize];
957 ["Offset of field: GB_apu_output_t::sample_fraction"]
958 [::core::mem::offset_of!(GB_apu_output_t, sample_fraction) - 16usize];
959 ["Offset of field: GB_apu_output_t::quick_fraction_multiply_cache"]
960 [::core::mem::offset_of!(GB_apu_output_t, quick_fraction_multiply_cache) - 20usize];
961 ["Offset of field: GB_apu_output_t::band_limited"]
962 [::core::mem::offset_of!(GB_apu_output_t, band_limited) - 276usize];
963 ["Offset of field: GB_apu_output_t::dac_discharge"]
964 [::core::mem::offset_of!(GB_apu_output_t, dac_discharge) - 4472usize];
965 ["Offset of field: GB_apu_output_t::channel_muted"]
966 [::core::mem::offset_of!(GB_apu_output_t, channel_muted) - 4504usize];
967 ["Offset of field: GB_apu_output_t::edge_triggered"]
968 [::core::mem::offset_of!(GB_apu_output_t, edge_triggered) - 4508usize];
969 ["Offset of field: GB_apu_output_t::highpass_mode"]
970 [::core::mem::offset_of!(GB_apu_output_t, highpass_mode) - 4512usize];
971 ["Offset of field: GB_apu_output_t::highpass_rate"]
972 [::core::mem::offset_of!(GB_apu_output_t, highpass_rate) - 4520usize];
973 ["Offset of field: GB_apu_output_t::highpass_diff"]
974 [::core::mem::offset_of!(GB_apu_output_t, highpass_diff) - 4528usize];
975 ["Offset of field: GB_apu_output_t::sample_callback"]
976 [::core::mem::offset_of!(GB_apu_output_t, sample_callback) - 4544usize];
977 ["Offset of field: GB_apu_output_t::interference_volume"]
978 [::core::mem::offset_of!(GB_apu_output_t, interference_volume) - 4552usize];
979 ["Offset of field: GB_apu_output_t::interference_highpass"]
980 [::core::mem::offset_of!(GB_apu_output_t, interference_highpass) - 4560usize];
981 ["Offset of field: GB_apu_output_t::output_file"]
982 [::core::mem::offset_of!(GB_apu_output_t, output_file) - 4568usize];
983 ["Offset of field: GB_apu_output_t::output_format"]
984 [::core::mem::offset_of!(GB_apu_output_t, output_format) - 4576usize];
985 ["Offset of field: GB_apu_output_t::output_error"]
986 [::core::mem::offset_of!(GB_apu_output_t, output_error) - 4580usize];
987 ["Offset of field: GB_apu_output_t::square_sweep_disable_stepping"]
988 [::core::mem::offset_of!(GB_apu_output_t, square_sweep_disable_stepping) - 4584usize];
989};
990unsafe extern "C" {
991 pub fn GB_set_channel_muted(gb: *mut GB_gameboy_t, channel: GB_channel_t, muted: bool);
992}
993unsafe extern "C" {
994 pub fn GB_is_channel_muted(gb: *mut GB_gameboy_t, channel: GB_channel_t) -> bool;
995}
996unsafe extern "C" {
997 pub fn GB_set_sample_rate(gb: *mut GB_gameboy_t, sample_rate: ::core::ffi::c_uint);
998}
999unsafe extern "C" {
1000 pub fn GB_get_sample_rate(gb: *mut GB_gameboy_t) -> ::core::ffi::c_uint;
1001}
1002unsafe extern "C" {
1003 pub fn GB_set_sample_rate_by_clocks(gb: *mut GB_gameboy_t, cycles_per_sample: f64);
1004}
1005unsafe extern "C" {
1006 pub fn GB_set_highpass_filter_mode(gb: *mut GB_gameboy_t, mode: GB_highpass_mode_t);
1007}
1008unsafe extern "C" {
1009 pub fn GB_set_interference_volume(gb: *mut GB_gameboy_t, volume: f64);
1010}
1011unsafe extern "C" {
1012 pub fn GB_apu_set_sample_callback(gb: *mut GB_gameboy_t, callback: GB_sample_callback_t);
1013}
1014unsafe extern "C" {
1015 pub fn GB_start_audio_recording(
1016 gb: *mut GB_gameboy_t,
1017 path: *const ::core::ffi::c_char,
1018 format: GB_audio_format_t,
1019 ) -> ::core::ffi::c_int;
1020}
1021unsafe extern "C" {
1022 pub fn GB_stop_audio_recording(gb: *mut GB_gameboy_t) -> ::core::ffi::c_int;
1023}
1024unsafe extern "C" {
1025 pub fn GB_get_channel_volume(gb: *mut GB_gameboy_t, channel: GB_channel_t) -> u8;
1026}
1027unsafe extern "C" {
1028 pub fn GB_get_channel_amplitude(gb: *mut GB_gameboy_t, channel: GB_channel_t) -> u8;
1029}
1030unsafe extern "C" {
1031 pub fn GB_get_channel_period(gb: *mut GB_gameboy_t, channel: GB_channel_t) -> u16;
1032}
1033unsafe extern "C" {
1034 pub fn GB_get_apu_wave_table(gb: *mut GB_gameboy_t, wave_table: *mut u8);
1035}
1036unsafe extern "C" {
1037 pub fn GB_get_channel_edge_triggered(gb: *mut GB_gameboy_t, channel: GB_channel_t) -> bool;
1038}
1039pub type GB_camera_get_pixel_callback_t =
1040 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, x: u8, y: u8) -> u8>;
1041pub type GB_camera_update_request_callback_t =
1042 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t)>;
1043unsafe extern "C" {
1044 pub fn GB_set_camera_get_pixel_callback(
1045 gb: *mut GB_gameboy_t,
1046 callback: GB_camera_get_pixel_callback_t,
1047 );
1048}
1049unsafe extern "C" {
1050 pub fn GB_set_camera_update_request_callback(
1051 gb: *mut GB_gameboy_t,
1052 callback: GB_camera_update_request_callback_t,
1053 );
1054}
1055unsafe extern "C" {
1056 pub fn GB_camera_updated(gb: *mut GB_gameboy_t);
1057}
1058#[repr(C)]
1059#[derive(Debug, Copy, Clone)]
1060pub struct GB_bank_symbol_t {
1061 pub name: *mut ::core::ffi::c_char,
1062 pub addr: u16,
1063 pub is_local: bool,
1064}
1065#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1066const _: () = {
1067 ["Size of GB_bank_symbol_t"][::core::mem::size_of::<GB_bank_symbol_t>() - 16usize];
1068 ["Alignment of GB_bank_symbol_t"][::core::mem::align_of::<GB_bank_symbol_t>() - 8usize];
1069 ["Offset of field: GB_bank_symbol_t::name"]
1070 [::core::mem::offset_of!(GB_bank_symbol_t, name) - 0usize];
1071 ["Offset of field: GB_bank_symbol_t::addr"]
1072 [::core::mem::offset_of!(GB_bank_symbol_t, addr) - 8usize];
1073 ["Offset of field: GB_bank_symbol_t::is_local"]
1074 [::core::mem::offset_of!(GB_bank_symbol_t, is_local) - 10usize];
1075};
1076#[repr(C)]
1077#[derive(Debug, Copy, Clone)]
1078pub struct GB_symbol_s {
1079 pub next: *mut GB_symbol_s,
1080 pub name: *const ::core::ffi::c_char,
1081 pub bank: u16,
1082 pub addr: u16,
1083}
1084#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1085const _: () = {
1086 ["Size of GB_symbol_s"][::core::mem::size_of::<GB_symbol_s>() - 24usize];
1087 ["Alignment of GB_symbol_s"][::core::mem::align_of::<GB_symbol_s>() - 8usize];
1088 ["Offset of field: GB_symbol_s::next"][::core::mem::offset_of!(GB_symbol_s, next) - 0usize];
1089 ["Offset of field: GB_symbol_s::name"][::core::mem::offset_of!(GB_symbol_s, name) - 8usize];
1090 ["Offset of field: GB_symbol_s::bank"][::core::mem::offset_of!(GB_symbol_s, bank) - 16usize];
1091 ["Offset of field: GB_symbol_s::addr"][::core::mem::offset_of!(GB_symbol_s, addr) - 18usize];
1092};
1093pub type GB_symbol_t = GB_symbol_s;
1094#[repr(C)]
1095#[derive(Debug, Copy, Clone)]
1096pub struct GB_symbol_map_t {
1097 pub symbols: *mut GB_bank_symbol_t,
1098 pub n_symbols: usize,
1099}
1100#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1101const _: () = {
1102 ["Size of GB_symbol_map_t"][::core::mem::size_of::<GB_symbol_map_t>() - 16usize];
1103 ["Alignment of GB_symbol_map_t"][::core::mem::align_of::<GB_symbol_map_t>() - 8usize];
1104 ["Offset of field: GB_symbol_map_t::symbols"]
1105 [::core::mem::offset_of!(GB_symbol_map_t, symbols) - 0usize];
1106 ["Offset of field: GB_symbol_map_t::n_symbols"]
1107 [::core::mem::offset_of!(GB_symbol_map_t, n_symbols) - 8usize];
1108};
1109#[repr(C)]
1110#[derive(Debug, Copy, Clone)]
1111pub struct GB_reversed_symbol_map_t {
1112 pub buckets: [*mut GB_symbol_t; 8192usize],
1113}
1114#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1115const _: () = {
1116 ["Size of GB_reversed_symbol_map_t"]
1117 [::core::mem::size_of::<GB_reversed_symbol_map_t>() - 65536usize];
1118 ["Alignment of GB_reversed_symbol_map_t"]
1119 [::core::mem::align_of::<GB_reversed_symbol_map_t>() - 8usize];
1120 ["Offset of field: GB_reversed_symbol_map_t::buckets"]
1121 [::core::mem::offset_of!(GB_reversed_symbol_map_t, buckets) - 0usize];
1122};
1123pub type GB_debugger_reload_callback_t =
1124 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t)>;
1125unsafe extern "C" {
1126 pub fn GB_debugger_break(gb: *mut GB_gameboy_t);
1127}
1128unsafe extern "C" {
1129 pub fn GB_debugger_execute_command(gb: *mut GB_gameboy_t, input: *mut ::core::ffi::c_char);
1130}
1131unsafe extern "C" {
1132 pub fn GB_debugger_complete_substring(
1133 gb: *mut GB_gameboy_t,
1134 input: *mut ::core::ffi::c_char,
1135 context: *mut usize,
1136 ) -> *mut ::core::ffi::c_char;
1137}
1138unsafe extern "C" {
1139 pub fn GB_debugger_load_symbol_file(gb: *mut GB_gameboy_t, path: *const ::core::ffi::c_char);
1140}
1141unsafe extern "C" {
1142 pub fn GB_debugger_name_for_address(
1143 gb: *mut GB_gameboy_t,
1144 addr: u16,
1145 ) -> *const ::core::ffi::c_char;
1146}
1147unsafe extern "C" {
1148 pub fn GB_debugger_describe_address(
1149 gb: *mut GB_gameboy_t,
1150 addr: u16,
1151 bank: u16,
1152 exact_match: bool,
1153 prefer_local: bool,
1154 ) -> *const ::core::ffi::c_char;
1155}
1156unsafe extern "C" {
1157 pub fn GB_debugger_evaluate(
1158 gb: *mut GB_gameboy_t,
1159 string: *const ::core::ffi::c_char,
1160 result: *mut u16,
1161 result_bank: *mut u16,
1162 ) -> bool;
1163}
1164unsafe extern "C" {
1165 pub fn GB_debugger_is_stopped(gb: *mut GB_gameboy_t) -> bool;
1166}
1167unsafe extern "C" {
1168 pub fn GB_debugger_set_disabled(gb: *mut GB_gameboy_t, disabled: bool);
1169}
1170unsafe extern "C" {
1171 pub fn GB_debugger_clear_symbols(gb: *mut GB_gameboy_t);
1172}
1173unsafe extern "C" {
1174 pub fn GB_debugger_set_reload_callback(
1175 gb: *mut GB_gameboy_t,
1176 callback: GB_debugger_reload_callback_t,
1177 );
1178}
1179unsafe extern "C" {
1180 pub fn GB_debugger_get_frame_cpu_usage(gb: *mut GB_gameboy_t) -> f64;
1181}
1182unsafe extern "C" {
1183 pub fn GB_debugger_get_second_cpu_usage(gb: *mut GB_gameboy_t) -> f64;
1184}
1185#[repr(C)]
1186#[derive(Debug, Copy, Clone)]
1187pub struct GB_palette_t {
1188 pub colors: [GB_palette_t_GB_color_s; 5usize],
1189}
1190#[repr(C)]
1191#[derive(Debug, Copy, Clone)]
1192pub struct GB_palette_t_GB_color_s {
1193 pub r: u8,
1194 pub g: u8,
1195 pub b: u8,
1196}
1197#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1198const _: () = {
1199 ["Size of GB_palette_t_GB_color_s"][::core::mem::size_of::<GB_palette_t_GB_color_s>() - 3usize];
1200 ["Alignment of GB_palette_t_GB_color_s"]
1201 [::core::mem::align_of::<GB_palette_t_GB_color_s>() - 1usize];
1202 ["Offset of field: GB_palette_t_GB_color_s::r"]
1203 [::core::mem::offset_of!(GB_palette_t_GB_color_s, r) - 0usize];
1204 ["Offset of field: GB_palette_t_GB_color_s::g"]
1205 [::core::mem::offset_of!(GB_palette_t_GB_color_s, g) - 1usize];
1206 ["Offset of field: GB_palette_t_GB_color_s::b"]
1207 [::core::mem::offset_of!(GB_palette_t_GB_color_s, b) - 2usize];
1208};
1209#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1210const _: () = {
1211 ["Size of GB_palette_t"][::core::mem::size_of::<GB_palette_t>() - 15usize];
1212 ["Alignment of GB_palette_t"][::core::mem::align_of::<GB_palette_t>() - 1usize];
1213 ["Offset of field: GB_palette_t::colors"]
1214 [::core::mem::offset_of!(GB_palette_t, colors) - 0usize];
1215};
1216pub const GB_vblank_type_t_GB_VBLANK_TYPE_NORMAL_FRAME: GB_vblank_type_t = 0;
1217pub const GB_vblank_type_t_GB_VBLANK_TYPE_LCD_OFF: GB_vblank_type_t = 1;
1218pub const GB_vblank_type_t_GB_VBLANK_TYPE_ARTIFICIAL: GB_vblank_type_t = 2;
1219pub const GB_vblank_type_t_GB_VBLANK_TYPE_REPEAT: GB_vblank_type_t = 3;
1220pub const GB_vblank_type_t_GB_VBLANK_TYPE_SKIPPED_FRAME: GB_vblank_type_t = 4;
1221pub type GB_vblank_type_t = ::core::ffi::c_uint;
1222pub type GB_vblank_callback_t =
1223 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, type_: GB_vblank_type_t)>;
1224pub type GB_rgb_encode_callback_t =
1225 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, r: u8, g: u8, b: u8) -> u32>;
1226#[repr(C)]
1227#[derive(Debug, Copy, Clone)]
1228pub struct GB_fifo_item_t {
1229 pub pixel: u8,
1230 pub palette: u8,
1231 pub priority: u8,
1232 pub bg_priority: bool,
1233}
1234#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1235const _: () = {
1236 ["Size of GB_fifo_item_t"][::core::mem::size_of::<GB_fifo_item_t>() - 4usize];
1237 ["Alignment of GB_fifo_item_t"][::core::mem::align_of::<GB_fifo_item_t>() - 1usize];
1238 ["Offset of field: GB_fifo_item_t::pixel"]
1239 [::core::mem::offset_of!(GB_fifo_item_t, pixel) - 0usize];
1240 ["Offset of field: GB_fifo_item_t::palette"]
1241 [::core::mem::offset_of!(GB_fifo_item_t, palette) - 1usize];
1242 ["Offset of field: GB_fifo_item_t::priority"]
1243 [::core::mem::offset_of!(GB_fifo_item_t, priority) - 2usize];
1244 ["Offset of field: GB_fifo_item_t::bg_priority"]
1245 [::core::mem::offset_of!(GB_fifo_item_t, bg_priority) - 3usize];
1246};
1247#[repr(C)]
1248#[derive(Debug, Copy, Clone)]
1249pub struct GB_fifo_t {
1250 pub fifo: [GB_fifo_item_t; 8usize],
1251 pub read_end: u8,
1252 pub size: u8,
1253}
1254#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1255const _: () = {
1256 ["Size of GB_fifo_t"][::core::mem::size_of::<GB_fifo_t>() - 34usize];
1257 ["Alignment of GB_fifo_t"][::core::mem::align_of::<GB_fifo_t>() - 1usize];
1258 ["Offset of field: GB_fifo_t::fifo"][::core::mem::offset_of!(GB_fifo_t, fifo) - 0usize];
1259 ["Offset of field: GB_fifo_t::read_end"]
1260 [::core::mem::offset_of!(GB_fifo_t, read_end) - 32usize];
1261 ["Offset of field: GB_fifo_t::size"][::core::mem::offset_of!(GB_fifo_t, size) - 33usize];
1262};
1263pub const GB_palette_type_t_GB_PALETTE_NONE: GB_palette_type_t = 0;
1264pub const GB_palette_type_t_GB_PALETTE_BACKGROUND: GB_palette_type_t = 1;
1265pub const GB_palette_type_t_GB_PALETTE_OAM: GB_palette_type_t = 2;
1266pub const GB_palette_type_t_GB_PALETTE_AUTO: GB_palette_type_t = 3;
1267pub type GB_palette_type_t = ::core::ffi::c_uint;
1268pub const GB_map_type_t_GB_MAP_AUTO: GB_map_type_t = 0;
1269pub const GB_map_type_t_GB_MAP_9800: GB_map_type_t = 1;
1270pub const GB_map_type_t_GB_MAP_9C00: GB_map_type_t = 2;
1271pub type GB_map_type_t = ::core::ffi::c_uint;
1272pub const GB_tileset_type_t_GB_TILESET_AUTO: GB_tileset_type_t = 0;
1273pub const GB_tileset_type_t_GB_TILESET_8800: GB_tileset_type_t = 1;
1274pub const GB_tileset_type_t_GB_TILESET_8000: GB_tileset_type_t = 2;
1275pub type GB_tileset_type_t = ::core::ffi::c_uint;
1276#[repr(C)]
1277#[derive(Debug, Copy, Clone)]
1278pub struct GB_oam_info_t {
1279 pub image: [u32; 128usize],
1280 pub x: u8,
1281 pub y: u8,
1282 pub tile: u8,
1283 pub flags: u8,
1284 pub oam_addr: u16,
1285 pub obscured_by_line_limit: bool,
1286}
1287#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1288const _: () = {
1289 ["Size of GB_oam_info_t"][::core::mem::size_of::<GB_oam_info_t>() - 520usize];
1290 ["Alignment of GB_oam_info_t"][::core::mem::align_of::<GB_oam_info_t>() - 4usize];
1291 ["Offset of field: GB_oam_info_t::image"]
1292 [::core::mem::offset_of!(GB_oam_info_t, image) - 0usize];
1293 ["Offset of field: GB_oam_info_t::x"][::core::mem::offset_of!(GB_oam_info_t, x) - 512usize];
1294 ["Offset of field: GB_oam_info_t::y"][::core::mem::offset_of!(GB_oam_info_t, y) - 513usize];
1295 ["Offset of field: GB_oam_info_t::tile"]
1296 [::core::mem::offset_of!(GB_oam_info_t, tile) - 514usize];
1297 ["Offset of field: GB_oam_info_t::flags"]
1298 [::core::mem::offset_of!(GB_oam_info_t, flags) - 515usize];
1299 ["Offset of field: GB_oam_info_t::oam_addr"]
1300 [::core::mem::offset_of!(GB_oam_info_t, oam_addr) - 516usize];
1301 ["Offset of field: GB_oam_info_t::obscured_by_line_limit"]
1302 [::core::mem::offset_of!(GB_oam_info_t, obscured_by_line_limit) - 518usize];
1303};
1304pub const GB_color_correction_mode_t_GB_COLOR_CORRECTION_DISABLED: GB_color_correction_mode_t = 0;
1305pub const GB_color_correction_mode_t_GB_COLOR_CORRECTION_CORRECT_CURVES:
1306 GB_color_correction_mode_t = 1;
1307pub const GB_color_correction_mode_t_GB_COLOR_CORRECTION_MODERN_BALANCED:
1308 GB_color_correction_mode_t = 2;
1309pub const GB_color_correction_mode_t_GB_COLOR_CORRECTION_MODERN_BOOST_CONTRAST:
1310 GB_color_correction_mode_t = 3;
1311pub const GB_color_correction_mode_t_GB_COLOR_CORRECTION_REDUCE_CONTRAST:
1312 GB_color_correction_mode_t = 4;
1313pub const GB_color_correction_mode_t_GB_COLOR_CORRECTION_LOW_CONTRAST: GB_color_correction_mode_t =
1314 5;
1315pub const GB_color_correction_mode_t_GB_COLOR_CORRECTION_MODERN_ACCURATE:
1316 GB_color_correction_mode_t = 6;
1317pub type GB_color_correction_mode_t = ::core::ffi::c_uint;
1318unsafe extern "C" {
1319 pub fn GB_set_vblank_callback(gb: *mut GB_gameboy_t, callback: GB_vblank_callback_t);
1320}
1321unsafe extern "C" {
1322 pub fn GB_set_enable_skipped_frame_vblank_callbacks(gb: *mut GB_gameboy_t, enable: bool);
1323}
1324unsafe extern "C" {
1325 pub fn GB_set_rgb_encode_callback(gb: *mut GB_gameboy_t, callback: GB_rgb_encode_callback_t);
1326}
1327unsafe extern "C" {
1328 pub fn GB_set_palette(gb: *mut GB_gameboy_t, palette: *const GB_palette_t);
1329}
1330unsafe extern "C" {
1331 pub fn GB_get_palette(gb: *mut GB_gameboy_t) -> *const GB_palette_t;
1332}
1333unsafe extern "C" {
1334 pub fn GB_set_color_correction_mode(gb: *mut GB_gameboy_t, mode: GB_color_correction_mode_t);
1335}
1336unsafe extern "C" {
1337 pub fn GB_set_light_temperature(gb: *mut GB_gameboy_t, temperature: f64);
1338}
1339unsafe extern "C" {
1340 pub fn GB_set_pixels_output(gb: *mut GB_gameboy_t, output: *mut u32);
1341}
1342unsafe extern "C" {
1343 pub fn GB_get_screen_width(gb: *mut GB_gameboy_t) -> ::core::ffi::c_uint;
1344}
1345unsafe extern "C" {
1346 pub fn GB_get_screen_height(gb: *mut GB_gameboy_t) -> ::core::ffi::c_uint;
1347}
1348unsafe extern "C" {
1349 pub fn GB_get_usual_frame_rate(gb: *mut GB_gameboy_t) -> f64;
1350}
1351unsafe extern "C" {
1352 pub fn GB_is_odd_frame(gb: *mut GB_gameboy_t) -> bool;
1353}
1354unsafe extern "C" {
1355 pub fn GB_convert_rgb15(gb: *mut GB_gameboy_t, color: u16, for_border: bool) -> u32;
1356}
1357unsafe extern "C" {
1358 pub fn GB_draw_tileset(
1359 gb: *mut GB_gameboy_t,
1360 dest: *mut u32,
1361 palette_type: GB_palette_type_t,
1362 palette_index: u8,
1363 );
1364}
1365unsafe extern "C" {
1366 pub fn GB_draw_tilemap(
1367 gb: *mut GB_gameboy_t,
1368 dest: *mut u32,
1369 palette_type: GB_palette_type_t,
1370 palette_index: u8,
1371 map_type: GB_map_type_t,
1372 tileset_type: GB_tileset_type_t,
1373 );
1374}
1375unsafe extern "C" {
1376 pub fn GB_get_oam_info(
1377 gb: *mut GB_gameboy_t,
1378 dest: *mut GB_oam_info_t,
1379 object_height: *mut u8,
1380 ) -> u8;
1381}
1382unsafe extern "C" {
1383 pub fn GB_set_object_rendering_disabled(gb: *mut GB_gameboy_t, disabled: bool);
1384}
1385unsafe extern "C" {
1386 pub fn GB_set_background_rendering_disabled(gb: *mut GB_gameboy_t, disabled: bool);
1387}
1388unsafe extern "C" {
1389 pub fn GB_is_object_rendering_disabled(gb: *mut GB_gameboy_t) -> bool;
1390}
1391unsafe extern "C" {
1392 pub fn GB_is_background_rendering_disabled(gb: *mut GB_gameboy_t) -> bool;
1393}
1394pub const GB_key_t_GB_KEY_RIGHT: GB_key_t = 0;
1395pub const GB_key_t_GB_KEY_LEFT: GB_key_t = 1;
1396pub const GB_key_t_GB_KEY_UP: GB_key_t = 2;
1397pub const GB_key_t_GB_KEY_DOWN: GB_key_t = 3;
1398pub const GB_key_t_GB_KEY_A: GB_key_t = 4;
1399pub const GB_key_t_GB_KEY_B: GB_key_t = 5;
1400pub const GB_key_t_GB_KEY_SELECT: GB_key_t = 6;
1401pub const GB_key_t_GB_KEY_START: GB_key_t = 7;
1402pub const GB_key_t_GB_KEY_MAX: GB_key_t = 8;
1403pub type GB_key_t = ::core::ffi::c_uint;
1404pub const GB_key_mask_t_GB_KEY_RIGHT_MASK: GB_key_mask_t = 1;
1405pub const GB_key_mask_t_GB_KEY_LEFT_MASK: GB_key_mask_t = 2;
1406pub const GB_key_mask_t_GB_KEY_UP_MASK: GB_key_mask_t = 4;
1407pub const GB_key_mask_t_GB_KEY_DOWN_MASK: GB_key_mask_t = 8;
1408pub const GB_key_mask_t_GB_KEY_A_MASK: GB_key_mask_t = 16;
1409pub const GB_key_mask_t_GB_KEY_B_MASK: GB_key_mask_t = 32;
1410pub const GB_key_mask_t_GB_KEY_SELECT_MASK: GB_key_mask_t = 64;
1411pub const GB_key_mask_t_GB_KEY_START_MASK: GB_key_mask_t = 128;
1412pub type GB_key_mask_t = ::core::ffi::c_uint;
1413pub type GB_update_input_hint_callback_t =
1414 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t)>;
1415unsafe extern "C" {
1416 pub fn GB_set_key_state(gb: *mut GB_gameboy_t, index: GB_key_t, pressed: bool);
1417}
1418unsafe extern "C" {
1419 pub fn GB_set_key_state_for_player(
1420 gb: *mut GB_gameboy_t,
1421 index: GB_key_t,
1422 player: ::core::ffi::c_uint,
1423 pressed: bool,
1424 );
1425}
1426unsafe extern "C" {
1427 pub fn GB_set_key_mask(gb: *mut GB_gameboy_t, mask: GB_key_mask_t);
1428}
1429unsafe extern "C" {
1430 pub fn GB_set_key_mask_for_player(
1431 gb: *mut GB_gameboy_t,
1432 mask: GB_key_mask_t,
1433 player: ::core::ffi::c_uint,
1434 );
1435}
1436unsafe extern "C" {
1437 pub fn GB_icd_set_joyp(gb: *mut GB_gameboy_t, value: u8);
1438}
1439unsafe extern "C" {
1440 pub fn GB_get_joyp_accessed(gb: *mut GB_gameboy_t) -> bool;
1441}
1442unsafe extern "C" {
1443 pub fn GB_clear_joyp_accessed(gb: *mut GB_gameboy_t);
1444}
1445unsafe extern "C" {
1446 pub fn GB_set_allow_illegal_inputs(gb: *mut GB_gameboy_t, allow: bool);
1447}
1448unsafe extern "C" {
1449 pub fn GB_set_emulate_joypad_bouncing(gb: *mut GB_gameboy_t, emulate: bool);
1450}
1451unsafe extern "C" {
1452 pub fn GB_set_update_input_hint_callback(
1453 gb: *mut GB_gameboy_t,
1454 callback: GB_update_input_hint_callback_t,
1455 );
1456}
1457unsafe extern "C" {
1458 pub fn GB_set_use_faux_analog_inputs(
1459 gb: *mut GB_gameboy_t,
1460 player: ::core::ffi::c_uint,
1461 use_: bool,
1462 );
1463}
1464unsafe extern "C" {
1465 pub fn GB_set_faux_analog_inputs(
1466 gb: *mut GB_gameboy_t,
1467 player: ::core::ffi::c_uint,
1468 x: f64,
1469 y: f64,
1470 );
1471}
1472#[repr(C)]
1473#[derive(Debug, Copy, Clone)]
1474pub struct GB_cartridge_t {
1475 pub mbc_type: GB_cartridge_t__bindgen_ty_1,
1476 pub has_ram: bool,
1477 pub has_battery: bool,
1478 pub has_rtc: bool,
1479 pub has_rumble: bool,
1480}
1481pub const GB_cartridge_t_GB_NO_MBC: GB_cartridge_t__bindgen_ty_1 = 0;
1482pub const GB_cartridge_t_GB_MBC1: GB_cartridge_t__bindgen_ty_1 = 1;
1483pub const GB_cartridge_t_GB_MBC2: GB_cartridge_t__bindgen_ty_1 = 2;
1484pub const GB_cartridge_t_GB_MBC3: GB_cartridge_t__bindgen_ty_1 = 3;
1485pub const GB_cartridge_t_GB_MBC5: GB_cartridge_t__bindgen_ty_1 = 4;
1486pub const GB_cartridge_t_GB_MBC7: GB_cartridge_t__bindgen_ty_1 = 5;
1487pub const GB_cartridge_t_GB_MMM01: GB_cartridge_t__bindgen_ty_1 = 6;
1488pub const GB_cartridge_t_GB_HUC1: GB_cartridge_t__bindgen_ty_1 = 7;
1489pub const GB_cartridge_t_GB_HUC3: GB_cartridge_t__bindgen_ty_1 = 8;
1490pub const GB_cartridge_t_GB_TPP1: GB_cartridge_t__bindgen_ty_1 = 9;
1491pub const GB_cartridge_t_GB_CAMERA: GB_cartridge_t__bindgen_ty_1 = 10;
1492pub type GB_cartridge_t__bindgen_ty_1 = ::core::ffi::c_uint;
1493#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1494const _: () = {
1495 ["Size of GB_cartridge_t"][::core::mem::size_of::<GB_cartridge_t>() - 8usize];
1496 ["Alignment of GB_cartridge_t"][::core::mem::align_of::<GB_cartridge_t>() - 4usize];
1497 ["Offset of field: GB_cartridge_t::mbc_type"]
1498 [::core::mem::offset_of!(GB_cartridge_t, mbc_type) - 0usize];
1499 ["Offset of field: GB_cartridge_t::has_ram"]
1500 [::core::mem::offset_of!(GB_cartridge_t, has_ram) - 4usize];
1501 ["Offset of field: GB_cartridge_t::has_battery"]
1502 [::core::mem::offset_of!(GB_cartridge_t, has_battery) - 5usize];
1503 ["Offset of field: GB_cartridge_t::has_rtc"]
1504 [::core::mem::offset_of!(GB_cartridge_t, has_rtc) - 6usize];
1505 ["Offset of field: GB_cartridge_t::has_rumble"]
1506 [::core::mem::offset_of!(GB_cartridge_t, has_rumble) - 7usize];
1507};
1508pub type GB_read_memory_callback_t =
1509 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, addr: u16, data: u8) -> u8>;
1510pub type GB_write_memory_callback_t = ::core::option::Option<
1511 unsafe extern "C" fn(gb: *mut GB_gameboy_t, addr: u16, data: u8) -> bool,
1512>;
1513unsafe extern "C" {
1514 pub fn GB_set_read_memory_callback(gb: *mut GB_gameboy_t, callback: GB_read_memory_callback_t);
1515}
1516unsafe extern "C" {
1517 pub fn GB_set_write_memory_callback(
1518 gb: *mut GB_gameboy_t,
1519 callback: GB_write_memory_callback_t,
1520 );
1521}
1522unsafe extern "C" {
1523 pub fn GB_read_memory(gb: *mut GB_gameboy_t, addr: u16) -> u8;
1524}
1525unsafe extern "C" {
1526 pub fn GB_safe_read_memory(gb: *mut GB_gameboy_t, addr: u16) -> u8;
1527}
1528unsafe extern "C" {
1529 pub fn GB_write_memory(gb: *mut GB_gameboy_t, addr: u16, value: u8);
1530}
1531pub type GB_print_image_callback_t = ::core::option::Option<
1532 unsafe extern "C" fn(
1533 gb: *mut GB_gameboy_t,
1534 image: *mut u32,
1535 height: u8,
1536 top_margin: u8,
1537 bottom_margin: u8,
1538 exposure: u8,
1539 ),
1540>;
1541pub type GB_printer_done_callback_t =
1542 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t)>;
1543#[repr(C)]
1544#[derive(Debug, Copy, Clone)]
1545pub struct GB_printer_t {
1546 pub command_state: GB_printer_t__bindgen_ty_1,
1547 pub command_id: GB_printer_t__bindgen_ty_2,
1548 pub compression: bool,
1549 pub length_left: u16,
1550 pub command_data: [u8; 640usize],
1551 pub command_length: u16,
1552 pub checksum: u16,
1553 pub status: u8,
1554 pub byte_to_send: u8,
1555 pub image: [u8; 32000usize],
1556 pub image_offset: u16,
1557 pub idle_time: u32,
1558 pub time_remaining: u32,
1559 pub compression_run_lenth: u8,
1560 pub compression_run_is_compressed: bool,
1561 pub bits_received: u8,
1562 pub byte_being_received: u8,
1563 pub bit_to_send: bool,
1564}
1565pub const GB_printer_t_GB_PRINTER_COMMAND_MAGIC1: GB_printer_t__bindgen_ty_1 = 0;
1566pub const GB_printer_t_GB_PRINTER_COMMAND_MAGIC2: GB_printer_t__bindgen_ty_1 = 1;
1567pub const GB_printer_t_GB_PRINTER_COMMAND_ID: GB_printer_t__bindgen_ty_1 = 2;
1568pub const GB_printer_t_GB_PRINTER_COMMAND_COMPRESSION: GB_printer_t__bindgen_ty_1 = 3;
1569pub const GB_printer_t_GB_PRINTER_COMMAND_LENGTH_LOW: GB_printer_t__bindgen_ty_1 = 4;
1570pub const GB_printer_t_GB_PRINTER_COMMAND_LENGTH_HIGH: GB_printer_t__bindgen_ty_1 = 5;
1571pub const GB_printer_t_GB_PRINTER_COMMAND_DATA: GB_printer_t__bindgen_ty_1 = 6;
1572pub const GB_printer_t_GB_PRINTER_COMMAND_CHECKSUM_LOW: GB_printer_t__bindgen_ty_1 = 7;
1573pub const GB_printer_t_GB_PRINTER_COMMAND_CHECKSUM_HIGH: GB_printer_t__bindgen_ty_1 = 8;
1574pub const GB_printer_t_GB_PRINTER_COMMAND_ACTIVE: GB_printer_t__bindgen_ty_1 = 9;
1575pub const GB_printer_t_GB_PRINTER_COMMAND_STATUS: GB_printer_t__bindgen_ty_1 = 10;
1576pub type GB_printer_t__bindgen_ty_1 = u8;
1577pub const GB_printer_t_GB_PRINTER_INIT_COMMAND: GB_printer_t__bindgen_ty_2 = 1;
1578pub const GB_printer_t_GB_PRINTER_START_COMMAND: GB_printer_t__bindgen_ty_2 = 2;
1579pub const GB_printer_t_GB_PRINTER_DATA_COMMAND: GB_printer_t__bindgen_ty_2 = 4;
1580pub const GB_printer_t_GB_PRINTER_NOP_COMMAND: GB_printer_t__bindgen_ty_2 = 15;
1581pub type GB_printer_t__bindgen_ty_2 = u8;
1582#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1583const _: () = {
1584 ["Size of GB_printer_t"][::core::mem::size_of::<GB_printer_t>() - 32672usize];
1585 ["Alignment of GB_printer_t"][::core::mem::align_of::<GB_printer_t>() - 4usize];
1586 ["Offset of field: GB_printer_t::command_state"]
1587 [::core::mem::offset_of!(GB_printer_t, command_state) - 0usize];
1588 ["Offset of field: GB_printer_t::command_id"]
1589 [::core::mem::offset_of!(GB_printer_t, command_id) - 1usize];
1590 ["Offset of field: GB_printer_t::compression"]
1591 [::core::mem::offset_of!(GB_printer_t, compression) - 2usize];
1592 ["Offset of field: GB_printer_t::length_left"]
1593 [::core::mem::offset_of!(GB_printer_t, length_left) - 4usize];
1594 ["Offset of field: GB_printer_t::command_data"]
1595 [::core::mem::offset_of!(GB_printer_t, command_data) - 6usize];
1596 ["Offset of field: GB_printer_t::command_length"]
1597 [::core::mem::offset_of!(GB_printer_t, command_length) - 646usize];
1598 ["Offset of field: GB_printer_t::checksum"]
1599 [::core::mem::offset_of!(GB_printer_t, checksum) - 648usize];
1600 ["Offset of field: GB_printer_t::status"]
1601 [::core::mem::offset_of!(GB_printer_t, status) - 650usize];
1602 ["Offset of field: GB_printer_t::byte_to_send"]
1603 [::core::mem::offset_of!(GB_printer_t, byte_to_send) - 651usize];
1604 ["Offset of field: GB_printer_t::image"]
1605 [::core::mem::offset_of!(GB_printer_t, image) - 652usize];
1606 ["Offset of field: GB_printer_t::image_offset"]
1607 [::core::mem::offset_of!(GB_printer_t, image_offset) - 32652usize];
1608 ["Offset of field: GB_printer_t::idle_time"]
1609 [::core::mem::offset_of!(GB_printer_t, idle_time) - 32656usize];
1610 ["Offset of field: GB_printer_t::time_remaining"]
1611 [::core::mem::offset_of!(GB_printer_t, time_remaining) - 32660usize];
1612 ["Offset of field: GB_printer_t::compression_run_lenth"]
1613 [::core::mem::offset_of!(GB_printer_t, compression_run_lenth) - 32664usize];
1614 ["Offset of field: GB_printer_t::compression_run_is_compressed"]
1615 [::core::mem::offset_of!(GB_printer_t, compression_run_is_compressed) - 32665usize];
1616 ["Offset of field: GB_printer_t::bits_received"]
1617 [::core::mem::offset_of!(GB_printer_t, bits_received) - 32666usize];
1618 ["Offset of field: GB_printer_t::byte_being_received"]
1619 [::core::mem::offset_of!(GB_printer_t, byte_being_received) - 32667usize];
1620 ["Offset of field: GB_printer_t::bit_to_send"]
1621 [::core::mem::offset_of!(GB_printer_t, bit_to_send) - 32668usize];
1622};
1623unsafe extern "C" {
1624 pub fn GB_connect_printer(
1625 gb: *mut GB_gameboy_t,
1626 callback: GB_print_image_callback_t,
1627 done_callback: GB_printer_done_callback_t,
1628 );
1629}
1630pub const GB_rtc_mode_t_GB_RTC_MODE_SYNC_TO_HOST: GB_rtc_mode_t = 0;
1631pub const GB_rtc_mode_t_GB_RTC_MODE_ACCURATE: GB_rtc_mode_t = 1;
1632pub type GB_rtc_mode_t = ::core::ffi::c_uint;
1633unsafe extern "C" {
1634 pub fn GB_set_rtc_mode(gb: *mut GB_gameboy_t, mode: GB_rtc_mode_t);
1635}
1636unsafe extern "C" {
1637 pub fn GB_set_rtc_multiplier(gb: *mut GB_gameboy_t, multiplier: f64);
1638}
1639unsafe extern "C" {
1640 pub fn GB_rewind_pop(gb: *mut GB_gameboy_t) -> bool;
1641}
1642unsafe extern "C" {
1643 pub fn GB_set_rewind_length(gb: *mut GB_gameboy_t, seconds: f64);
1644}
1645unsafe extern "C" {
1646 pub fn GB_rewind_reset(gb: *mut GB_gameboy_t);
1647}
1648unsafe extern "C" {
1649 pub fn GB_cpu_disassemble(gb: *mut GB_gameboy_t, pc: u16, count: u16);
1650}
1651#[repr(C)]
1652#[derive(Debug, Copy, Clone)]
1653pub struct GB_sgb_s {
1654 _unused: [u8; 0],
1655}
1656pub type GB_sgb_t = GB_sgb_s;
1657#[repr(C)]
1658#[derive(Debug, Copy, Clone)]
1659pub struct GB_sgb_border_t {
1660 pub tiles: [u8; 8192usize],
1661 pub raw_data: [u16; 1088usize],
1662}
1663#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1664const _: () = {
1665 ["Size of GB_sgb_border_t"][::core::mem::size_of::<GB_sgb_border_t>() - 10368usize];
1666 ["Alignment of GB_sgb_border_t"][::core::mem::align_of::<GB_sgb_border_t>() - 2usize];
1667 ["Offset of field: GB_sgb_border_t::tiles"]
1668 [::core::mem::offset_of!(GB_sgb_border_t, tiles) - 0usize];
1669 ["Offset of field: GB_sgb_border_t::raw_data"]
1670 [::core::mem::offset_of!(GB_sgb_border_t, raw_data) - 8192usize];
1671};
1672unsafe extern "C" {
1673 pub fn GB_get_player_count(gb: *mut GB_gameboy_t) -> ::core::ffi::c_uint;
1674}
1675pub type GB_cheat_t = GB_cheat_s;
1676unsafe extern "C" {
1677 pub fn GB_add_cheat(
1678 gb: *mut GB_gameboy_t,
1679 description: *const ::core::ffi::c_char,
1680 address: u16,
1681 bank: u16,
1682 value: u8,
1683 old_value: u8,
1684 use_old_value: bool,
1685 enabled: bool,
1686 ) -> *const GB_cheat_t;
1687}
1688unsafe extern "C" {
1689 pub fn GB_update_cheat(
1690 gb: *mut GB_gameboy_t,
1691 cheat: *const GB_cheat_t,
1692 description: *const ::core::ffi::c_char,
1693 address: u16,
1694 bank: u16,
1695 value: u8,
1696 old_value: u8,
1697 use_old_value: bool,
1698 enabled: bool,
1699 );
1700}
1701unsafe extern "C" {
1702 pub fn GB_import_cheat(
1703 gb: *mut GB_gameboy_t,
1704 cheat: *const ::core::ffi::c_char,
1705 description: *const ::core::ffi::c_char,
1706 enabled: bool,
1707 ) -> *const GB_cheat_t;
1708}
1709unsafe extern "C" {
1710 pub fn GB_get_cheats(gb: *mut GB_gameboy_t, size: *mut usize) -> *const *const GB_cheat_t;
1711}
1712unsafe extern "C" {
1713 pub fn GB_remove_cheat(gb: *mut GB_gameboy_t, cheat: *const GB_cheat_t);
1714}
1715unsafe extern "C" {
1716 pub fn GB_remove_all_cheats(gb: *mut GB_gameboy_t);
1717}
1718unsafe extern "C" {
1719 pub fn GB_cheats_enabled(gb: *mut GB_gameboy_t) -> bool;
1720}
1721unsafe extern "C" {
1722 pub fn GB_set_cheats_enabled(gb: *mut GB_gameboy_t, enabled: bool);
1723}
1724unsafe extern "C" {
1725 pub fn GB_load_cheats(
1726 gb: *mut GB_gameboy_t,
1727 path: *const ::core::ffi::c_char,
1728 replace_existing: bool,
1729 ) -> ::core::ffi::c_int;
1730}
1731unsafe extern "C" {
1732 pub fn GB_save_cheats(
1733 gb: *mut GB_gameboy_t,
1734 path: *const ::core::ffi::c_char,
1735 ) -> ::core::ffi::c_int;
1736}
1737#[repr(C)]
1738#[derive(Debug)]
1739pub struct GB_cheat_hash_t {
1740 pub size: usize,
1741 pub cheats: __IncompleteArrayField<*mut GB_cheat_t>,
1742}
1743#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1744const _: () = {
1745 ["Size of GB_cheat_hash_t"][::core::mem::size_of::<GB_cheat_hash_t>() - 8usize];
1746 ["Alignment of GB_cheat_hash_t"][::core::mem::align_of::<GB_cheat_hash_t>() - 8usize];
1747 ["Offset of field: GB_cheat_hash_t::size"]
1748 [::core::mem::offset_of!(GB_cheat_hash_t, size) - 0usize];
1749 ["Offset of field: GB_cheat_hash_t::cheats"]
1750 [::core::mem::offset_of!(GB_cheat_hash_t, cheats) - 8usize];
1751};
1752#[repr(C)]
1753#[derive(Debug, Copy, Clone)]
1754pub struct GB_cheat_s {
1755 pub address: u16,
1756 pub bank: u16,
1757 pub value: u8,
1758 pub old_value: u8,
1759 pub use_old_value: bool,
1760 pub enabled: bool,
1761 pub description: [::core::ffi::c_char; 128usize],
1762}
1763#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1764const _: () = {
1765 ["Size of GB_cheat_s"][::core::mem::size_of::<GB_cheat_s>() - 136usize];
1766 ["Alignment of GB_cheat_s"][::core::mem::align_of::<GB_cheat_s>() - 2usize];
1767 ["Offset of field: GB_cheat_s::address"][::core::mem::offset_of!(GB_cheat_s, address) - 0usize];
1768 ["Offset of field: GB_cheat_s::bank"][::core::mem::offset_of!(GB_cheat_s, bank) - 2usize];
1769 ["Offset of field: GB_cheat_s::value"][::core::mem::offset_of!(GB_cheat_s, value) - 4usize];
1770 ["Offset of field: GB_cheat_s::old_value"]
1771 [::core::mem::offset_of!(GB_cheat_s, old_value) - 5usize];
1772 ["Offset of field: GB_cheat_s::use_old_value"]
1773 [::core::mem::offset_of!(GB_cheat_s, use_old_value) - 6usize];
1774 ["Offset of field: GB_cheat_s::enabled"][::core::mem::offset_of!(GB_cheat_s, enabled) - 7usize];
1775 ["Offset of field: GB_cheat_s::description"]
1776 [::core::mem::offset_of!(GB_cheat_s, description) - 8usize];
1777};
1778#[repr(C)]
1779#[derive(Debug, Copy, Clone)]
1780pub struct GB_cheat_search_result_t {
1781 pub addr: u16,
1782 pub bank: u16,
1783 pub value: u16,
1784}
1785#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1786const _: () = {
1787 ["Size of GB_cheat_search_result_t"]
1788 [::core::mem::size_of::<GB_cheat_search_result_t>() - 6usize];
1789 ["Alignment of GB_cheat_search_result_t"]
1790 [::core::mem::align_of::<GB_cheat_search_result_t>() - 2usize];
1791 ["Offset of field: GB_cheat_search_result_t::addr"]
1792 [::core::mem::offset_of!(GB_cheat_search_result_t, addr) - 0usize];
1793 ["Offset of field: GB_cheat_search_result_t::bank"]
1794 [::core::mem::offset_of!(GB_cheat_search_result_t, bank) - 2usize];
1795 ["Offset of field: GB_cheat_search_result_t::value"]
1796 [::core::mem::offset_of!(GB_cheat_search_result_t, value) - 4usize];
1797};
1798pub const GB_cheat_search_data_type_t_GB_CHEAT_SEARCH_DATA_TYPE_8BIT: GB_cheat_search_data_type_t =
1799 0;
1800pub const GB_cheat_search_data_type_t_GB_CHEAT_SEARCH_DATA_TYPE_16BIT: GB_cheat_search_data_type_t =
1801 1;
1802pub const GB_cheat_search_data_type_t_GB_CHEAT_SEARCH_DATA_TYPE_BE_BIT:
1803 GB_cheat_search_data_type_t = 2;
1804pub const GB_cheat_search_data_type_t_GB_CHEAT_SEARCH_DATA_TYPE_16BIT_BE:
1805 GB_cheat_search_data_type_t = 3;
1806pub type GB_cheat_search_data_type_t = ::core::ffi::c_uint;
1807unsafe extern "C" {
1808 pub fn GB_cheat_search_reset(gb: *mut GB_gameboy_t);
1809}
1810unsafe extern "C" {
1811 pub fn GB_cheat_search_filter(
1812 gb: *mut GB_gameboy_t,
1813 expression: *const ::core::ffi::c_char,
1814 data_type: GB_cheat_search_data_type_t,
1815 ) -> bool;
1816}
1817unsafe extern "C" {
1818 pub fn GB_cheat_search_result_count(gb: *mut GB_gameboy_t) -> usize;
1819}
1820unsafe extern "C" {
1821 pub fn GB_cheat_search_get_results(
1822 gb: *mut GB_gameboy_t,
1823 results: *mut GB_cheat_search_result_t,
1824 );
1825}
1826pub const GB_rumble_mode_t_GB_RUMBLE_DISABLED: GB_rumble_mode_t = 0;
1827pub const GB_rumble_mode_t_GB_RUMBLE_CARTRIDGE_ONLY: GB_rumble_mode_t = 1;
1828pub const GB_rumble_mode_t_GB_RUMBLE_ALL_GAMES: GB_rumble_mode_t = 2;
1829pub type GB_rumble_mode_t = ::core::ffi::c_uint;
1830unsafe extern "C" {
1831 pub fn GB_set_rumble_mode(gb: *mut GB_gameboy_t, mode: GB_rumble_mode_t);
1832}
1833#[repr(C)]
1834#[derive(Debug, Copy, Clone)]
1835pub struct GB_workboy_t {
1836 pub byte_to_send: u8,
1837 pub bit_to_send: bool,
1838 pub byte_being_received: u8,
1839 pub bits_received: u8,
1840 pub mode: u8,
1841 pub key: u8,
1842 pub shift_down: bool,
1843 pub user_shift_down: bool,
1844 pub buffer: [u8; 21usize],
1845 pub buffer_index: u8,
1846}
1847#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1848const _: () = {
1849 ["Size of GB_workboy_t"][::core::mem::size_of::<GB_workboy_t>() - 30usize];
1850 ["Alignment of GB_workboy_t"][::core::mem::align_of::<GB_workboy_t>() - 1usize];
1851 ["Offset of field: GB_workboy_t::byte_to_send"]
1852 [::core::mem::offset_of!(GB_workboy_t, byte_to_send) - 0usize];
1853 ["Offset of field: GB_workboy_t::bit_to_send"]
1854 [::core::mem::offset_of!(GB_workboy_t, bit_to_send) - 1usize];
1855 ["Offset of field: GB_workboy_t::byte_being_received"]
1856 [::core::mem::offset_of!(GB_workboy_t, byte_being_received) - 2usize];
1857 ["Offset of field: GB_workboy_t::bits_received"]
1858 [::core::mem::offset_of!(GB_workboy_t, bits_received) - 3usize];
1859 ["Offset of field: GB_workboy_t::mode"][::core::mem::offset_of!(GB_workboy_t, mode) - 4usize];
1860 ["Offset of field: GB_workboy_t::key"][::core::mem::offset_of!(GB_workboy_t, key) - 5usize];
1861 ["Offset of field: GB_workboy_t::shift_down"]
1862 [::core::mem::offset_of!(GB_workboy_t, shift_down) - 6usize];
1863 ["Offset of field: GB_workboy_t::user_shift_down"]
1864 [::core::mem::offset_of!(GB_workboy_t, user_shift_down) - 7usize];
1865 ["Offset of field: GB_workboy_t::buffer"]
1866 [::core::mem::offset_of!(GB_workboy_t, buffer) - 8usize];
1867 ["Offset of field: GB_workboy_t::buffer_index"]
1868 [::core::mem::offset_of!(GB_workboy_t, buffer_index) - 29usize];
1869};
1870pub type GB_workboy_set_time_callback_t =
1871 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, time: time_t)>;
1872pub type GB_workboy_get_time_callback_t =
1873 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t) -> time_t>;
1874unsafe extern "C" {
1875 pub fn GB_connect_workboy(
1876 gb: *mut GB_gameboy_t,
1877 set_time_callback: GB_workboy_set_time_callback_t,
1878 get_time_callback: GB_workboy_get_time_callback_t,
1879 );
1880}
1881unsafe extern "C" {
1882 pub fn GB_workboy_is_enabled(gb: *mut GB_gameboy_t) -> bool;
1883}
1884unsafe extern "C" {
1885 pub fn GB_workboy_set_key(gb: *mut GB_gameboy_t, key: u8);
1886}
1887unsafe extern "C" {
1888 pub fn GB_random_seed(seed: u64);
1889}
1890unsafe extern "C" {
1891 pub fn GB_random_set_enabled(enable: bool);
1892}
1893#[repr(C)]
1894#[derive(Copy, Clone)]
1895pub union GB_rtc_time_t {
1896 pub __bindgen_anon_1: GB_rtc_time_t__bindgen_ty_1,
1897 pub tpp1: GB_rtc_time_t__bindgen_ty_2,
1898 pub data: [u8; 5usize],
1899}
1900#[repr(C)]
1901#[derive(Debug, Copy, Clone)]
1902pub struct GB_rtc_time_t__bindgen_ty_1 {
1903 pub seconds: u8,
1904 pub minutes: u8,
1905 pub hours: u8,
1906 pub days: u8,
1907 pub high: u8,
1908}
1909#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1910const _: () = {
1911 ["Size of GB_rtc_time_t__bindgen_ty_1"]
1912 [::core::mem::size_of::<GB_rtc_time_t__bindgen_ty_1>() - 5usize];
1913 ["Alignment of GB_rtc_time_t__bindgen_ty_1"]
1914 [::core::mem::align_of::<GB_rtc_time_t__bindgen_ty_1>() - 1usize];
1915 ["Offset of field: GB_rtc_time_t__bindgen_ty_1::seconds"]
1916 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_1, seconds) - 0usize];
1917 ["Offset of field: GB_rtc_time_t__bindgen_ty_1::minutes"]
1918 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_1, minutes) - 1usize];
1919 ["Offset of field: GB_rtc_time_t__bindgen_ty_1::hours"]
1920 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_1, hours) - 2usize];
1921 ["Offset of field: GB_rtc_time_t__bindgen_ty_1::days"]
1922 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_1, days) - 3usize];
1923 ["Offset of field: GB_rtc_time_t__bindgen_ty_1::high"]
1924 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_1, high) - 4usize];
1925};
1926#[repr(C)]
1927#[derive(Debug, Copy, Clone)]
1928pub struct GB_rtc_time_t__bindgen_ty_2 {
1929 pub seconds: u8,
1930 pub minutes: u8,
1931 pub _bitfield_align_1: [u8; 0],
1932 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
1933 pub weeks: u8,
1934}
1935#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1936const _: () = {
1937 ["Size of GB_rtc_time_t__bindgen_ty_2"]
1938 [::core::mem::size_of::<GB_rtc_time_t__bindgen_ty_2>() - 4usize];
1939 ["Alignment of GB_rtc_time_t__bindgen_ty_2"]
1940 [::core::mem::align_of::<GB_rtc_time_t__bindgen_ty_2>() - 1usize];
1941 ["Offset of field: GB_rtc_time_t__bindgen_ty_2::seconds"]
1942 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_2, seconds) - 0usize];
1943 ["Offset of field: GB_rtc_time_t__bindgen_ty_2::minutes"]
1944 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_2, minutes) - 1usize];
1945 ["Offset of field: GB_rtc_time_t__bindgen_ty_2::weeks"]
1946 [::core::mem::offset_of!(GB_rtc_time_t__bindgen_ty_2, weeks) - 3usize];
1947};
1948impl GB_rtc_time_t__bindgen_ty_2 {
1949 #[inline]
1950 pub fn hours(&self) -> u8 {
1951 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u8) }
1952 }
1953 #[inline]
1954 pub fn set_hours(&mut self, val: u8) {
1955 unsafe {
1956 let val: u8 = ::core::mem::transmute(val);
1957 self._bitfield_1.set(0usize, 5u8, val as u64)
1958 }
1959 }
1960 #[inline]
1961 pub unsafe fn hours_raw(this: *const Self) -> u8 {
1962 unsafe {
1963 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
1964 ::core::ptr::addr_of!((*this)._bitfield_1),
1965 0usize,
1966 5u8,
1967 ) as u8)
1968 }
1969 }
1970 #[inline]
1971 pub unsafe fn set_hours_raw(this: *mut Self, val: u8) {
1972 unsafe {
1973 let val: u8 = ::core::mem::transmute(val);
1974 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
1975 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
1976 0usize,
1977 5u8,
1978 val as u64,
1979 )
1980 }
1981 }
1982 #[inline]
1983 pub fn weekday(&self) -> u8 {
1984 unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u8) }
1985 }
1986 #[inline]
1987 pub fn set_weekday(&mut self, val: u8) {
1988 unsafe {
1989 let val: u8 = ::core::mem::transmute(val);
1990 self._bitfield_1.set(5usize, 3u8, val as u64)
1991 }
1992 }
1993 #[inline]
1994 pub unsafe fn weekday_raw(this: *const Self) -> u8 {
1995 unsafe {
1996 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
1997 ::core::ptr::addr_of!((*this)._bitfield_1),
1998 5usize,
1999 3u8,
2000 ) as u8)
2001 }
2002 }
2003 #[inline]
2004 pub unsafe fn set_weekday_raw(this: *mut Self, val: u8) {
2005 unsafe {
2006 let val: u8 = ::core::mem::transmute(val);
2007 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
2008 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
2009 5usize,
2010 3u8,
2011 val as u64,
2012 )
2013 }
2014 }
2015 #[inline]
2016 pub fn new_bitfield_1(hours: u8, weekday: u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
2017 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
2018 __bindgen_bitfield_unit.set(0usize, 5u8, {
2019 let hours: u8 = unsafe { ::core::mem::transmute(hours) };
2020 hours as u64
2021 });
2022 __bindgen_bitfield_unit.set(5usize, 3u8, {
2023 let weekday: u8 = unsafe { ::core::mem::transmute(weekday) };
2024 weekday as u64
2025 });
2026 __bindgen_bitfield_unit
2027 }
2028}
2029#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2030const _: () = {
2031 ["Size of GB_rtc_time_t"][::core::mem::size_of::<GB_rtc_time_t>() - 5usize];
2032 ["Alignment of GB_rtc_time_t"][::core::mem::align_of::<GB_rtc_time_t>() - 1usize];
2033 ["Offset of field: GB_rtc_time_t::tpp1"][::core::mem::offset_of!(GB_rtc_time_t, tpp1) - 0usize];
2034 ["Offset of field: GB_rtc_time_t::data"][::core::mem::offset_of!(GB_rtc_time_t, data) - 0usize];
2035};
2036#[repr(C, packed)]
2037#[derive(Debug, Copy, Clone)]
2038pub struct GB_huc3_rtc_time_t {
2039 pub last_rtc_second: u64,
2040 pub minutes: u16,
2041 pub days: u16,
2042 pub alarm_minutes: u16,
2043 pub alarm_days: u16,
2044 pub alarm_enabled: u8,
2045}
2046#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2047const _: () = {
2048 ["Size of GB_huc3_rtc_time_t"][::core::mem::size_of::<GB_huc3_rtc_time_t>() - 17usize];
2049 ["Alignment of GB_huc3_rtc_time_t"][::core::mem::align_of::<GB_huc3_rtc_time_t>() - 1usize];
2050 ["Offset of field: GB_huc3_rtc_time_t::last_rtc_second"]
2051 [::core::mem::offset_of!(GB_huc3_rtc_time_t, last_rtc_second) - 0usize];
2052 ["Offset of field: GB_huc3_rtc_time_t::minutes"]
2053 [::core::mem::offset_of!(GB_huc3_rtc_time_t, minutes) - 8usize];
2054 ["Offset of field: GB_huc3_rtc_time_t::days"]
2055 [::core::mem::offset_of!(GB_huc3_rtc_time_t, days) - 10usize];
2056 ["Offset of field: GB_huc3_rtc_time_t::alarm_minutes"]
2057 [::core::mem::offset_of!(GB_huc3_rtc_time_t, alarm_minutes) - 12usize];
2058 ["Offset of field: GB_huc3_rtc_time_t::alarm_days"]
2059 [::core::mem::offset_of!(GB_huc3_rtc_time_t, alarm_days) - 14usize];
2060 ["Offset of field: GB_huc3_rtc_time_t::alarm_enabled"]
2061 [::core::mem::offset_of!(GB_huc3_rtc_time_t, alarm_enabled) - 16usize];
2062};
2063pub const GB_border_mode_t_GB_BORDER_SGB: GB_border_mode_t = 0;
2064pub const GB_border_mode_t_GB_BORDER_NEVER: GB_border_mode_t = 1;
2065pub const GB_border_mode_t_GB_BORDER_ALWAYS: GB_border_mode_t = 2;
2066pub type GB_border_mode_t = ::core::ffi::c_uint;
2067pub const GB_log_attributes_t_GB_LOG_BOLD: GB_log_attributes_t = 1;
2068pub const GB_log_attributes_t_GB_LOG_DASHED_UNDERLINE: GB_log_attributes_t = 2;
2069pub const GB_log_attributes_t_GB_LOG_UNDERLINE: GB_log_attributes_t = 4;
2070pub const GB_log_attributes_t_GB_LOG_UNDERLINE_MASK: GB_log_attributes_t = 6;
2071pub type GB_log_attributes_t = ::core::ffi::c_uint;
2072pub const GB_boot_rom_t_GB_BOOT_ROM_DMG_0: GB_boot_rom_t = 0;
2073pub const GB_boot_rom_t_GB_BOOT_ROM_DMG: GB_boot_rom_t = 1;
2074pub const GB_boot_rom_t_GB_BOOT_ROM_MGB: GB_boot_rom_t = 2;
2075pub const GB_boot_rom_t_GB_BOOT_ROM_SGB: GB_boot_rom_t = 3;
2076pub const GB_boot_rom_t_GB_BOOT_ROM_SGB2: GB_boot_rom_t = 4;
2077pub const GB_boot_rom_t_GB_BOOT_ROM_CGB_0: GB_boot_rom_t = 5;
2078pub const GB_boot_rom_t_GB_BOOT_ROM_CGB: GB_boot_rom_t = 6;
2079pub const GB_boot_rom_t_GB_BOOT_ROM_CGB_E: GB_boot_rom_t = 7;
2080pub const GB_boot_rom_t_GB_BOOT_ROM_AGB_0: GB_boot_rom_t = 8;
2081pub const GB_boot_rom_t_GB_BOOT_ROM_AGB: GB_boot_rom_t = 9;
2082pub type GB_boot_rom_t = ::core::ffi::c_uint;
2083pub type GB_log_callback_t = ::core::option::Option<
2084 unsafe extern "C" fn(
2085 gb: *mut GB_gameboy_t,
2086 string: *const ::core::ffi::c_char,
2087 attributes: GB_log_attributes_t,
2088 ),
2089>;
2090pub type GB_input_callback_t =
2091 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t) -> *mut ::core::ffi::c_char>;
2092pub type GB_infrared_callback_t =
2093 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, on: bool)>;
2094pub type GB_rumble_callback_t =
2095 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, rumble_amplitude: f64)>;
2096pub type GB_serial_transfer_bit_start_callback_t =
2097 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, bit_to_send: bool)>;
2098pub type GB_serial_transfer_bit_end_callback_t =
2099 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t) -> bool>;
2100pub type GB_joyp_write_callback_t =
2101 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, value: u8)>;
2102pub type GB_icd_pixel_callback_t =
2103 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, row: u8)>;
2104pub type GB_icd_hreset_callback_t =
2105 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t)>;
2106pub type GB_icd_vreset_callback_t =
2107 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t)>;
2108pub type GB_boot_rom_load_callback_t =
2109 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, type_: GB_boot_rom_t)>;
2110pub type GB_execution_callback_t =
2111 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, address: u16, opcode: u8)>;
2112pub type GB_lcd_line_callback_t =
2113 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, line: u8)>;
2114pub type GB_lcd_status_callback_t =
2115 ::core::option::Option<unsafe extern "C" fn(gb: *mut GB_gameboy_t, on: bool)>;
2116#[repr(C)]
2117#[derive(Debug, Copy, Clone)]
2118pub struct GB_breakpoint_s {
2119 _unused: [u8; 0],
2120}
2121#[repr(C)]
2122#[derive(Debug, Copy, Clone)]
2123pub struct GB_watchpoint_s {
2124 _unused: [u8; 0],
2125}
2126#[repr(C)]
2127#[derive(Debug, Copy, Clone)]
2128pub struct GB_gbs_header_t {
2129 pub magic: u32,
2130 pub track_count: u8,
2131 pub first_track: u8,
2132 pub load_address: u16,
2133 pub init_address: u16,
2134 pub play_address: u16,
2135 pub sp: u16,
2136 pub TMA: u8,
2137 pub TAC: u8,
2138 pub title: [::core::ffi::c_char; 32usize],
2139 pub author: [::core::ffi::c_char; 32usize],
2140 pub copyright: [::core::ffi::c_char; 32usize],
2141}
2142#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2143const _: () = {
2144 ["Size of GB_gbs_header_t"][::core::mem::size_of::<GB_gbs_header_t>() - 112usize];
2145 ["Alignment of GB_gbs_header_t"][::core::mem::align_of::<GB_gbs_header_t>() - 4usize];
2146 ["Offset of field: GB_gbs_header_t::magic"]
2147 [::core::mem::offset_of!(GB_gbs_header_t, magic) - 0usize];
2148 ["Offset of field: GB_gbs_header_t::track_count"]
2149 [::core::mem::offset_of!(GB_gbs_header_t, track_count) - 4usize];
2150 ["Offset of field: GB_gbs_header_t::first_track"]
2151 [::core::mem::offset_of!(GB_gbs_header_t, first_track) - 5usize];
2152 ["Offset of field: GB_gbs_header_t::load_address"]
2153 [::core::mem::offset_of!(GB_gbs_header_t, load_address) - 6usize];
2154 ["Offset of field: GB_gbs_header_t::init_address"]
2155 [::core::mem::offset_of!(GB_gbs_header_t, init_address) - 8usize];
2156 ["Offset of field: GB_gbs_header_t::play_address"]
2157 [::core::mem::offset_of!(GB_gbs_header_t, play_address) - 10usize];
2158 ["Offset of field: GB_gbs_header_t::sp"]
2159 [::core::mem::offset_of!(GB_gbs_header_t, sp) - 12usize];
2160 ["Offset of field: GB_gbs_header_t::TMA"]
2161 [::core::mem::offset_of!(GB_gbs_header_t, TMA) - 14usize];
2162 ["Offset of field: GB_gbs_header_t::TAC"]
2163 [::core::mem::offset_of!(GB_gbs_header_t, TAC) - 15usize];
2164 ["Offset of field: GB_gbs_header_t::title"]
2165 [::core::mem::offset_of!(GB_gbs_header_t, title) - 16usize];
2166 ["Offset of field: GB_gbs_header_t::author"]
2167 [::core::mem::offset_of!(GB_gbs_header_t, author) - 48usize];
2168 ["Offset of field: GB_gbs_header_t::copyright"]
2169 [::core::mem::offset_of!(GB_gbs_header_t, copyright) - 80usize];
2170};
2171#[repr(C)]
2172#[derive(Debug, Copy, Clone)]
2173pub struct GB_gbs_info_t {
2174 pub track_count: u8,
2175 pub first_track: u8,
2176 pub title: [::core::ffi::c_char; 33usize],
2177 pub author: [::core::ffi::c_char; 33usize],
2178 pub copyright: [::core::ffi::c_char; 33usize],
2179}
2180#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2181const _: () = {
2182 ["Size of GB_gbs_info_t"][::core::mem::size_of::<GB_gbs_info_t>() - 101usize];
2183 ["Alignment of GB_gbs_info_t"][::core::mem::align_of::<GB_gbs_info_t>() - 1usize];
2184 ["Offset of field: GB_gbs_info_t::track_count"]
2185 [::core::mem::offset_of!(GB_gbs_info_t, track_count) - 0usize];
2186 ["Offset of field: GB_gbs_info_t::first_track"]
2187 [::core::mem::offset_of!(GB_gbs_info_t, first_track) - 1usize];
2188 ["Offset of field: GB_gbs_info_t::title"]
2189 [::core::mem::offset_of!(GB_gbs_info_t, title) - 2usize];
2190 ["Offset of field: GB_gbs_info_t::author"]
2191 [::core::mem::offset_of!(GB_gbs_info_t, author) - 35usize];
2192 ["Offset of field: GB_gbs_info_t::copyright"]
2193 [::core::mem::offset_of!(GB_gbs_info_t, copyright) - 68usize];
2194};
2195#[repr(C)]
2196#[derive(Copy, Clone)]
2197pub union GB_registers_t {
2198 pub registers: [u16; 6usize],
2199 pub __bindgen_anon_1: GB_registers_t__bindgen_ty_1,
2200 pub __bindgen_anon_2: GB_registers_t__bindgen_ty_2,
2201}
2202#[repr(C)]
2203#[derive(Debug, Copy, Clone)]
2204pub struct GB_registers_t__bindgen_ty_1 {
2205 pub af: u16,
2206 pub bc: u16,
2207 pub de: u16,
2208 pub hl: u16,
2209 pub sp: u16,
2210 pub pc: u16,
2211}
2212#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2213const _: () = {
2214 ["Size of GB_registers_t__bindgen_ty_1"]
2215 [::core::mem::size_of::<GB_registers_t__bindgen_ty_1>() - 12usize];
2216 ["Alignment of GB_registers_t__bindgen_ty_1"]
2217 [::core::mem::align_of::<GB_registers_t__bindgen_ty_1>() - 2usize];
2218 ["Offset of field: GB_registers_t__bindgen_ty_1::af"]
2219 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_1, af) - 0usize];
2220 ["Offset of field: GB_registers_t__bindgen_ty_1::bc"]
2221 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_1, bc) - 2usize];
2222 ["Offset of field: GB_registers_t__bindgen_ty_1::de"]
2223 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_1, de) - 4usize];
2224 ["Offset of field: GB_registers_t__bindgen_ty_1::hl"]
2225 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_1, hl) - 6usize];
2226 ["Offset of field: GB_registers_t__bindgen_ty_1::sp"]
2227 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_1, sp) - 8usize];
2228 ["Offset of field: GB_registers_t__bindgen_ty_1::pc"]
2229 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_1, pc) - 10usize];
2230};
2231#[repr(C)]
2232#[derive(Debug, Copy, Clone)]
2233pub struct GB_registers_t__bindgen_ty_2 {
2234 pub f: u8,
2235 pub a: u8,
2236 pub c: u8,
2237 pub b: u8,
2238 pub e: u8,
2239 pub d: u8,
2240 pub l: u8,
2241 pub h: u8,
2242}
2243#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2244const _: () = {
2245 ["Size of GB_registers_t__bindgen_ty_2"]
2246 [::core::mem::size_of::<GB_registers_t__bindgen_ty_2>() - 8usize];
2247 ["Alignment of GB_registers_t__bindgen_ty_2"]
2248 [::core::mem::align_of::<GB_registers_t__bindgen_ty_2>() - 1usize];
2249 ["Offset of field: GB_registers_t__bindgen_ty_2::f"]
2250 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, f) - 0usize];
2251 ["Offset of field: GB_registers_t__bindgen_ty_2::a"]
2252 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, a) - 1usize];
2253 ["Offset of field: GB_registers_t__bindgen_ty_2::c"]
2254 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, c) - 2usize];
2255 ["Offset of field: GB_registers_t__bindgen_ty_2::b"]
2256 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, b) - 3usize];
2257 ["Offset of field: GB_registers_t__bindgen_ty_2::e"]
2258 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, e) - 4usize];
2259 ["Offset of field: GB_registers_t__bindgen_ty_2::d"]
2260 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, d) - 5usize];
2261 ["Offset of field: GB_registers_t__bindgen_ty_2::l"]
2262 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, l) - 6usize];
2263 ["Offset of field: GB_registers_t__bindgen_ty_2::h"]
2264 [::core::mem::offset_of!(GB_registers_t__bindgen_ty_2, h) - 7usize];
2265};
2266#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2267const _: () = {
2268 ["Size of GB_registers_t"][::core::mem::size_of::<GB_registers_t>() - 12usize];
2269 ["Alignment of GB_registers_t"][::core::mem::align_of::<GB_registers_t>() - 2usize];
2270 ["Offset of field: GB_registers_t::registers"]
2271 [::core::mem::offset_of!(GB_registers_t, registers) - 0usize];
2272};
2273pub const GB_accessory_t_GB_ACCESSORY_NONE: GB_accessory_t = 0;
2274pub const GB_accessory_t_GB_ACCESSORY_PRINTER: GB_accessory_t = 1;
2275pub const GB_accessory_t_GB_ACCESSORY_WORKBOY: GB_accessory_t = 2;
2276pub type GB_accessory_t = u8;
2277#[repr(C)]
2278pub struct GB_gameboy_internal_s {
2279 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_1,
2280 pub header_section_end: __IncompleteArrayField<u8>,
2281 pub __bindgen_anon_2: GB_gameboy_internal_s__bindgen_ty_2,
2282 pub core_state_section_end: __IncompleteArrayField<u8>,
2283 pub __bindgen_anon_3: GB_gameboy_internal_s__bindgen_ty_3,
2284 pub dma_section_end: __IncompleteArrayField<u8>,
2285 pub __bindgen_anon_4: GB_gameboy_internal_s__bindgen_ty_4,
2286 pub mbc_section_end: __IncompleteArrayField<u8>,
2287 pub __bindgen_anon_5: GB_gameboy_internal_s__bindgen_ty_5,
2288 pub hram_section_end: __IncompleteArrayField<u8>,
2289 pub __bindgen_anon_6: GB_gameboy_internal_s__bindgen_ty_6,
2290 pub timing_section_end: __IncompleteArrayField<u8>,
2291 pub __bindgen_anon_7: GB_gameboy_internal_s__bindgen_ty_7,
2292 pub apu_section_end: __IncompleteArrayField<u8>,
2293 pub __bindgen_anon_8: GB_gameboy_internal_s__bindgen_ty_8,
2294 pub rtc_section_end: __IncompleteArrayField<u8>,
2295 pub __bindgen_anon_9: GB_gameboy_internal_s__bindgen_ty_9,
2296 pub video_section_end: __IncompleteArrayField<u8>,
2297 pub __bindgen_anon_10: GB_gameboy_internal_s__bindgen_ty_10,
2298 pub accessory_section_end: __IncompleteArrayField<u8>,
2299 pub __bindgen_anon_11: GB_gameboy_internal_s__bindgen_ty_11,
2300 pub unsaved_section_end: __IncompleteArrayField<u8>,
2301}
2302#[repr(C)]
2303#[repr(align(8))]
2304#[derive(Copy, Clone)]
2305pub union GB_gameboy_internal_s__bindgen_ty_1 {
2306 pub header_section_start: u8,
2307 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1,
2308}
2309#[repr(C)]
2310#[derive(Debug, Copy, Clone)]
2311pub struct GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1 {
2312 pub magic: u32,
2313 pub version: u32,
2314}
2315#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2316const _: () = {
2317 ["Size of GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1"]
2318 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1>() - 8usize];
2319 ["Alignment of GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1"]
2320 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1>() - 4usize];
2321 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1::magic"][::core::mem::offset_of!(
2322 GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1,
2323 magic
2324 ) - 0usize];
2325 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1::version"][::core::mem::offset_of!(
2326 GB_gameboy_internal_s__bindgen_ty_1__bindgen_ty_1,
2327 version
2328 ) - 4usize];
2329};
2330#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2331const _: () = {
2332 ["Size of GB_gameboy_internal_s__bindgen_ty_1"]
2333 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_1>() - 8usize];
2334 ["Alignment of GB_gameboy_internal_s__bindgen_ty_1"]
2335 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_1>() - 8usize];
2336 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_1::header_section_start"][::core::mem::offset_of!(
2337 GB_gameboy_internal_s__bindgen_ty_1,
2338 header_section_start
2339 ) - 0usize];
2340};
2341#[repr(C)]
2342#[repr(align(8))]
2343#[derive(Copy, Clone)]
2344pub union GB_gameboy_internal_s__bindgen_ty_2 {
2345 pub core_state_section_start: u8,
2346 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2347}
2348#[repr(C)]
2349#[derive(Copy, Clone)]
2350pub struct GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1 {
2351 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1,
2352 pub ime: u8,
2353 pub interrupt_enable: u8,
2354 pub cgb_ram_bank: u8,
2355 pub model: GB_model_t,
2356 pub cgb_mode: bool,
2357 pub cgb_double_speed: bool,
2358 pub halted: bool,
2359 pub stopped: bool,
2360 pub boot_rom_finished: bool,
2361 pub ime_toggle: bool,
2362 pub halt_bug: bool,
2363 pub just_halted: bool,
2364 pub infrared_input: bool,
2365 pub extra_oam: [u8; 96usize],
2366 pub ram_size: u32,
2367 pub ir_sensor: i32,
2368 pub effective_ir_input: bool,
2369 pub address_bus: u16,
2370 pub data_bus: u8,
2371 pub data_bus_decay_countdown: u32,
2372}
2373#[repr(C)]
2374#[derive(Copy, Clone)]
2375pub union GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 {
2376 pub registers: [u16; 6usize],
2377 pub __bindgen_anon_1:
2378 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2379 pub __bindgen_anon_2:
2380 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2381}
2382#[repr(C)]
2383#[derive(Debug, Copy, Clone)]
2384pub struct GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
2385 pub af: u16,
2386 pub bc: u16,
2387 pub de: u16,
2388 pub hl: u16,
2389 pub sp: u16,
2390 pub pc: u16,
2391}
2392#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2393const _: () = {
2394 ["Size of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1"]
2395 [::core::mem::size_of::<
2396 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2397 >() - 12usize];
2398 ["Alignment of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1"]
2399 [::core::mem::align_of::<
2400 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2401 >() - 2usize];
2402 [
2403 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1::af",
2404 ][::core::mem::offset_of!(
2405 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2406 af
2407 ) - 0usize];
2408 [
2409 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1::bc",
2410 ][::core::mem::offset_of!(
2411 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2412 bc
2413 ) - 2usize];
2414 [
2415 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1::de",
2416 ][::core::mem::offset_of!(
2417 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2418 de
2419 ) - 4usize];
2420 [
2421 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1::hl",
2422 ][::core::mem::offset_of!(
2423 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2424 hl
2425 ) - 6usize];
2426 [
2427 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1::sp",
2428 ][::core::mem::offset_of!(
2429 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2430 sp
2431 ) - 8usize];
2432 [
2433 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1::pc",
2434 ][::core::mem::offset_of!(
2435 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2436 pc
2437 ) - 10usize];
2438};
2439#[repr(C)]
2440#[derive(Debug, Copy, Clone)]
2441pub struct GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 {
2442 pub f: u8,
2443 pub a: u8,
2444 pub c: u8,
2445 pub b: u8,
2446 pub e: u8,
2447 pub d: u8,
2448 pub l: u8,
2449 pub h: u8,
2450}
2451#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2452const _: () = {
2453 ["Size of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2"]
2454 [::core::mem::size_of::<
2455 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2456 >() - 8usize];
2457 ["Alignment of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2"]
2458 [::core::mem::align_of::<
2459 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2460 >() - 1usize];
2461 [
2462 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::f",
2463 ][::core::mem::offset_of!(
2464 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2465 f
2466 ) - 0usize];
2467 [
2468 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::a",
2469 ][::core::mem::offset_of!(
2470 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2471 a
2472 ) - 1usize];
2473 [
2474 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::c",
2475 ][::core::mem::offset_of!(
2476 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2477 c
2478 ) - 2usize];
2479 [
2480 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::b",
2481 ][::core::mem::offset_of!(
2482 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2483 b
2484 ) - 3usize];
2485 [
2486 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::e",
2487 ][::core::mem::offset_of!(
2488 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2489 e
2490 ) - 4usize];
2491 [
2492 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::d",
2493 ][::core::mem::offset_of!(
2494 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2495 d
2496 ) - 5usize];
2497 [
2498 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::l",
2499 ][::core::mem::offset_of!(
2500 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2501 l
2502 ) - 6usize];
2503 [
2504 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2::h",
2505 ][::core::mem::offset_of!(
2506 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2507 h
2508 ) - 7usize];
2509};
2510#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2511const _: () = {
2512 ["Size of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1"][::core::mem::size_of::<
2513 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1,
2514 >() - 12usize];
2515 ["Alignment of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1"]
2516 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1>(
2517 ) - 2usize];
2518 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1::registers"]
2519 [::core::mem::offset_of!(
2520 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1,
2521 registers
2522 ) - 0usize];
2523};
2524#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2525const _: () = {
2526 ["Size of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1"]
2527 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1>() - 148usize];
2528 ["Alignment of GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1"]
2529 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1>() - 4usize];
2530 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::ime"]
2531 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1, ime) - 12usize];
2532 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::interrupt_enable"][::core::mem::offset_of!(
2533 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2534 interrupt_enable
2535 )
2536 - 13usize];
2537 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::cgb_ram_bank"][::core::mem::offset_of!(
2538 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2539 cgb_ram_bank
2540 )
2541 - 14usize];
2542 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::model"][::core::mem::offset_of!(
2543 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2544 model
2545 ) - 16usize];
2546 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::cgb_mode"][::core::mem::offset_of!(
2547 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2548 cgb_mode
2549 ) - 20usize];
2550 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::cgb_double_speed"][::core::mem::offset_of!(
2551 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2552 cgb_double_speed
2553 )
2554 - 21usize];
2555 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::halted"][::core::mem::offset_of!(
2556 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2557 halted
2558 ) - 22usize];
2559 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::stopped"][::core::mem::offset_of!(
2560 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2561 stopped
2562 ) - 23usize];
2563 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::boot_rom_finished"][::core::mem::offset_of!(
2564 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2565 boot_rom_finished
2566 )
2567 - 24usize];
2568 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::ime_toggle"][::core::mem::offset_of!(
2569 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2570 ime_toggle
2571 ) - 25usize];
2572 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::halt_bug"][::core::mem::offset_of!(
2573 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2574 halt_bug
2575 ) - 26usize];
2576 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::just_halted"][::core::mem::offset_of!(
2577 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2578 just_halted
2579 )
2580 - 27usize];
2581 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::infrared_input"][::core::mem::offset_of!(
2582 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2583 infrared_input
2584 )
2585 - 28usize];
2586 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::extra_oam"][::core::mem::offset_of!(
2587 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2588 extra_oam
2589 ) - 29usize];
2590 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::ram_size"][::core::mem::offset_of!(
2591 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2592 ram_size
2593 ) - 128usize];
2594 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::ir_sensor"][::core::mem::offset_of!(
2595 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2596 ir_sensor
2597 ) - 132usize];
2598 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::effective_ir_input"][::core::mem::offset_of!(
2599 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2600 effective_ir_input
2601 )
2602 - 136usize];
2603 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::address_bus"][::core::mem::offset_of!(
2604 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2605 address_bus
2606 )
2607 - 138usize];
2608 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::data_bus"][::core::mem::offset_of!(
2609 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2610 data_bus
2611 ) - 140usize];
2612 [
2613 "Offset of field: GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1::data_bus_decay_countdown",
2614 ][::core::mem::offset_of!(
2615 GB_gameboy_internal_s__bindgen_ty_2__bindgen_ty_1,
2616 data_bus_decay_countdown
2617 ) - 144usize];
2618};
2619#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2620const _: () = {
2621 ["Size of GB_gameboy_internal_s__bindgen_ty_2"]
2622 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_2>() - 152usize];
2623 ["Alignment of GB_gameboy_internal_s__bindgen_ty_2"]
2624 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_2>() - 8usize];
2625 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_2::core_state_section_start"][::core::mem::offset_of!(
2626 GB_gameboy_internal_s__bindgen_ty_2,
2627 core_state_section_start
2628 ) - 0usize];
2629};
2630#[repr(C)]
2631#[repr(align(8))]
2632#[derive(Copy, Clone)]
2633pub union GB_gameboy_internal_s__bindgen_ty_3 {
2634 pub dma_section_start: u8,
2635 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2636}
2637#[repr(C)]
2638#[derive(Debug, Copy, Clone)]
2639pub struct GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1 {
2640 pub hdma_on: bool,
2641 pub hdma_on_hblank: bool,
2642 pub hdma_steps_left: u8,
2643 pub hdma_current_src: u16,
2644 pub hdma_current_dest: u16,
2645 pub dma_current_dest: u8,
2646 pub last_dma_read: u8,
2647 pub dma_current_src: u16,
2648 pub dma_cycles: u16,
2649 pub dma_cycles_modulo: i8,
2650 pub dma_ppu_vram_conflict: bool,
2651 pub dma_ppu_vram_conflict_addr: u16,
2652 pub allow_hdma_on_wake: bool,
2653 pub dma_restarting: bool,
2654}
2655#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2656const _: () = {
2657 ["Size of GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1"]
2658 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1>() - 20usize];
2659 ["Alignment of GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1"]
2660 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1>() - 2usize];
2661 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::hdma_on"][::core::mem::offset_of!(
2662 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2663 hdma_on
2664 ) - 0usize];
2665 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::hdma_on_hblank"][::core::mem::offset_of!(
2666 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2667 hdma_on_hblank
2668 )
2669 - 1usize];
2670 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::hdma_steps_left"][::core::mem::offset_of!(
2671 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2672 hdma_steps_left
2673 )
2674 - 2usize];
2675 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::hdma_current_src"][::core::mem::offset_of!(
2676 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2677 hdma_current_src
2678 )
2679 - 4usize];
2680 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::hdma_current_dest"][::core::mem::offset_of!(
2681 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2682 hdma_current_dest
2683 )
2684 - 6usize];
2685 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::dma_current_dest"][::core::mem::offset_of!(
2686 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2687 dma_current_dest
2688 )
2689 - 8usize];
2690 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::last_dma_read"][::core::mem::offset_of!(
2691 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2692 last_dma_read
2693 )
2694 - 9usize];
2695 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::dma_current_src"][::core::mem::offset_of!(
2696 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2697 dma_current_src
2698 )
2699 - 10usize];
2700 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::dma_cycles"][::core::mem::offset_of!(
2701 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2702 dma_cycles
2703 ) - 12usize];
2704 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::dma_cycles_modulo"][::core::mem::offset_of!(
2705 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2706 dma_cycles_modulo
2707 )
2708 - 14usize];
2709 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::dma_ppu_vram_conflict"][::core::mem::offset_of!(
2710 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2711 dma_ppu_vram_conflict
2712 )
2713 - 15usize];
2714 [
2715 "Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::dma_ppu_vram_conflict_addr",
2716 ][::core::mem::offset_of!(
2717 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2718 dma_ppu_vram_conflict_addr
2719 ) - 16usize];
2720 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::allow_hdma_on_wake"][::core::mem::offset_of!(
2721 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2722 allow_hdma_on_wake
2723 )
2724 - 18usize];
2725 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1::dma_restarting"][::core::mem::offset_of!(
2726 GB_gameboy_internal_s__bindgen_ty_3__bindgen_ty_1,
2727 dma_restarting
2728 )
2729 - 19usize];
2730};
2731#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2732const _: () = {
2733 ["Size of GB_gameboy_internal_s__bindgen_ty_3"]
2734 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_3>() - 24usize];
2735 ["Alignment of GB_gameboy_internal_s__bindgen_ty_3"]
2736 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_3>() - 8usize];
2737 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_3::dma_section_start"]
2738 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_3, dma_section_start) - 0usize];
2739};
2740#[repr(C)]
2741#[repr(align(8))]
2742#[derive(Copy, Clone)]
2743pub union GB_gameboy_internal_s__bindgen_ty_4 {
2744 pub mbc_section_start: u8,
2745 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
2746}
2747#[repr(C)]
2748#[derive(Copy, Clone)]
2749pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1 {
2750 pub mbc_rom_bank: u16,
2751 pub mbc_rom0_bank: u16,
2752 pub mbc_ram_bank: u8,
2753 pub mbc_ram_size: u32,
2754 pub mbc_ram_enable: bool,
2755 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
2756 pub rumble_strength: u8,
2757 pub cart_ir: bool,
2758 pub camera_registers_mapped: bool,
2759 pub camera_registers: [u8; 54usize],
2760 pub camera_alignment: u8,
2761 pub camera_countdown: i32,
2762}
2763#[repr(C)]
2764#[derive(Copy, Clone)]
2765pub union GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 {
2766 pub mbc1: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2767 pub mbc2: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2768 pub mbc3: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3,
2769 pub mbc5: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4,
2770 pub mbc7: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
2771 pub mmm01: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6,
2772 pub huc1: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7,
2773 pub huc3: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
2774 pub tpp1: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9,
2775}
2776#[repr(C)]
2777#[derive(Debug, Copy, Clone)]
2778pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
2779 pub _bitfield_align_1: [u8; 0],
2780 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
2781}
2782#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2783const _: () = {
2784 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1"]
2785 [::core::mem::size_of::<
2786 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2787 >() - 1usize];
2788 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1"]
2789 [::core::mem::align_of::<
2790 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
2791 >() - 1usize];
2792};
2793impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
2794 #[inline]
2795 pub fn bank_low(&self) -> u8 {
2796 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u8) }
2797 }
2798 #[inline]
2799 pub fn set_bank_low(&mut self, val: u8) {
2800 unsafe {
2801 let val: u8 = ::core::mem::transmute(val);
2802 self._bitfield_1.set(0usize, 5u8, val as u64)
2803 }
2804 }
2805 #[inline]
2806 pub unsafe fn bank_low_raw(this: *const Self) -> u8 {
2807 unsafe {
2808 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
2809 ::core::ptr::addr_of!((*this)._bitfield_1),
2810 0usize,
2811 5u8,
2812 ) as u8)
2813 }
2814 }
2815 #[inline]
2816 pub unsafe fn set_bank_low_raw(this: *mut Self, val: u8) {
2817 unsafe {
2818 let val: u8 = ::core::mem::transmute(val);
2819 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
2820 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
2821 0usize,
2822 5u8,
2823 val as u64,
2824 )
2825 }
2826 }
2827 #[inline]
2828 pub fn bank_high(&self) -> u8 {
2829 unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u8) }
2830 }
2831 #[inline]
2832 pub fn set_bank_high(&mut self, val: u8) {
2833 unsafe {
2834 let val: u8 = ::core::mem::transmute(val);
2835 self._bitfield_1.set(5usize, 2u8, val as u64)
2836 }
2837 }
2838 #[inline]
2839 pub unsafe fn bank_high_raw(this: *const Self) -> u8 {
2840 unsafe {
2841 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
2842 ::core::ptr::addr_of!((*this)._bitfield_1),
2843 5usize,
2844 2u8,
2845 ) as u8)
2846 }
2847 }
2848 #[inline]
2849 pub unsafe fn set_bank_high_raw(this: *mut Self, val: u8) {
2850 unsafe {
2851 let val: u8 = ::core::mem::transmute(val);
2852 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
2853 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
2854 5usize,
2855 2u8,
2856 val as u64,
2857 )
2858 }
2859 }
2860 #[inline]
2861 pub fn mode(&self) -> u8 {
2862 unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
2863 }
2864 #[inline]
2865 pub fn set_mode(&mut self, val: u8) {
2866 unsafe {
2867 let val: u8 = ::core::mem::transmute(val);
2868 self._bitfield_1.set(7usize, 1u8, val as u64)
2869 }
2870 }
2871 #[inline]
2872 pub unsafe fn mode_raw(this: *const Self) -> u8 {
2873 unsafe {
2874 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
2875 ::core::ptr::addr_of!((*this)._bitfield_1),
2876 7usize,
2877 1u8,
2878 ) as u8)
2879 }
2880 }
2881 #[inline]
2882 pub unsafe fn set_mode_raw(this: *mut Self, val: u8) {
2883 unsafe {
2884 let val: u8 = ::core::mem::transmute(val);
2885 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
2886 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
2887 7usize,
2888 1u8,
2889 val as u64,
2890 )
2891 }
2892 }
2893 #[inline]
2894 pub fn new_bitfield_1(
2895 bank_low: u8,
2896 bank_high: u8,
2897 mode: u8,
2898 ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
2899 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
2900 __bindgen_bitfield_unit.set(0usize, 5u8, {
2901 let bank_low: u8 = unsafe { ::core::mem::transmute(bank_low) };
2902 bank_low as u64
2903 });
2904 __bindgen_bitfield_unit.set(5usize, 2u8, {
2905 let bank_high: u8 = unsafe { ::core::mem::transmute(bank_high) };
2906 bank_high as u64
2907 });
2908 __bindgen_bitfield_unit.set(7usize, 1u8, {
2909 let mode: u8 = unsafe { ::core::mem::transmute(mode) };
2910 mode as u64
2911 });
2912 __bindgen_bitfield_unit
2913 }
2914}
2915#[repr(C)]
2916#[derive(Debug, Copy, Clone)]
2917pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 {
2918 pub _bitfield_align_1: [u8; 0],
2919 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
2920}
2921#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2922const _: () = {
2923 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2"]
2924 [::core::mem::size_of::<
2925 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2926 >() - 1usize];
2927 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2"]
2928 [::core::mem::align_of::<
2929 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
2930 >() - 1usize];
2931};
2932impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 {
2933 #[inline]
2934 pub fn rom_bank(&self) -> u8 {
2935 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
2936 }
2937 #[inline]
2938 pub fn set_rom_bank(&mut self, val: u8) {
2939 unsafe {
2940 let val: u8 = ::core::mem::transmute(val);
2941 self._bitfield_1.set(0usize, 4u8, val as u64)
2942 }
2943 }
2944 #[inline]
2945 pub unsafe fn rom_bank_raw(this: *const Self) -> u8 {
2946 unsafe {
2947 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
2948 ::core::ptr::addr_of!((*this)._bitfield_1),
2949 0usize,
2950 4u8,
2951 ) as u8)
2952 }
2953 }
2954 #[inline]
2955 pub unsafe fn set_rom_bank_raw(this: *mut Self, val: u8) {
2956 unsafe {
2957 let val: u8 = ::core::mem::transmute(val);
2958 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
2959 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
2960 0usize,
2961 4u8,
2962 val as u64,
2963 )
2964 }
2965 }
2966 #[inline]
2967 pub fn new_bitfield_1(rom_bank: u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
2968 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
2969 __bindgen_bitfield_unit.set(0usize, 4u8, {
2970 let rom_bank: u8 = unsafe { ::core::mem::transmute(rom_bank) };
2971 rom_bank as u64
2972 });
2973 __bindgen_bitfield_unit
2974 }
2975}
2976#[repr(C)]
2977#[derive(Debug, Copy, Clone)]
2978pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3 {
2979 pub _bitfield_align_1: [u8; 0],
2980 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
2981}
2982#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2983const _: () = {
2984 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3"]
2985 [::core::mem::size_of::<
2986 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3,
2987 >() - 2usize];
2988 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3"]
2989 [::core::mem::align_of::<
2990 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3,
2991 >() - 1usize];
2992};
2993impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3 {
2994 #[inline]
2995 pub fn rom_bank(&self) -> u8 {
2996 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u8) }
2997 }
2998 #[inline]
2999 pub fn set_rom_bank(&mut self, val: u8) {
3000 unsafe {
3001 let val: u8 = ::core::mem::transmute(val);
3002 self._bitfield_1.set(0usize, 8u8, val as u64)
3003 }
3004 }
3005 #[inline]
3006 pub unsafe fn rom_bank_raw(this: *const Self) -> u8 {
3007 unsafe {
3008 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3009 ::core::ptr::addr_of!((*this)._bitfield_1),
3010 0usize,
3011 8u8,
3012 ) as u8)
3013 }
3014 }
3015 #[inline]
3016 pub unsafe fn set_rom_bank_raw(this: *mut Self, val: u8) {
3017 unsafe {
3018 let val: u8 = ::core::mem::transmute(val);
3019 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3020 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3021 0usize,
3022 8u8,
3023 val as u64,
3024 )
3025 }
3026 }
3027 #[inline]
3028 pub fn ram_bank(&self) -> u8 {
3029 unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 3u8) as u8) }
3030 }
3031 #[inline]
3032 pub fn set_ram_bank(&mut self, val: u8) {
3033 unsafe {
3034 let val: u8 = ::core::mem::transmute(val);
3035 self._bitfield_1.set(8usize, 3u8, val as u64)
3036 }
3037 }
3038 #[inline]
3039 pub unsafe fn ram_bank_raw(this: *const Self) -> u8 {
3040 unsafe {
3041 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3042 ::core::ptr::addr_of!((*this)._bitfield_1),
3043 8usize,
3044 3u8,
3045 ) as u8)
3046 }
3047 }
3048 #[inline]
3049 pub unsafe fn set_ram_bank_raw(this: *mut Self, val: u8) {
3050 unsafe {
3051 let val: u8 = ::core::mem::transmute(val);
3052 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3053 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3054 8usize,
3055 3u8,
3056 val as u64,
3057 )
3058 }
3059 }
3060 #[inline]
3061 pub fn rtc_mapped(&self) -> bool {
3062 unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u8) }
3063 }
3064 #[inline]
3065 pub fn set_rtc_mapped(&mut self, val: bool) {
3066 unsafe {
3067 let val: u8 = ::core::mem::transmute(val);
3068 self._bitfield_1.set(11usize, 1u8, val as u64)
3069 }
3070 }
3071 #[inline]
3072 pub unsafe fn rtc_mapped_raw(this: *const Self) -> bool {
3073 unsafe {
3074 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3075 ::core::ptr::addr_of!((*this)._bitfield_1),
3076 11usize,
3077 1u8,
3078 ) as u8)
3079 }
3080 }
3081 #[inline]
3082 pub unsafe fn set_rtc_mapped_raw(this: *mut Self, val: bool) {
3083 unsafe {
3084 let val: u8 = ::core::mem::transmute(val);
3085 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3086 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3087 11usize,
3088 1u8,
3089 val as u64,
3090 )
3091 }
3092 }
3093 #[inline]
3094 pub fn new_bitfield_1(
3095 rom_bank: u8,
3096 ram_bank: u8,
3097 rtc_mapped: bool,
3098 ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
3099 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
3100 __bindgen_bitfield_unit.set(0usize, 8u8, {
3101 let rom_bank: u8 = unsafe { ::core::mem::transmute(rom_bank) };
3102 rom_bank as u64
3103 });
3104 __bindgen_bitfield_unit.set(8usize, 3u8, {
3105 let ram_bank: u8 = unsafe { ::core::mem::transmute(ram_bank) };
3106 ram_bank as u64
3107 });
3108 __bindgen_bitfield_unit.set(11usize, 1u8, {
3109 let rtc_mapped: u8 = unsafe { ::core::mem::transmute(rtc_mapped) };
3110 rtc_mapped as u64
3111 });
3112 __bindgen_bitfield_unit
3113 }
3114}
3115#[repr(C)]
3116#[derive(Debug, Copy, Clone)]
3117pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4 {
3118 pub rom_bank_low: u8,
3119 pub _bitfield_align_1: [u8; 0],
3120 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
3121}
3122#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3123const _: () = {
3124 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4"]
3125 [::core::mem::size_of::<
3126 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4,
3127 >() - 2usize];
3128 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4"]
3129 [::core::mem::align_of::<
3130 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4,
3131 >() - 1usize];
3132 [
3133 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4::rom_bank_low",
3134 ][::core::mem::offset_of!(
3135 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4,
3136 rom_bank_low
3137 ) - 0usize];
3138};
3139impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4 {
3140 #[inline]
3141 pub fn rom_bank_high(&self) -> u8 {
3142 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
3143 }
3144 #[inline]
3145 pub fn set_rom_bank_high(&mut self, val: u8) {
3146 unsafe {
3147 let val: u8 = ::core::mem::transmute(val);
3148 self._bitfield_1.set(0usize, 1u8, val as u64)
3149 }
3150 }
3151 #[inline]
3152 pub unsafe fn rom_bank_high_raw(this: *const Self) -> u8 {
3153 unsafe {
3154 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
3155 ::core::ptr::addr_of!((*this)._bitfield_1),
3156 0usize,
3157 1u8,
3158 ) as u8)
3159 }
3160 }
3161 #[inline]
3162 pub unsafe fn set_rom_bank_high_raw(this: *mut Self, val: u8) {
3163 unsafe {
3164 let val: u8 = ::core::mem::transmute(val);
3165 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
3166 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3167 0usize,
3168 1u8,
3169 val as u64,
3170 )
3171 }
3172 }
3173 #[inline]
3174 pub fn ram_bank(&self) -> u8 {
3175 unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u8) }
3176 }
3177 #[inline]
3178 pub fn set_ram_bank(&mut self, val: u8) {
3179 unsafe {
3180 let val: u8 = ::core::mem::transmute(val);
3181 self._bitfield_1.set(1usize, 4u8, val as u64)
3182 }
3183 }
3184 #[inline]
3185 pub unsafe fn ram_bank_raw(this: *const Self) -> u8 {
3186 unsafe {
3187 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
3188 ::core::ptr::addr_of!((*this)._bitfield_1),
3189 1usize,
3190 4u8,
3191 ) as u8)
3192 }
3193 }
3194 #[inline]
3195 pub unsafe fn set_ram_bank_raw(this: *mut Self, val: u8) {
3196 unsafe {
3197 let val: u8 = ::core::mem::transmute(val);
3198 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
3199 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3200 1usize,
3201 4u8,
3202 val as u64,
3203 )
3204 }
3205 }
3206 #[inline]
3207 pub fn new_bitfield_1(rom_bank_high: u8, ram_bank: u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
3208 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
3209 __bindgen_bitfield_unit.set(0usize, 1u8, {
3210 let rom_bank_high: u8 = unsafe { ::core::mem::transmute(rom_bank_high) };
3211 rom_bank_high as u64
3212 });
3213 __bindgen_bitfield_unit.set(1usize, 4u8, {
3214 let ram_bank: u8 = unsafe { ::core::mem::transmute(ram_bank) };
3215 ram_bank as u64
3216 });
3217 __bindgen_bitfield_unit
3218 }
3219}
3220#[repr(C)]
3221#[derive(Debug, Copy, Clone)]
3222pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5 {
3223 pub x_latch: u16,
3224 pub y_latch: u16,
3225 pub rom_bank: u8,
3226 pub _bitfield_align_1: [u16; 0],
3227 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
3228 pub read_bits: u16,
3229 pub _bitfield_align_2: [u8; 0],
3230 pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>,
3231 pub __bindgen_padding_0: u8,
3232}
3233#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3234const _: () = {
3235 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5"]
3236 [::core::mem::size_of::<
3237 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
3238 >() - 12usize];
3239 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5"]
3240 [::core::mem::align_of::<
3241 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
3242 >() - 2usize];
3243 [
3244 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5::x_latch",
3245 ][::core::mem::offset_of!(
3246 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
3247 x_latch
3248 ) - 0usize];
3249 [
3250 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5::y_latch",
3251 ][::core::mem::offset_of!(
3252 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
3253 y_latch
3254 ) - 2usize];
3255 [
3256 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5::rom_bank",
3257 ][::core::mem::offset_of!(
3258 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
3259 rom_bank
3260 ) - 4usize];
3261 [
3262 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5::read_bits",
3263 ][::core::mem::offset_of!(
3264 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
3265 read_bits
3266 ) - 8usize];
3267};
3268impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5 {
3269 #[inline]
3270 pub fn latch_ready(&self) -> bool {
3271 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
3272 }
3273 #[inline]
3274 pub fn set_latch_ready(&mut self, val: bool) {
3275 unsafe {
3276 let val: u8 = ::core::mem::transmute(val);
3277 self._bitfield_1.set(0usize, 1u8, val as u64)
3278 }
3279 }
3280 #[inline]
3281 pub unsafe fn latch_ready_raw(this: *const Self) -> bool {
3282 unsafe {
3283 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3284 ::core::ptr::addr_of!((*this)._bitfield_1),
3285 0usize,
3286 1u8,
3287 ) as u8)
3288 }
3289 }
3290 #[inline]
3291 pub unsafe fn set_latch_ready_raw(this: *mut Self, val: bool) {
3292 unsafe {
3293 let val: u8 = ::core::mem::transmute(val);
3294 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3295 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3296 0usize,
3297 1u8,
3298 val as u64,
3299 )
3300 }
3301 }
3302 #[inline]
3303 pub fn eeprom_do(&self) -> bool {
3304 unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
3305 }
3306 #[inline]
3307 pub fn set_eeprom_do(&mut self, val: bool) {
3308 unsafe {
3309 let val: u8 = ::core::mem::transmute(val);
3310 self._bitfield_1.set(1usize, 1u8, val as u64)
3311 }
3312 }
3313 #[inline]
3314 pub unsafe fn eeprom_do_raw(this: *const Self) -> bool {
3315 unsafe {
3316 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3317 ::core::ptr::addr_of!((*this)._bitfield_1),
3318 1usize,
3319 1u8,
3320 ) as u8)
3321 }
3322 }
3323 #[inline]
3324 pub unsafe fn set_eeprom_do_raw(this: *mut Self, val: bool) {
3325 unsafe {
3326 let val: u8 = ::core::mem::transmute(val);
3327 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3328 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3329 1usize,
3330 1u8,
3331 val as u64,
3332 )
3333 }
3334 }
3335 #[inline]
3336 pub fn eeprom_di(&self) -> bool {
3337 unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
3338 }
3339 #[inline]
3340 pub fn set_eeprom_di(&mut self, val: bool) {
3341 unsafe {
3342 let val: u8 = ::core::mem::transmute(val);
3343 self._bitfield_1.set(2usize, 1u8, val as u64)
3344 }
3345 }
3346 #[inline]
3347 pub unsafe fn eeprom_di_raw(this: *const Self) -> bool {
3348 unsafe {
3349 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3350 ::core::ptr::addr_of!((*this)._bitfield_1),
3351 2usize,
3352 1u8,
3353 ) as u8)
3354 }
3355 }
3356 #[inline]
3357 pub unsafe fn set_eeprom_di_raw(this: *mut Self, val: bool) {
3358 unsafe {
3359 let val: u8 = ::core::mem::transmute(val);
3360 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3361 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3362 2usize,
3363 1u8,
3364 val as u64,
3365 )
3366 }
3367 }
3368 #[inline]
3369 pub fn eeprom_clk(&self) -> bool {
3370 unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
3371 }
3372 #[inline]
3373 pub fn set_eeprom_clk(&mut self, val: bool) {
3374 unsafe {
3375 let val: u8 = ::core::mem::transmute(val);
3376 self._bitfield_1.set(3usize, 1u8, val as u64)
3377 }
3378 }
3379 #[inline]
3380 pub unsafe fn eeprom_clk_raw(this: *const Self) -> bool {
3381 unsafe {
3382 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3383 ::core::ptr::addr_of!((*this)._bitfield_1),
3384 3usize,
3385 1u8,
3386 ) as u8)
3387 }
3388 }
3389 #[inline]
3390 pub unsafe fn set_eeprom_clk_raw(this: *mut Self, val: bool) {
3391 unsafe {
3392 let val: u8 = ::core::mem::transmute(val);
3393 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3394 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3395 3usize,
3396 1u8,
3397 val as u64,
3398 )
3399 }
3400 }
3401 #[inline]
3402 pub fn eeprom_cs(&self) -> bool {
3403 unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
3404 }
3405 #[inline]
3406 pub fn set_eeprom_cs(&mut self, val: bool) {
3407 unsafe {
3408 let val: u8 = ::core::mem::transmute(val);
3409 self._bitfield_1.set(4usize, 1u8, val as u64)
3410 }
3411 }
3412 #[inline]
3413 pub unsafe fn eeprom_cs_raw(this: *const Self) -> bool {
3414 unsafe {
3415 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3416 ::core::ptr::addr_of!((*this)._bitfield_1),
3417 4usize,
3418 1u8,
3419 ) as u8)
3420 }
3421 }
3422 #[inline]
3423 pub unsafe fn set_eeprom_cs_raw(this: *mut Self, val: bool) {
3424 unsafe {
3425 let val: u8 = ::core::mem::transmute(val);
3426 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3427 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3428 4usize,
3429 1u8,
3430 val as u64,
3431 )
3432 }
3433 }
3434 #[inline]
3435 pub fn eeprom_command(&self) -> u16 {
3436 unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 11u8) as u16) }
3437 }
3438 #[inline]
3439 pub fn set_eeprom_command(&mut self, val: u16) {
3440 unsafe {
3441 let val: u16 = ::core::mem::transmute(val);
3442 self._bitfield_1.set(5usize, 11u8, val as u64)
3443 }
3444 }
3445 #[inline]
3446 pub unsafe fn eeprom_command_raw(this: *const Self) -> u16 {
3447 unsafe {
3448 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
3449 ::core::ptr::addr_of!((*this)._bitfield_1),
3450 5usize,
3451 11u8,
3452 ) as u16)
3453 }
3454 }
3455 #[inline]
3456 pub unsafe fn set_eeprom_command_raw(this: *mut Self, val: u16) {
3457 unsafe {
3458 let val: u16 = ::core::mem::transmute(val);
3459 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
3460 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3461 5usize,
3462 11u8,
3463 val as u64,
3464 )
3465 }
3466 }
3467 #[inline]
3468 pub fn new_bitfield_1(
3469 latch_ready: bool,
3470 eeprom_do: bool,
3471 eeprom_di: bool,
3472 eeprom_clk: bool,
3473 eeprom_cs: bool,
3474 eeprom_command: u16,
3475 ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
3476 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
3477 __bindgen_bitfield_unit.set(0usize, 1u8, {
3478 let latch_ready: u8 = unsafe { ::core::mem::transmute(latch_ready) };
3479 latch_ready as u64
3480 });
3481 __bindgen_bitfield_unit.set(1usize, 1u8, {
3482 let eeprom_do: u8 = unsafe { ::core::mem::transmute(eeprom_do) };
3483 eeprom_do as u64
3484 });
3485 __bindgen_bitfield_unit.set(2usize, 1u8, {
3486 let eeprom_di: u8 = unsafe { ::core::mem::transmute(eeprom_di) };
3487 eeprom_di as u64
3488 });
3489 __bindgen_bitfield_unit.set(3usize, 1u8, {
3490 let eeprom_clk: u8 = unsafe { ::core::mem::transmute(eeprom_clk) };
3491 eeprom_clk as u64
3492 });
3493 __bindgen_bitfield_unit.set(4usize, 1u8, {
3494 let eeprom_cs: u8 = unsafe { ::core::mem::transmute(eeprom_cs) };
3495 eeprom_cs as u64
3496 });
3497 __bindgen_bitfield_unit.set(5usize, 11u8, {
3498 let eeprom_command: u16 = unsafe { ::core::mem::transmute(eeprom_command) };
3499 eeprom_command as u64
3500 });
3501 __bindgen_bitfield_unit
3502 }
3503 #[inline]
3504 pub fn argument_bits_left(&self) -> u8 {
3505 unsafe { ::core::mem::transmute(self._bitfield_2.get(0usize, 5u8) as u8) }
3506 }
3507 #[inline]
3508 pub fn set_argument_bits_left(&mut self, val: u8) {
3509 unsafe {
3510 let val: u8 = ::core::mem::transmute(val);
3511 self._bitfield_2.set(0usize, 5u8, val as u64)
3512 }
3513 }
3514 #[inline]
3515 pub unsafe fn argument_bits_left_raw(this: *const Self) -> u8 {
3516 unsafe {
3517 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
3518 ::core::ptr::addr_of!((*this)._bitfield_2),
3519 0usize,
3520 5u8,
3521 ) as u8)
3522 }
3523 }
3524 #[inline]
3525 pub unsafe fn set_argument_bits_left_raw(this: *mut Self, val: u8) {
3526 unsafe {
3527 let val: u8 = ::core::mem::transmute(val);
3528 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
3529 ::core::ptr::addr_of_mut!((*this)._bitfield_2),
3530 0usize,
3531 5u8,
3532 val as u64,
3533 )
3534 }
3535 }
3536 #[inline]
3537 pub fn secondary_ram_enable(&self) -> bool {
3538 unsafe { ::core::mem::transmute(self._bitfield_2.get(5usize, 1u8) as u8) }
3539 }
3540 #[inline]
3541 pub fn set_secondary_ram_enable(&mut self, val: bool) {
3542 unsafe {
3543 let val: u8 = ::core::mem::transmute(val);
3544 self._bitfield_2.set(5usize, 1u8, val as u64)
3545 }
3546 }
3547 #[inline]
3548 pub unsafe fn secondary_ram_enable_raw(this: *const Self) -> bool {
3549 unsafe {
3550 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
3551 ::core::ptr::addr_of!((*this)._bitfield_2),
3552 5usize,
3553 1u8,
3554 ) as u8)
3555 }
3556 }
3557 #[inline]
3558 pub unsafe fn set_secondary_ram_enable_raw(this: *mut Self, val: bool) {
3559 unsafe {
3560 let val: u8 = ::core::mem::transmute(val);
3561 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
3562 ::core::ptr::addr_of_mut!((*this)._bitfield_2),
3563 5usize,
3564 1u8,
3565 val as u64,
3566 )
3567 }
3568 }
3569 #[inline]
3570 pub fn eeprom_write_enabled(&self) -> bool {
3571 unsafe { ::core::mem::transmute(self._bitfield_2.get(6usize, 1u8) as u8) }
3572 }
3573 #[inline]
3574 pub fn set_eeprom_write_enabled(&mut self, val: bool) {
3575 unsafe {
3576 let val: u8 = ::core::mem::transmute(val);
3577 self._bitfield_2.set(6usize, 1u8, val as u64)
3578 }
3579 }
3580 #[inline]
3581 pub unsafe fn eeprom_write_enabled_raw(this: *const Self) -> bool {
3582 unsafe {
3583 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
3584 ::core::ptr::addr_of!((*this)._bitfield_2),
3585 6usize,
3586 1u8,
3587 ) as u8)
3588 }
3589 }
3590 #[inline]
3591 pub unsafe fn set_eeprom_write_enabled_raw(this: *mut Self, val: bool) {
3592 unsafe {
3593 let val: u8 = ::core::mem::transmute(val);
3594 <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
3595 ::core::ptr::addr_of_mut!((*this)._bitfield_2),
3596 6usize,
3597 1u8,
3598 val as u64,
3599 )
3600 }
3601 }
3602 #[inline]
3603 pub fn new_bitfield_2(
3604 argument_bits_left: u8,
3605 secondary_ram_enable: bool,
3606 eeprom_write_enabled: bool,
3607 ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
3608 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
3609 __bindgen_bitfield_unit.set(0usize, 5u8, {
3610 let argument_bits_left: u8 = unsafe { ::core::mem::transmute(argument_bits_left) };
3611 argument_bits_left as u64
3612 });
3613 __bindgen_bitfield_unit.set(5usize, 1u8, {
3614 let secondary_ram_enable: u8 = unsafe { ::core::mem::transmute(secondary_ram_enable) };
3615 secondary_ram_enable as u64
3616 });
3617 __bindgen_bitfield_unit.set(6usize, 1u8, {
3618 let eeprom_write_enabled: u8 = unsafe { ::core::mem::transmute(eeprom_write_enabled) };
3619 eeprom_write_enabled as u64
3620 });
3621 __bindgen_bitfield_unit
3622 }
3623}
3624#[repr(C)]
3625#[derive(Debug, Copy, Clone)]
3626pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6 {
3627 pub _bitfield_align_1: [u8; 0],
3628 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
3629}
3630#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3631const _: () = {
3632 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6"]
3633 [::core::mem::size_of::<
3634 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6,
3635 >() - 3usize];
3636 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6"]
3637 [::core::mem::align_of::<
3638 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6,
3639 >() - 1usize];
3640};
3641impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6 {
3642 #[inline]
3643 pub fn rom_bank_low(&self) -> u8 {
3644 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u8) }
3645 }
3646 #[inline]
3647 pub fn set_rom_bank_low(&mut self, val: u8) {
3648 unsafe {
3649 let val: u8 = ::core::mem::transmute(val);
3650 self._bitfield_1.set(0usize, 5u8, val as u64)
3651 }
3652 }
3653 #[inline]
3654 pub unsafe fn rom_bank_low_raw(this: *const Self) -> u8 {
3655 unsafe {
3656 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3657 ::core::ptr::addr_of!((*this)._bitfield_1),
3658 0usize,
3659 5u8,
3660 ) as u8)
3661 }
3662 }
3663 #[inline]
3664 pub unsafe fn set_rom_bank_low_raw(this: *mut Self, val: u8) {
3665 unsafe {
3666 let val: u8 = ::core::mem::transmute(val);
3667 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3668 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3669 0usize,
3670 5u8,
3671 val as u64,
3672 )
3673 }
3674 }
3675 #[inline]
3676 pub fn rom_bank_mid(&self) -> u8 {
3677 unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u8) }
3678 }
3679 #[inline]
3680 pub fn set_rom_bank_mid(&mut self, val: u8) {
3681 unsafe {
3682 let val: u8 = ::core::mem::transmute(val);
3683 self._bitfield_1.set(5usize, 2u8, val as u64)
3684 }
3685 }
3686 #[inline]
3687 pub unsafe fn rom_bank_mid_raw(this: *const Self) -> u8 {
3688 unsafe {
3689 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3690 ::core::ptr::addr_of!((*this)._bitfield_1),
3691 5usize,
3692 2u8,
3693 ) as u8)
3694 }
3695 }
3696 #[inline]
3697 pub unsafe fn set_rom_bank_mid_raw(this: *mut Self, val: u8) {
3698 unsafe {
3699 let val: u8 = ::core::mem::transmute(val);
3700 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3701 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3702 5usize,
3703 2u8,
3704 val as u64,
3705 )
3706 }
3707 }
3708 #[inline]
3709 pub fn mbc1_mode(&self) -> bool {
3710 unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
3711 }
3712 #[inline]
3713 pub fn set_mbc1_mode(&mut self, val: bool) {
3714 unsafe {
3715 let val: u8 = ::core::mem::transmute(val);
3716 self._bitfield_1.set(7usize, 1u8, val as u64)
3717 }
3718 }
3719 #[inline]
3720 pub unsafe fn mbc1_mode_raw(this: *const Self) -> bool {
3721 unsafe {
3722 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3723 ::core::ptr::addr_of!((*this)._bitfield_1),
3724 7usize,
3725 1u8,
3726 ) as u8)
3727 }
3728 }
3729 #[inline]
3730 pub unsafe fn set_mbc1_mode_raw(this: *mut Self, val: bool) {
3731 unsafe {
3732 let val: u8 = ::core::mem::transmute(val);
3733 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3734 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3735 7usize,
3736 1u8,
3737 val as u64,
3738 )
3739 }
3740 }
3741 #[inline]
3742 pub fn rom_bank_mask(&self) -> u8 {
3743 unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u8) }
3744 }
3745 #[inline]
3746 pub fn set_rom_bank_mask(&mut self, val: u8) {
3747 unsafe {
3748 let val: u8 = ::core::mem::transmute(val);
3749 self._bitfield_1.set(8usize, 4u8, val as u64)
3750 }
3751 }
3752 #[inline]
3753 pub unsafe fn rom_bank_mask_raw(this: *const Self) -> u8 {
3754 unsafe {
3755 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3756 ::core::ptr::addr_of!((*this)._bitfield_1),
3757 8usize,
3758 4u8,
3759 ) as u8)
3760 }
3761 }
3762 #[inline]
3763 pub unsafe fn set_rom_bank_mask_raw(this: *mut Self, val: u8) {
3764 unsafe {
3765 let val: u8 = ::core::mem::transmute(val);
3766 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3767 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3768 8usize,
3769 4u8,
3770 val as u64,
3771 )
3772 }
3773 }
3774 #[inline]
3775 pub fn rom_bank_high(&self) -> u8 {
3776 unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u8) }
3777 }
3778 #[inline]
3779 pub fn set_rom_bank_high(&mut self, val: u8) {
3780 unsafe {
3781 let val: u8 = ::core::mem::transmute(val);
3782 self._bitfield_1.set(12usize, 2u8, val as u64)
3783 }
3784 }
3785 #[inline]
3786 pub unsafe fn rom_bank_high_raw(this: *const Self) -> u8 {
3787 unsafe {
3788 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3789 ::core::ptr::addr_of!((*this)._bitfield_1),
3790 12usize,
3791 2u8,
3792 ) as u8)
3793 }
3794 }
3795 #[inline]
3796 pub unsafe fn set_rom_bank_high_raw(this: *mut Self, val: u8) {
3797 unsafe {
3798 let val: u8 = ::core::mem::transmute(val);
3799 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3800 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3801 12usize,
3802 2u8,
3803 val as u64,
3804 )
3805 }
3806 }
3807 #[inline]
3808 pub fn ram_bank_low(&self) -> u8 {
3809 unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u8) }
3810 }
3811 #[inline]
3812 pub fn set_ram_bank_low(&mut self, val: u8) {
3813 unsafe {
3814 let val: u8 = ::core::mem::transmute(val);
3815 self._bitfield_1.set(14usize, 2u8, val as u64)
3816 }
3817 }
3818 #[inline]
3819 pub unsafe fn ram_bank_low_raw(this: *const Self) -> u8 {
3820 unsafe {
3821 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3822 ::core::ptr::addr_of!((*this)._bitfield_1),
3823 14usize,
3824 2u8,
3825 ) as u8)
3826 }
3827 }
3828 #[inline]
3829 pub unsafe fn set_ram_bank_low_raw(this: *mut Self, val: u8) {
3830 unsafe {
3831 let val: u8 = ::core::mem::transmute(val);
3832 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3833 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3834 14usize,
3835 2u8,
3836 val as u64,
3837 )
3838 }
3839 }
3840 #[inline]
3841 pub fn ram_bank_high(&self) -> u8 {
3842 unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u8) }
3843 }
3844 #[inline]
3845 pub fn set_ram_bank_high(&mut self, val: u8) {
3846 unsafe {
3847 let val: u8 = ::core::mem::transmute(val);
3848 self._bitfield_1.set(16usize, 2u8, val as u64)
3849 }
3850 }
3851 #[inline]
3852 pub unsafe fn ram_bank_high_raw(this: *const Self) -> u8 {
3853 unsafe {
3854 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3855 ::core::ptr::addr_of!((*this)._bitfield_1),
3856 16usize,
3857 2u8,
3858 ) as u8)
3859 }
3860 }
3861 #[inline]
3862 pub unsafe fn set_ram_bank_high_raw(this: *mut Self, val: u8) {
3863 unsafe {
3864 let val: u8 = ::core::mem::transmute(val);
3865 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3866 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3867 16usize,
3868 2u8,
3869 val as u64,
3870 )
3871 }
3872 }
3873 #[inline]
3874 pub fn ram_bank_mask(&self) -> u8 {
3875 unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u8) }
3876 }
3877 #[inline]
3878 pub fn set_ram_bank_mask(&mut self, val: u8) {
3879 unsafe {
3880 let val: u8 = ::core::mem::transmute(val);
3881 self._bitfield_1.set(18usize, 2u8, val as u64)
3882 }
3883 }
3884 #[inline]
3885 pub unsafe fn ram_bank_mask_raw(this: *const Self) -> u8 {
3886 unsafe {
3887 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3888 ::core::ptr::addr_of!((*this)._bitfield_1),
3889 18usize,
3890 2u8,
3891 ) as u8)
3892 }
3893 }
3894 #[inline]
3895 pub unsafe fn set_ram_bank_mask_raw(this: *mut Self, val: u8) {
3896 unsafe {
3897 let val: u8 = ::core::mem::transmute(val);
3898 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3899 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3900 18usize,
3901 2u8,
3902 val as u64,
3903 )
3904 }
3905 }
3906 #[inline]
3907 pub fn locked(&self) -> bool {
3908 unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u8) }
3909 }
3910 #[inline]
3911 pub fn set_locked(&mut self, val: bool) {
3912 unsafe {
3913 let val: u8 = ::core::mem::transmute(val);
3914 self._bitfield_1.set(20usize, 1u8, val as u64)
3915 }
3916 }
3917 #[inline]
3918 pub unsafe fn locked_raw(this: *const Self) -> bool {
3919 unsafe {
3920 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3921 ::core::ptr::addr_of!((*this)._bitfield_1),
3922 20usize,
3923 1u8,
3924 ) as u8)
3925 }
3926 }
3927 #[inline]
3928 pub unsafe fn set_locked_raw(this: *mut Self, val: bool) {
3929 unsafe {
3930 let val: u8 = ::core::mem::transmute(val);
3931 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3932 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3933 20usize,
3934 1u8,
3935 val as u64,
3936 )
3937 }
3938 }
3939 #[inline]
3940 pub fn mbc1_mode_disable(&self) -> bool {
3941 unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u8) }
3942 }
3943 #[inline]
3944 pub fn set_mbc1_mode_disable(&mut self, val: bool) {
3945 unsafe {
3946 let val: u8 = ::core::mem::transmute(val);
3947 self._bitfield_1.set(21usize, 1u8, val as u64)
3948 }
3949 }
3950 #[inline]
3951 pub unsafe fn mbc1_mode_disable_raw(this: *const Self) -> bool {
3952 unsafe {
3953 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3954 ::core::ptr::addr_of!((*this)._bitfield_1),
3955 21usize,
3956 1u8,
3957 ) as u8)
3958 }
3959 }
3960 #[inline]
3961 pub unsafe fn set_mbc1_mode_disable_raw(this: *mut Self, val: bool) {
3962 unsafe {
3963 let val: u8 = ::core::mem::transmute(val);
3964 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3965 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3966 21usize,
3967 1u8,
3968 val as u64,
3969 )
3970 }
3971 }
3972 #[inline]
3973 pub fn multiplex_mode(&self) -> bool {
3974 unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u8) }
3975 }
3976 #[inline]
3977 pub fn set_multiplex_mode(&mut self, val: bool) {
3978 unsafe {
3979 let val: u8 = ::core::mem::transmute(val);
3980 self._bitfield_1.set(22usize, 1u8, val as u64)
3981 }
3982 }
3983 #[inline]
3984 pub unsafe fn multiplex_mode_raw(this: *const Self) -> bool {
3985 unsafe {
3986 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
3987 ::core::ptr::addr_of!((*this)._bitfield_1),
3988 22usize,
3989 1u8,
3990 ) as u8)
3991 }
3992 }
3993 #[inline]
3994 pub unsafe fn set_multiplex_mode_raw(this: *mut Self, val: bool) {
3995 unsafe {
3996 let val: u8 = ::core::mem::transmute(val);
3997 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
3998 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
3999 22usize,
4000 1u8,
4001 val as u64,
4002 )
4003 }
4004 }
4005 #[inline]
4006 pub fn new_bitfield_1(
4007 rom_bank_low: u8,
4008 rom_bank_mid: u8,
4009 mbc1_mode: bool,
4010 rom_bank_mask: u8,
4011 rom_bank_high: u8,
4012 ram_bank_low: u8,
4013 ram_bank_high: u8,
4014 ram_bank_mask: u8,
4015 locked: bool,
4016 mbc1_mode_disable: bool,
4017 multiplex_mode: bool,
4018 ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
4019 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
4020 __bindgen_bitfield_unit.set(0usize, 5u8, {
4021 let rom_bank_low: u8 = unsafe { ::core::mem::transmute(rom_bank_low) };
4022 rom_bank_low as u64
4023 });
4024 __bindgen_bitfield_unit.set(5usize, 2u8, {
4025 let rom_bank_mid: u8 = unsafe { ::core::mem::transmute(rom_bank_mid) };
4026 rom_bank_mid as u64
4027 });
4028 __bindgen_bitfield_unit.set(7usize, 1u8, {
4029 let mbc1_mode: u8 = unsafe { ::core::mem::transmute(mbc1_mode) };
4030 mbc1_mode as u64
4031 });
4032 __bindgen_bitfield_unit.set(8usize, 4u8, {
4033 let rom_bank_mask: u8 = unsafe { ::core::mem::transmute(rom_bank_mask) };
4034 rom_bank_mask as u64
4035 });
4036 __bindgen_bitfield_unit.set(12usize, 2u8, {
4037 let rom_bank_high: u8 = unsafe { ::core::mem::transmute(rom_bank_high) };
4038 rom_bank_high as u64
4039 });
4040 __bindgen_bitfield_unit.set(14usize, 2u8, {
4041 let ram_bank_low: u8 = unsafe { ::core::mem::transmute(ram_bank_low) };
4042 ram_bank_low as u64
4043 });
4044 __bindgen_bitfield_unit.set(16usize, 2u8, {
4045 let ram_bank_high: u8 = unsafe { ::core::mem::transmute(ram_bank_high) };
4046 ram_bank_high as u64
4047 });
4048 __bindgen_bitfield_unit.set(18usize, 2u8, {
4049 let ram_bank_mask: u8 = unsafe { ::core::mem::transmute(ram_bank_mask) };
4050 ram_bank_mask as u64
4051 });
4052 __bindgen_bitfield_unit.set(20usize, 1u8, {
4053 let locked: u8 = unsafe { ::core::mem::transmute(locked) };
4054 locked as u64
4055 });
4056 __bindgen_bitfield_unit.set(21usize, 1u8, {
4057 let mbc1_mode_disable: u8 = unsafe { ::core::mem::transmute(mbc1_mode_disable) };
4058 mbc1_mode_disable as u64
4059 });
4060 __bindgen_bitfield_unit.set(22usize, 1u8, {
4061 let multiplex_mode: u8 = unsafe { ::core::mem::transmute(multiplex_mode) };
4062 multiplex_mode as u64
4063 });
4064 __bindgen_bitfield_unit
4065 }
4066}
4067#[repr(C)]
4068#[derive(Debug, Copy, Clone)]
4069pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7 {
4070 pub _bitfield_align_1: [u8; 0],
4071 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
4072}
4073#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4074const _: () = {
4075 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7"]
4076 [::core::mem::size_of::<
4077 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7,
4078 >() - 2usize];
4079 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7"]
4080 [::core::mem::align_of::<
4081 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7,
4082 >() - 1usize];
4083};
4084impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7 {
4085 #[inline]
4086 pub fn bank_low(&self) -> u8 {
4087 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u8) }
4088 }
4089 #[inline]
4090 pub fn set_bank_low(&mut self, val: u8) {
4091 unsafe {
4092 let val: u8 = ::core::mem::transmute(val);
4093 self._bitfield_1.set(0usize, 6u8, val as u64)
4094 }
4095 }
4096 #[inline]
4097 pub unsafe fn bank_low_raw(this: *const Self) -> u8 {
4098 unsafe {
4099 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
4100 ::core::ptr::addr_of!((*this)._bitfield_1),
4101 0usize,
4102 6u8,
4103 ) as u8)
4104 }
4105 }
4106 #[inline]
4107 pub unsafe fn set_bank_low_raw(this: *mut Self, val: u8) {
4108 unsafe {
4109 let val: u8 = ::core::mem::transmute(val);
4110 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
4111 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
4112 0usize,
4113 6u8,
4114 val as u64,
4115 )
4116 }
4117 }
4118 #[inline]
4119 pub fn bank_high(&self) -> u8 {
4120 unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 3u8) as u8) }
4121 }
4122 #[inline]
4123 pub fn set_bank_high(&mut self, val: u8) {
4124 unsafe {
4125 let val: u8 = ::core::mem::transmute(val);
4126 self._bitfield_1.set(8usize, 3u8, val as u64)
4127 }
4128 }
4129 #[inline]
4130 pub unsafe fn bank_high_raw(this: *const Self) -> u8 {
4131 unsafe {
4132 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
4133 ::core::ptr::addr_of!((*this)._bitfield_1),
4134 8usize,
4135 3u8,
4136 ) as u8)
4137 }
4138 }
4139 #[inline]
4140 pub unsafe fn set_bank_high_raw(this: *mut Self, val: u8) {
4141 unsafe {
4142 let val: u8 = ::core::mem::transmute(val);
4143 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
4144 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
4145 8usize,
4146 3u8,
4147 val as u64,
4148 )
4149 }
4150 }
4151 #[inline]
4152 pub fn ir_mode(&self) -> bool {
4153 unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u8) }
4154 }
4155 #[inline]
4156 pub fn set_ir_mode(&mut self, val: bool) {
4157 unsafe {
4158 let val: u8 = ::core::mem::transmute(val);
4159 self._bitfield_1.set(11usize, 1u8, val as u64)
4160 }
4161 }
4162 #[inline]
4163 pub unsafe fn ir_mode_raw(this: *const Self) -> bool {
4164 unsafe {
4165 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
4166 ::core::ptr::addr_of!((*this)._bitfield_1),
4167 11usize,
4168 1u8,
4169 ) as u8)
4170 }
4171 }
4172 #[inline]
4173 pub unsafe fn set_ir_mode_raw(this: *mut Self, val: bool) {
4174 unsafe {
4175 let val: u8 = ::core::mem::transmute(val);
4176 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
4177 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
4178 11usize,
4179 1u8,
4180 val as u64,
4181 )
4182 }
4183 }
4184 #[inline]
4185 pub fn new_bitfield_1(
4186 bank_low: u8,
4187 bank_high: u8,
4188 ir_mode: bool,
4189 ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
4190 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
4191 __bindgen_bitfield_unit.set(0usize, 6u8, {
4192 let bank_low: u8 = unsafe { ::core::mem::transmute(bank_low) };
4193 bank_low as u64
4194 });
4195 __bindgen_bitfield_unit.set(8usize, 3u8, {
4196 let bank_high: u8 = unsafe { ::core::mem::transmute(bank_high) };
4197 bank_high as u64
4198 });
4199 __bindgen_bitfield_unit.set(11usize, 1u8, {
4200 let ir_mode: u8 = unsafe { ::core::mem::transmute(ir_mode) };
4201 ir_mode as u64
4202 });
4203 __bindgen_bitfield_unit
4204 }
4205}
4206#[repr(C)]
4207#[derive(Debug, Copy, Clone)]
4208pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8 {
4209 pub _bitfield_align_1: [u8; 0],
4210 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
4211 pub minutes: u16,
4212 pub days: u16,
4213 pub alarm_minutes: u16,
4214 pub alarm_days: u16,
4215 pub access_index: u8,
4216 pub alarm_enabled: bool,
4217 pub read: u8,
4218 pub access_flags: u8,
4219}
4220#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4221const _: () = {
4222 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8"]
4223 [::core::mem::size_of::<
4224 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4225 >() - 14usize];
4226 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8"]
4227 [::core::mem::align_of::<
4228 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4229 >() - 2usize];
4230 [
4231 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::minutes",
4232 ][::core::mem::offset_of!(
4233 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4234 minutes
4235 ) - 2usize];
4236 [
4237 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::days",
4238 ][::core::mem::offset_of!(
4239 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4240 days
4241 ) - 4usize];
4242 [
4243 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::alarm_minutes",
4244 ][::core::mem::offset_of!(
4245 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4246 alarm_minutes
4247 ) - 6usize];
4248 [
4249 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::alarm_days",
4250 ][::core::mem::offset_of!(
4251 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4252 alarm_days
4253 ) - 8usize];
4254 [
4255 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::access_index",
4256 ][::core::mem::offset_of!(
4257 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4258 access_index
4259 ) - 10usize];
4260 [
4261 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::alarm_enabled",
4262 ][::core::mem::offset_of!(
4263 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4264 alarm_enabled
4265 ) - 11usize];
4266 [
4267 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::read",
4268 ][::core::mem::offset_of!(
4269 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4270 read
4271 ) - 12usize];
4272 [
4273 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8::access_flags",
4274 ][::core::mem::offset_of!(
4275 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
4276 access_flags
4277 ) - 13usize];
4278};
4279impl GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8 {
4280 #[inline]
4281 pub fn rom_bank(&self) -> u8 {
4282 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u8) }
4283 }
4284 #[inline]
4285 pub fn set_rom_bank(&mut self, val: u8) {
4286 unsafe {
4287 let val: u8 = ::core::mem::transmute(val);
4288 self._bitfield_1.set(0usize, 7u8, val as u64)
4289 }
4290 }
4291 #[inline]
4292 pub unsafe fn rom_bank_raw(this: *const Self) -> u8 {
4293 unsafe {
4294 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
4295 ::core::ptr::addr_of!((*this)._bitfield_1),
4296 0usize,
4297 7u8,
4298 ) as u8)
4299 }
4300 }
4301 #[inline]
4302 pub unsafe fn set_rom_bank_raw(this: *mut Self, val: u8) {
4303 unsafe {
4304 let val: u8 = ::core::mem::transmute(val);
4305 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
4306 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
4307 0usize,
4308 7u8,
4309 val as u64,
4310 )
4311 }
4312 }
4313 #[inline]
4314 pub fn padding(&self) -> u8 {
4315 unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
4316 }
4317 #[inline]
4318 pub fn set_padding(&mut self, val: u8) {
4319 unsafe {
4320 let val: u8 = ::core::mem::transmute(val);
4321 self._bitfield_1.set(7usize, 1u8, val as u64)
4322 }
4323 }
4324 #[inline]
4325 pub unsafe fn padding_raw(this: *const Self) -> u8 {
4326 unsafe {
4327 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
4328 ::core::ptr::addr_of!((*this)._bitfield_1),
4329 7usize,
4330 1u8,
4331 ) as u8)
4332 }
4333 }
4334 #[inline]
4335 pub unsafe fn set_padding_raw(this: *mut Self, val: u8) {
4336 unsafe {
4337 let val: u8 = ::core::mem::transmute(val);
4338 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
4339 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
4340 7usize,
4341 1u8,
4342 val as u64,
4343 )
4344 }
4345 }
4346 #[inline]
4347 pub fn ram_bank(&self) -> u8 {
4348 unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u8) }
4349 }
4350 #[inline]
4351 pub fn set_ram_bank(&mut self, val: u8) {
4352 unsafe {
4353 let val: u8 = ::core::mem::transmute(val);
4354 self._bitfield_1.set(8usize, 4u8, val as u64)
4355 }
4356 }
4357 #[inline]
4358 pub unsafe fn ram_bank_raw(this: *const Self) -> u8 {
4359 unsafe {
4360 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
4361 ::core::ptr::addr_of!((*this)._bitfield_1),
4362 8usize,
4363 4u8,
4364 ) as u8)
4365 }
4366 }
4367 #[inline]
4368 pub unsafe fn set_ram_bank_raw(this: *mut Self, val: u8) {
4369 unsafe {
4370 let val: u8 = ::core::mem::transmute(val);
4371 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
4372 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
4373 8usize,
4374 4u8,
4375 val as u64,
4376 )
4377 }
4378 }
4379 #[inline]
4380 pub fn mode(&self) -> u8 {
4381 unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u8) }
4382 }
4383 #[inline]
4384 pub fn set_mode(&mut self, val: u8) {
4385 unsafe {
4386 let val: u8 = ::core::mem::transmute(val);
4387 self._bitfield_1.set(12usize, 4u8, val as u64)
4388 }
4389 }
4390 #[inline]
4391 pub unsafe fn mode_raw(this: *const Self) -> u8 {
4392 unsafe {
4393 ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
4394 ::core::ptr::addr_of!((*this)._bitfield_1),
4395 12usize,
4396 4u8,
4397 ) as u8)
4398 }
4399 }
4400 #[inline]
4401 pub unsafe fn set_mode_raw(this: *mut Self, val: u8) {
4402 unsafe {
4403 let val: u8 = ::core::mem::transmute(val);
4404 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
4405 ::core::ptr::addr_of_mut!((*this)._bitfield_1),
4406 12usize,
4407 4u8,
4408 val as u64,
4409 )
4410 }
4411 }
4412 #[inline]
4413 pub fn new_bitfield_1(
4414 rom_bank: u8,
4415 padding: u8,
4416 ram_bank: u8,
4417 mode: u8,
4418 ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
4419 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
4420 __bindgen_bitfield_unit.set(0usize, 7u8, {
4421 let rom_bank: u8 = unsafe { ::core::mem::transmute(rom_bank) };
4422 rom_bank as u64
4423 });
4424 __bindgen_bitfield_unit.set(7usize, 1u8, {
4425 let padding: u8 = unsafe { ::core::mem::transmute(padding) };
4426 padding as u64
4427 });
4428 __bindgen_bitfield_unit.set(8usize, 4u8, {
4429 let ram_bank: u8 = unsafe { ::core::mem::transmute(ram_bank) };
4430 ram_bank as u64
4431 });
4432 __bindgen_bitfield_unit.set(12usize, 4u8, {
4433 let mode: u8 = unsafe { ::core::mem::transmute(mode) };
4434 mode as u64
4435 });
4436 __bindgen_bitfield_unit
4437 }
4438}
4439#[repr(C)]
4440#[derive(Debug, Copy, Clone)]
4441pub struct GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9 {
4442 pub rom_bank: u16,
4443 pub ram_bank: u8,
4444 pub mode: u8,
4445}
4446#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4447const _: () = {
4448 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9"]
4449 [::core::mem::size_of::<
4450 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9,
4451 >() - 4usize];
4452 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9"]
4453 [::core::mem::align_of::<
4454 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9,
4455 >() - 2usize];
4456 [
4457 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9::rom_bank",
4458 ][::core::mem::offset_of!(
4459 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9,
4460 rom_bank
4461 ) - 0usize];
4462 [
4463 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9::ram_bank",
4464 ][::core::mem::offset_of!(
4465 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9,
4466 ram_bank
4467 ) - 2usize];
4468 [
4469 "Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9::mode",
4470 ][::core::mem::offset_of!(
4471 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_9,
4472 mode
4473 ) - 3usize];
4474};
4475#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4476const _: () = {
4477 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1"][::core::mem::size_of::<
4478 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4479 >() - 14usize];
4480 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1"]
4481 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1>(
4482 ) - 2usize];
4483 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::mbc1"][::core::mem::offset_of!(
4484 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4485 mbc1
4486 )
4487 - 0usize];
4488 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::mbc2"][::core::mem::offset_of!(
4489 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4490 mbc2
4491 )
4492 - 0usize];
4493 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::mbc3"][::core::mem::offset_of!(
4494 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4495 mbc3
4496 )
4497 - 0usize];
4498 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::mbc5"][::core::mem::offset_of!(
4499 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4500 mbc5
4501 )
4502 - 0usize];
4503 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::mbc7"][::core::mem::offset_of!(
4504 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4505 mbc7
4506 )
4507 - 0usize];
4508 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::mmm01"][::core::mem::offset_of!(
4509 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4510 mmm01
4511 )
4512 - 0usize];
4513 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::huc1"][::core::mem::offset_of!(
4514 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4515 huc1
4516 )
4517 - 0usize];
4518 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::huc3"][::core::mem::offset_of!(
4519 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4520 huc3
4521 )
4522 - 0usize];
4523 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::tpp1"][::core::mem::offset_of!(
4524 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
4525 tpp1
4526 )
4527 - 0usize];
4528};
4529#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4530const _: () = {
4531 ["Size of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1"]
4532 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1>() - 92usize];
4533 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1"]
4534 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1>() - 4usize];
4535 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::mbc_rom_bank"][::core::mem::offset_of!(
4536 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4537 mbc_rom_bank
4538 )
4539 - 0usize];
4540 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::mbc_rom0_bank"][::core::mem::offset_of!(
4541 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4542 mbc_rom0_bank
4543 )
4544 - 2usize];
4545 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::mbc_ram_bank"][::core::mem::offset_of!(
4546 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4547 mbc_ram_bank
4548 )
4549 - 4usize];
4550 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::mbc_ram_size"][::core::mem::offset_of!(
4551 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4552 mbc_ram_size
4553 )
4554 - 8usize];
4555 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::mbc_ram_enable"][::core::mem::offset_of!(
4556 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4557 mbc_ram_enable
4558 )
4559 - 12usize];
4560 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::rumble_strength"][::core::mem::offset_of!(
4561 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4562 rumble_strength
4563 )
4564 - 28usize];
4565 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::cart_ir"][::core::mem::offset_of!(
4566 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4567 cart_ir
4568 ) - 29usize];
4569 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::camera_registers_mapped"]
4570 [::core::mem::offset_of!(
4571 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4572 camera_registers_mapped
4573 ) - 30usize];
4574 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::camera_registers"][::core::mem::offset_of!(
4575 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4576 camera_registers
4577 )
4578 - 31usize];
4579 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::camera_alignment"][::core::mem::offset_of!(
4580 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4581 camera_alignment
4582 )
4583 - 85usize];
4584 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1::camera_countdown"][::core::mem::offset_of!(
4585 GB_gameboy_internal_s__bindgen_ty_4__bindgen_ty_1,
4586 camera_countdown
4587 )
4588 - 88usize];
4589};
4590#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4591const _: () = {
4592 ["Size of GB_gameboy_internal_s__bindgen_ty_4"]
4593 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_4>() - 96usize];
4594 ["Alignment of GB_gameboy_internal_s__bindgen_ty_4"]
4595 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_4>() - 8usize];
4596 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_4::mbc_section_start"]
4597 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_4, mbc_section_start) - 0usize];
4598};
4599#[repr(C)]
4600#[repr(align(8))]
4601#[derive(Copy, Clone)]
4602pub union GB_gameboy_internal_s__bindgen_ty_5 {
4603 pub hram_section_start: u8,
4604 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1,
4605}
4606#[repr(C)]
4607#[derive(Debug, Copy, Clone)]
4608pub struct GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1 {
4609 pub hram: [u8; 127usize],
4610 pub io_registers: [u8; 128usize],
4611}
4612#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4613const _: () = {
4614 ["Size of GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1"]
4615 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1>() - 255usize];
4616 ["Alignment of GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1"]
4617 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1>() - 1usize];
4618 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1::hram"]
4619 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1, hram) - 0usize];
4620 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1::io_registers"][::core::mem::offset_of!(
4621 GB_gameboy_internal_s__bindgen_ty_5__bindgen_ty_1,
4622 io_registers
4623 )
4624 - 127usize];
4625};
4626#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4627const _: () = {
4628 ["Size of GB_gameboy_internal_s__bindgen_ty_5"]
4629 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_5>() - 256usize];
4630 ["Alignment of GB_gameboy_internal_s__bindgen_ty_5"]
4631 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_5>() - 8usize];
4632 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_5::hram_section_start"]
4633 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_5, hram_section_start) - 0usize];
4634};
4635#[repr(C)]
4636#[repr(align(8))]
4637#[derive(Copy, Clone)]
4638pub union GB_gameboy_internal_s__bindgen_ty_6 {
4639 pub timing_section_start: u8,
4640 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4641}
4642#[repr(C)]
4643#[derive(Debug, Copy, Clone)]
4644pub struct GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1 {
4645 pub display_cycles: i32,
4646 pub display_state: i32,
4647 pub div_cycles: i32,
4648 pub div_state: i32,
4649 pub div_counter: u16,
4650 pub tima_reload_state: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1,
4651 pub serial_master_clock: bool,
4652 pub serial_mask: u8,
4653 pub double_speed_alignment: u8,
4654 pub serial_count: u8,
4655 pub speed_switch_halt_countdown: i32,
4656 pub speed_switch_countdown: u8,
4657 pub speed_switch_freeze: u8,
4658 pub cycles_since_vblank_callback: u32,
4659 pub lcd_disabled_outside_of_vblank: bool,
4660 pub allowed_pending_cycles: i32,
4661 pub mode3_batching_length: u16,
4662 pub joyp_switching_delay: u8,
4663 pub joyp_switch_value: u8,
4664 pub key_bounce_timing: [u16; 8usize],
4665}
4666pub const GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1_GB_TIMA_RUNNING:
4667 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 = 0;
4668pub const GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1_GB_TIMA_RELOADING:
4669 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 = 1;
4670pub const GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1_GB_TIMA_RELOADED:
4671 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 = 2;
4672pub type GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 = u8;
4673#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4674const _: () = {
4675 ["Size of GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1"]
4676 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1>() - 64usize];
4677 ["Alignment of GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1"]
4678 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1>() - 4usize];
4679 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::display_cycles"][::core::mem::offset_of!(
4680 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4681 display_cycles
4682 )
4683 - 0usize];
4684 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::display_state"][::core::mem::offset_of!(
4685 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4686 display_state
4687 )
4688 - 4usize];
4689 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::div_cycles"][::core::mem::offset_of!(
4690 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4691 div_cycles
4692 ) - 8usize];
4693 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::div_state"][::core::mem::offset_of!(
4694 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4695 div_state
4696 ) - 12usize];
4697 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::div_counter"][::core::mem::offset_of!(
4698 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4699 div_counter
4700 )
4701 - 16usize];
4702 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::tima_reload_state"][::core::mem::offset_of!(
4703 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4704 tima_reload_state
4705 )
4706 - 18usize];
4707 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::serial_master_clock"][::core::mem::offset_of!(
4708 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4709 serial_master_clock
4710 )
4711 - 19usize];
4712 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::serial_mask"][::core::mem::offset_of!(
4713 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4714 serial_mask
4715 )
4716 - 20usize];
4717 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::double_speed_alignment"]
4718 [::core::mem::offset_of!(
4719 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4720 double_speed_alignment
4721 ) - 21usize];
4722 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::serial_count"][::core::mem::offset_of!(
4723 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4724 serial_count
4725 )
4726 - 22usize];
4727 [
4728 "Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::speed_switch_halt_countdown",
4729 ][::core::mem::offset_of!(
4730 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4731 speed_switch_halt_countdown
4732 ) - 24usize];
4733 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::speed_switch_countdown"]
4734 [::core::mem::offset_of!(
4735 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4736 speed_switch_countdown
4737 ) - 28usize];
4738 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::speed_switch_freeze"][::core::mem::offset_of!(
4739 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4740 speed_switch_freeze
4741 )
4742 - 29usize];
4743 [
4744 "Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::cycles_since_vblank_callback",
4745 ][::core::mem::offset_of!(
4746 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4747 cycles_since_vblank_callback
4748 ) - 32usize];
4749 [
4750 "Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::lcd_disabled_outside_of_vblank",
4751 ][::core::mem::offset_of!(
4752 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4753 lcd_disabled_outside_of_vblank
4754 ) - 36usize];
4755 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::allowed_pending_cycles"]
4756 [::core::mem::offset_of!(
4757 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4758 allowed_pending_cycles
4759 ) - 40usize];
4760 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::mode3_batching_length"][::core::mem::offset_of!(
4761 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4762 mode3_batching_length
4763 )
4764 - 44usize];
4765 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::joyp_switching_delay"][::core::mem::offset_of!(
4766 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4767 joyp_switching_delay
4768 )
4769 - 46usize];
4770 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::joyp_switch_value"][::core::mem::offset_of!(
4771 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4772 joyp_switch_value
4773 )
4774 - 47usize];
4775 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1::key_bounce_timing"][::core::mem::offset_of!(
4776 GB_gameboy_internal_s__bindgen_ty_6__bindgen_ty_1,
4777 key_bounce_timing
4778 )
4779 - 48usize];
4780};
4781#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4782const _: () = {
4783 ["Size of GB_gameboy_internal_s__bindgen_ty_6"]
4784 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_6>() - 64usize];
4785 ["Alignment of GB_gameboy_internal_s__bindgen_ty_6"]
4786 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_6>() - 8usize];
4787 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_6::timing_section_start"][::core::mem::offset_of!(
4788 GB_gameboy_internal_s__bindgen_ty_6,
4789 timing_section_start
4790 ) - 0usize];
4791};
4792#[repr(C)]
4793#[repr(align(8))]
4794#[derive(Copy, Clone)]
4795pub union GB_gameboy_internal_s__bindgen_ty_7 {
4796 pub apu_section_start: u8,
4797 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1,
4798}
4799#[repr(C)]
4800#[derive(Debug, Copy, Clone)]
4801pub struct GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1 {
4802 pub apu: GB_apu_t,
4803}
4804#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4805const _: () = {
4806 ["Size of GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1"]
4807 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1>() - 98usize];
4808 ["Alignment of GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1"]
4809 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1>() - 2usize];
4810 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1::apu"]
4811 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_7__bindgen_ty_1, apu) - 0usize];
4812};
4813#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4814const _: () = {
4815 ["Size of GB_gameboy_internal_s__bindgen_ty_7"]
4816 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_7>() - 104usize];
4817 ["Alignment of GB_gameboy_internal_s__bindgen_ty_7"]
4818 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_7>() - 8usize];
4819 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_7::apu_section_start"]
4820 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_7, apu_section_start) - 0usize];
4821};
4822#[repr(C)]
4823#[derive(Copy, Clone)]
4824pub union GB_gameboy_internal_s__bindgen_ty_8 {
4825 pub rtc_section_start: u8,
4826 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1,
4827}
4828#[repr(C)]
4829#[derive(Copy, Clone)]
4830pub struct GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1 {
4831 pub rtc_real: GB_rtc_time_t,
4832 pub rtc_latched: GB_rtc_time_t,
4833 pub last_rtc_second: u64,
4834 pub rtc_cycles: u32,
4835 pub tpp1_mr4: u8,
4836}
4837#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4838const _: () = {
4839 ["Size of GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1"]
4840 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1>() - 32usize];
4841 ["Alignment of GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1"]
4842 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1>() - 8usize];
4843 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1::rtc_real"][::core::mem::offset_of!(
4844 GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1,
4845 rtc_real
4846 ) - 0usize];
4847 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1::rtc_latched"][::core::mem::offset_of!(
4848 GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1,
4849 rtc_latched
4850 ) - 5usize];
4851 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1::last_rtc_second"][::core::mem::offset_of!(
4852 GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1,
4853 last_rtc_second
4854 )
4855 - 16usize];
4856 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1::rtc_cycles"][::core::mem::offset_of!(
4857 GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1,
4858 rtc_cycles
4859 ) - 24usize];
4860 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1::tpp1_mr4"][::core::mem::offset_of!(
4861 GB_gameboy_internal_s__bindgen_ty_8__bindgen_ty_1,
4862 tpp1_mr4
4863 ) - 28usize];
4864};
4865#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4866const _: () = {
4867 ["Size of GB_gameboy_internal_s__bindgen_ty_8"]
4868 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_8>() - 32usize];
4869 ["Alignment of GB_gameboy_internal_s__bindgen_ty_8"]
4870 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_8>() - 8usize];
4871 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_8::rtc_section_start"]
4872 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_8, rtc_section_start) - 0usize];
4873};
4874#[repr(C)]
4875#[repr(align(8))]
4876#[derive(Copy, Clone)]
4877pub union GB_gameboy_internal_s__bindgen_ty_9 {
4878 pub video_section_start: u8,
4879 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
4880}
4881#[repr(C)]
4882#[derive(Copy, Clone)]
4883pub struct GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1 {
4884 pub vram_size: u32,
4885 pub cgb_vram_bank: bool,
4886 pub oam: [u8; 160usize],
4887 pub background_palettes_data: [u8; 64usize],
4888 pub object_palettes_data: [u8; 64usize],
4889 pub position_in_line: u8,
4890 pub stat_interrupt_line: bool,
4891 pub window_y: u8,
4892 pub frame_skip_state: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_1,
4893 pub oam_read_blocked: bool,
4894 pub vram_read_blocked: bool,
4895 pub oam_write_blocked: bool,
4896 pub vram_write_blocked: bool,
4897 pub current_line: u8,
4898 pub ly_for_comparison: u16,
4899 pub bg_fifo: GB_fifo_t,
4900 pub oam_fifo: GB_fifo_t,
4901 pub fetcher_y: u8,
4902 pub cycles_for_line: u16,
4903 pub current_tile: u8,
4904 pub current_tile_attributes: u8,
4905 pub current_tile_data: [u8; 2usize],
4906 pub fetcher_state: u8,
4907 pub window_is_being_fetched: bool,
4908 pub wx166_glitch__do_not_use: bool,
4909 pub wx_triggered: bool,
4910 pub visible_objs: [u8; 10usize],
4911 pub objects_x: [u8; 10usize],
4912 pub objects_y: [u8; 10usize],
4913 pub object_tile_data: [u8; 2usize],
4914 pub mode2_y_bus: u8,
4915 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2,
4916 pub n_visible_objs: u8,
4917 pub orig_n_visible_objs: u8,
4918 pub oam_search_index: u8,
4919 pub accessed_oam_row: u8,
4920 pub mode_for_interrupt: u8,
4921 pub lyc_interrupt_line: bool,
4922 pub cgb_palettes_blocked: bool,
4923 pub current_lcd_line: u8,
4924 pub object_priority: u8,
4925 pub oam_ppu_blocked: bool,
4926 pub vram_ppu_blocked: bool,
4927 pub cgb_palettes_ppu_blocked: bool,
4928 pub object_fetch_aborted: bool,
4929 pub during_object_fetch: bool,
4930 pub object_low_line_address: u16,
4931 pub wy_triggered: bool,
4932 pub window_tile_x: u8,
4933 pub lcd_x: u8,
4934 pub is_odd_frame: bool,
4935 pub last_tile_data_address: u16,
4936 pub last_tile_index_address: u16,
4937 pub data_for_sel_glitch: u8,
4938 pub delayed_glitch_hblank_interrupt: bool,
4939 pub frame_repeat_countdown: u32,
4940 pub disable_window_pixel_insertion_glitch: bool,
4941 pub insert_bg_pixel: bool,
4942 pub cpu_vram_bus: u8,
4943 pub frame_parity_ticks: u32,
4944 pub last_tileset: bool,
4945 pub cgb_wx_glitch: bool,
4946 pub line_has_fractional_scrolling: bool,
4947 pub wy_check_modulo: u8,
4948 pub wy_check_scheduled: bool,
4949 pub wy_just_checked: bool,
4950 pub wx_166_interrupt_glitch: bool,
4951}
4952pub const GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1_GB_FRAMESKIP_LCD_TURNED_ON:
4953 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_1 = 0;
4954pub const GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1_GB_FRAMESKIP_FIRST_FRAME_RENDERED:
4955 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_1 = 1;
4956pub type GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_1 = u8;
4957#[repr(C)]
4958#[derive(Copy, Clone)]
4959pub union GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2 {
4960 pub mode2_x_bus: u8,
4961 pub object_flags: u8,
4962}
4963#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4964const _: () = {
4965 ["Size of GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2"][::core::mem::size_of::<
4966 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2,
4967 >() - 1usize];
4968 ["Alignment of GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2"]
4969 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2>(
4970 ) - 1usize];
4971 [
4972 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2::mode2_x_bus",
4973 ][::core::mem::offset_of!(
4974 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2,
4975 mode2_x_bus
4976 ) - 0usize];
4977 [
4978 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2::object_flags",
4979 ][::core::mem::offset_of!(
4980 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1__bindgen_ty_2,
4981 object_flags
4982 ) - 0usize];
4983};
4984#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4985const _: () = {
4986 ["Size of GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1"]
4987 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1>() - 464usize];
4988 ["Alignment of GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1"]
4989 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1>() - 4usize];
4990 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::vram_size"][::core::mem::offset_of!(
4991 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
4992 vram_size
4993 ) - 0usize];
4994 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::cgb_vram_bank"][::core::mem::offset_of!(
4995 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
4996 cgb_vram_bank
4997 )
4998 - 4usize];
4999 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::oam"]
5000 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1, oam) - 5usize];
5001 [
5002 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::background_palettes_data",
5003 ][::core::mem::offset_of!(
5004 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5005 background_palettes_data
5006 ) - 165usize];
5007 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::object_palettes_data"][::core::mem::offset_of!(
5008 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5009 object_palettes_data
5010 )
5011 - 229usize];
5012 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::position_in_line"][::core::mem::offset_of!(
5013 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5014 position_in_line
5015 )
5016 - 293usize];
5017 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::stat_interrupt_line"][::core::mem::offset_of!(
5018 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5019 stat_interrupt_line
5020 )
5021 - 294usize];
5022 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::window_y"][::core::mem::offset_of!(
5023 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5024 window_y
5025 ) - 295usize];
5026 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::frame_skip_state"][::core::mem::offset_of!(
5027 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5028 frame_skip_state
5029 )
5030 - 296usize];
5031 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::oam_read_blocked"][::core::mem::offset_of!(
5032 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5033 oam_read_blocked
5034 )
5035 - 297usize];
5036 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::vram_read_blocked"][::core::mem::offset_of!(
5037 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5038 vram_read_blocked
5039 )
5040 - 298usize];
5041 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::oam_write_blocked"][::core::mem::offset_of!(
5042 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5043 oam_write_blocked
5044 )
5045 - 299usize];
5046 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::vram_write_blocked"][::core::mem::offset_of!(
5047 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5048 vram_write_blocked
5049 )
5050 - 300usize];
5051 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::current_line"][::core::mem::offset_of!(
5052 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5053 current_line
5054 )
5055 - 301usize];
5056 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::ly_for_comparison"][::core::mem::offset_of!(
5057 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5058 ly_for_comparison
5059 )
5060 - 302usize];
5061 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::bg_fifo"][::core::mem::offset_of!(
5062 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5063 bg_fifo
5064 ) - 304usize];
5065 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::oam_fifo"][::core::mem::offset_of!(
5066 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5067 oam_fifo
5068 ) - 338usize];
5069 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::fetcher_y"][::core::mem::offset_of!(
5070 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5071 fetcher_y
5072 ) - 372usize];
5073 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::cycles_for_line"][::core::mem::offset_of!(
5074 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5075 cycles_for_line
5076 )
5077 - 374usize];
5078 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::current_tile"][::core::mem::offset_of!(
5079 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5080 current_tile
5081 )
5082 - 376usize];
5083 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::current_tile_attributes"]
5084 [::core::mem::offset_of!(
5085 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5086 current_tile_attributes
5087 ) - 377usize];
5088 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::current_tile_data"][::core::mem::offset_of!(
5089 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5090 current_tile_data
5091 )
5092 - 378usize];
5093 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::fetcher_state"][::core::mem::offset_of!(
5094 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5095 fetcher_state
5096 )
5097 - 380usize];
5098 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::window_is_being_fetched"]
5099 [::core::mem::offset_of!(
5100 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5101 window_is_being_fetched
5102 ) - 381usize];
5103 [
5104 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::wx166_glitch__do_not_use",
5105 ][::core::mem::offset_of!(
5106 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5107 wx166_glitch__do_not_use
5108 ) - 382usize];
5109 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::wx_triggered"][::core::mem::offset_of!(
5110 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5111 wx_triggered
5112 )
5113 - 383usize];
5114 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::visible_objs"][::core::mem::offset_of!(
5115 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5116 visible_objs
5117 )
5118 - 384usize];
5119 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::objects_x"][::core::mem::offset_of!(
5120 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5121 objects_x
5122 ) - 394usize];
5123 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::objects_y"][::core::mem::offset_of!(
5124 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5125 objects_y
5126 ) - 404usize];
5127 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::object_tile_data"][::core::mem::offset_of!(
5128 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5129 object_tile_data
5130 )
5131 - 414usize];
5132 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::mode2_y_bus"][::core::mem::offset_of!(
5133 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5134 mode2_y_bus
5135 )
5136 - 416usize];
5137 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::n_visible_objs"][::core::mem::offset_of!(
5138 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5139 n_visible_objs
5140 )
5141 - 418usize];
5142 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::orig_n_visible_objs"][::core::mem::offset_of!(
5143 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5144 orig_n_visible_objs
5145 )
5146 - 419usize];
5147 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::oam_search_index"][::core::mem::offset_of!(
5148 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5149 oam_search_index
5150 )
5151 - 420usize];
5152 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::accessed_oam_row"][::core::mem::offset_of!(
5153 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5154 accessed_oam_row
5155 )
5156 - 421usize];
5157 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::mode_for_interrupt"][::core::mem::offset_of!(
5158 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5159 mode_for_interrupt
5160 )
5161 - 422usize];
5162 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::lyc_interrupt_line"][::core::mem::offset_of!(
5163 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5164 lyc_interrupt_line
5165 )
5166 - 423usize];
5167 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::cgb_palettes_blocked"][::core::mem::offset_of!(
5168 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5169 cgb_palettes_blocked
5170 )
5171 - 424usize];
5172 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::current_lcd_line"][::core::mem::offset_of!(
5173 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5174 current_lcd_line
5175 )
5176 - 425usize];
5177 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::object_priority"][::core::mem::offset_of!(
5178 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5179 object_priority
5180 )
5181 - 426usize];
5182 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::oam_ppu_blocked"][::core::mem::offset_of!(
5183 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5184 oam_ppu_blocked
5185 )
5186 - 427usize];
5187 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::vram_ppu_blocked"][::core::mem::offset_of!(
5188 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5189 vram_ppu_blocked
5190 )
5191 - 428usize];
5192 [
5193 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::cgb_palettes_ppu_blocked",
5194 ][::core::mem::offset_of!(
5195 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5196 cgb_palettes_ppu_blocked
5197 ) - 429usize];
5198 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::object_fetch_aborted"][::core::mem::offset_of!(
5199 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5200 object_fetch_aborted
5201 )
5202 - 430usize];
5203 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::during_object_fetch"][::core::mem::offset_of!(
5204 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5205 during_object_fetch
5206 )
5207 - 431usize];
5208 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::object_low_line_address"]
5209 [::core::mem::offset_of!(
5210 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5211 object_low_line_address
5212 ) - 432usize];
5213 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::wy_triggered"][::core::mem::offset_of!(
5214 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5215 wy_triggered
5216 )
5217 - 434usize];
5218 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::window_tile_x"][::core::mem::offset_of!(
5219 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5220 window_tile_x
5221 )
5222 - 435usize];
5223 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::lcd_x"][::core::mem::offset_of!(
5224 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5225 lcd_x
5226 ) - 436usize];
5227 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::is_odd_frame"][::core::mem::offset_of!(
5228 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5229 is_odd_frame
5230 )
5231 - 437usize];
5232 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::last_tile_data_address"]
5233 [::core::mem::offset_of!(
5234 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5235 last_tile_data_address
5236 ) - 438usize];
5237 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::last_tile_index_address"]
5238 [::core::mem::offset_of!(
5239 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5240 last_tile_index_address
5241 ) - 440usize];
5242 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::data_for_sel_glitch"][::core::mem::offset_of!(
5243 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5244 data_for_sel_glitch
5245 )
5246 - 442usize];
5247 [
5248 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::delayed_glitch_hblank_interrupt",
5249 ][::core::mem::offset_of!(
5250 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5251 delayed_glitch_hblank_interrupt
5252 ) - 443usize];
5253 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::frame_repeat_countdown"]
5254 [::core::mem::offset_of!(
5255 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5256 frame_repeat_countdown
5257 ) - 444usize];
5258 [
5259 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::disable_window_pixel_insertion_glitch",
5260 ][::core::mem::offset_of!(
5261 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5262 disable_window_pixel_insertion_glitch
5263 ) - 448usize];
5264 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::insert_bg_pixel"][::core::mem::offset_of!(
5265 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5266 insert_bg_pixel
5267 )
5268 - 449usize];
5269 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::cpu_vram_bus"][::core::mem::offset_of!(
5270 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5271 cpu_vram_bus
5272 )
5273 - 450usize];
5274 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::frame_parity_ticks"][::core::mem::offset_of!(
5275 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5276 frame_parity_ticks
5277 )
5278 - 452usize];
5279 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::last_tileset"][::core::mem::offset_of!(
5280 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5281 last_tileset
5282 )
5283 - 456usize];
5284 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::cgb_wx_glitch"][::core::mem::offset_of!(
5285 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5286 cgb_wx_glitch
5287 )
5288 - 457usize];
5289 [
5290 "Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::line_has_fractional_scrolling",
5291 ][::core::mem::offset_of!(
5292 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5293 line_has_fractional_scrolling
5294 ) - 458usize];
5295 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::wy_check_modulo"][::core::mem::offset_of!(
5296 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5297 wy_check_modulo
5298 )
5299 - 459usize];
5300 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::wy_check_scheduled"][::core::mem::offset_of!(
5301 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5302 wy_check_scheduled
5303 )
5304 - 460usize];
5305 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::wy_just_checked"][::core::mem::offset_of!(
5306 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5307 wy_just_checked
5308 )
5309 - 461usize];
5310 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1::wx_166_interrupt_glitch"]
5311 [::core::mem::offset_of!(
5312 GB_gameboy_internal_s__bindgen_ty_9__bindgen_ty_1,
5313 wx_166_interrupt_glitch
5314 ) - 462usize];
5315};
5316#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5317const _: () = {
5318 ["Size of GB_gameboy_internal_s__bindgen_ty_9"]
5319 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_9>() - 464usize];
5320 ["Alignment of GB_gameboy_internal_s__bindgen_ty_9"]
5321 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_9>() - 8usize];
5322 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_9::video_section_start"][::core::mem::offset_of!(
5323 GB_gameboy_internal_s__bindgen_ty_9,
5324 video_section_start
5325 ) - 0usize];
5326};
5327#[repr(C)]
5328#[repr(align(8))]
5329#[derive(Copy, Clone)]
5330pub union GB_gameboy_internal_s__bindgen_ty_10 {
5331 pub accessory_section_start: u8,
5332 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1,
5333}
5334#[repr(C)]
5335#[derive(Copy, Clone)]
5336pub struct GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1 {
5337 pub accessory: GB_accessory_t,
5338 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1,
5339}
5340#[repr(C)]
5341#[derive(Copy, Clone)]
5342pub union GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1 {
5343 pub printer: GB_printer_t,
5344 pub workboy: GB_workboy_t,
5345}
5346#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5347const _: () = {
5348 ["Size of GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1"]
5349 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1>(
5350 ) - 32672usize];
5351 ["Alignment of GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1"]
5352 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1>(
5353 ) - 4usize];
5354 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1::printer"]
5355 [::core::mem::offset_of!(
5356 GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1,
5357 printer
5358 ) - 0usize];
5359 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1::workboy"]
5360 [::core::mem::offset_of!(
5361 GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1,
5362 workboy
5363 ) - 0usize];
5364};
5365#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5366const _: () = {
5367 ["Size of GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1"]
5368 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1>() - 32676usize];
5369 ["Alignment of GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1"]
5370 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1>() - 4usize];
5371 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1::accessory"][::core::mem::offset_of!(
5372 GB_gameboy_internal_s__bindgen_ty_10__bindgen_ty_1,
5373 accessory
5374 ) - 0usize];
5375};
5376#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5377const _: () = {
5378 ["Size of GB_gameboy_internal_s__bindgen_ty_10"]
5379 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_10>() - 32680usize];
5380 ["Alignment of GB_gameboy_internal_s__bindgen_ty_10"]
5381 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_10>() - 8usize];
5382 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_10::accessory_section_start"][::core::mem::offset_of!(
5383 GB_gameboy_internal_s__bindgen_ty_10,
5384 accessory_section_start
5385 ) - 0usize];
5386};
5387#[repr(C)]
5388#[derive(Copy, Clone)]
5389pub union GB_gameboy_internal_s__bindgen_ty_11 {
5390 pub unsaved_section_start: u8,
5391 pub __bindgen_anon_1: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5392}
5393#[repr(C)]
5394#[derive(Debug, Copy, Clone)]
5395pub struct GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1 {
5396 pub rom: *mut u8,
5397 pub rom_size: u32,
5398 pub cartridge_type: *const GB_cartridge_t,
5399 pub mbc1_wiring: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1,
5400 pub is_mbc30: bool,
5401 pub pending_cycles: ::core::ffi::c_uint,
5402 pub ram: *mut u8,
5403 pub vram: *mut u8,
5404 pub mbc_ram: *mut u8,
5405 pub screen: *mut u32,
5406 pub background_palettes_rgb: [u32; 32usize],
5407 pub object_palettes_rgb: [u32; 32usize],
5408 pub dmg_palette: *const GB_palette_t,
5409 pub color_correction_mode: GB_color_correction_mode_t,
5410 pub light_temperature: f64,
5411 pub keys: [[bool; 8usize]; 4usize],
5412 pub use_faux_analog: [bool; 4usize],
5413 pub faux_analog_inputs:
5414 [GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2; 4usize],
5415 pub faux_analog_ticks: u8,
5416 pub accelerometer_x: f64,
5417 pub accelerometer_y: f64,
5418 pub border_mode: GB_border_mode_t,
5419 pub borrowed_border: GB_sgb_border_t,
5420 pub tried_loading_sgb_border: bool,
5421 pub has_sgb_border: bool,
5422 pub objects_disabled: bool,
5423 pub background_disabled: bool,
5424 pub joyp_accessed: bool,
5425 pub illegal_inputs_allowed: bool,
5426 pub no_bouncing_emulation: bool,
5427 pub joypad_is_stable: bool,
5428 pub last_sync: u64,
5429 pub last_render: u64,
5430 pub cycles_since_last_sync: u64,
5431 pub rtc_mode: GB_rtc_mode_t,
5432 pub rtc_second_length: u32,
5433 pub clock_rate: u32,
5434 pub unmultiplied_clock_rate: u32,
5435 pub data_bus_decay: u32,
5436 pub apu_output: GB_apu_output_t,
5437 pub user_data: *mut ::core::ffi::c_void,
5438 pub log_callback: GB_log_callback_t,
5439 pub input_callback: GB_input_callback_t,
5440 pub async_input_callback: GB_input_callback_t,
5441 pub rgb_encode_callback: GB_rgb_encode_callback_t,
5442 pub vblank_callback: GB_vblank_callback_t,
5443 pub infrared_callback: GB_infrared_callback_t,
5444 pub camera_get_pixel_callback: GB_camera_get_pixel_callback_t,
5445 pub camera_update_request_callback: GB_camera_update_request_callback_t,
5446 pub rumble_callback: GB_rumble_callback_t,
5447 pub serial_transfer_bit_start_callback: GB_serial_transfer_bit_start_callback_t,
5448 pub serial_transfer_bit_end_callback: GB_serial_transfer_bit_end_callback_t,
5449 pub update_input_hint_callback: GB_update_input_hint_callback_t,
5450 pub joyp_write_callback: GB_joyp_write_callback_t,
5451 pub icd_pixel_callback: GB_icd_pixel_callback_t,
5452 pub icd_hreset_callback: GB_icd_vreset_callback_t,
5453 pub icd_vreset_callback: GB_icd_vreset_callback_t,
5454 pub read_memory_callback: GB_read_memory_callback_t,
5455 pub write_memory_callback: GB_write_memory_callback_t,
5456 pub boot_rom_load_callback: GB_boot_rom_load_callback_t,
5457 pub printer_callback: GB_print_image_callback_t,
5458 pub printer_done_callback: GB_printer_done_callback_t,
5459 pub workboy_set_time_callback: GB_workboy_set_time_callback_t,
5460 pub workboy_get_time_callback: GB_workboy_get_time_callback_t,
5461 pub execution_callback: GB_execution_callback_t,
5462 pub lcd_line_callback: GB_lcd_line_callback_t,
5463 pub lcd_status_callback: GB_lcd_status_callback_t,
5464 pub debug_stopped: bool,
5465 pub debug_disable: bool,
5466 pub debug_fin_command: bool,
5467 pub debug_next_command: bool,
5468 pub debug_active: bool,
5469 pub help_shown: bool,
5470 pub backstep_instructions: u32,
5471 pub n_breakpoints: u16,
5472 pub breakpoints: *mut GB_breakpoint_s,
5473 pub has_jump_to_breakpoints: bool,
5474 pub has_software_breakpoints: bool,
5475 pub nontrivial_jump_state: *mut ::core::ffi::c_void,
5476 pub non_trivial_jump_breakpoint_occured: bool,
5477 pub debug_call_depth: ::core::ffi::c_int,
5478 pub sp_for_call_depth: [u16; 512usize],
5479 pub addr_for_call_depth: [u16; 512usize],
5480 pub backtrace_size: ::core::ffi::c_uint,
5481 pub backtrace_sps: [u16; 512usize],
5482 pub backtrace_returns:
5483 [GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3; 512usize],
5484 pub n_watchpoints: u16,
5485 pub watchpoints: *mut GB_watchpoint_s,
5486 pub bank_symbols: *mut *mut GB_symbol_map_t,
5487 pub n_symbol_maps: usize,
5488 pub reversed_symbol_map: GB_reversed_symbol_map_t,
5489 pub debugger_ticks: u64,
5490 pub absolute_debugger_ticks: u64,
5491 pub undo_state: *mut u8,
5492 pub undo_label: *const ::core::ffi::c_char,
5493 pub debugger_reload_callback: GB_debugger_reload_callback_t,
5494 pub current_frame_idle_cycles: u32,
5495 pub current_frame_busy_cycles: u32,
5496 pub last_frame_idle_cycles: u32,
5497 pub last_frame_busy_cycles: u32,
5498 pub current_second_idle_cycles: u32,
5499 pub current_second_busy_cycles: u32,
5500 pub last_second_idle_cycles: u32,
5501 pub last_second_busy_cycles: u32,
5502 pub usage_frame_count: u8,
5503 pub rewind_buffer_length: usize,
5504 pub rewind_state_size: usize,
5505 pub rewind_sequences: *mut GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4,
5506 pub rewind_pos: usize,
5507 pub rewind_disable_invalidation: bool,
5508 pub sgb: *mut GB_sgb_t,
5509 pub sgb_intro_jingle_phases: [f64; 7usize],
5510 pub sgb_intro_sweep_phase: f64,
5511 pub sgb_intro_sweep_previous_sample: f64,
5512 pub cheat_enabled: bool,
5513 pub cheat_count: usize,
5514 pub cheats: *mut *mut GB_cheat_t,
5515 pub cheat_hash: [*mut GB_cheat_hash_t; 256usize],
5516 pub cheat_search_data: *mut u8,
5517 pub cheat_search_bitmap: *mut u8,
5518 pub cheat_search_count: usize,
5519 pub cheat_search_data_type: GB_cheat_search_data_type_t,
5520 pub turbo: bool,
5521 pub turbo_dont_skip: bool,
5522 pub turbo_cap_multiplier: f64,
5523 pub enable_skipped_frame_vblank_callbacks: bool,
5524 pub disable_rendering: bool,
5525 pub boot_rom: [u8; 2304usize],
5526 pub vblank_just_occured: bool,
5527 pub cycles_since_run: ::core::ffi::c_uint,
5528 pub clock_multiplier: f64,
5529 pub rumble_mode: GB_rumble_mode_t,
5530 pub rumble_on_cycles: u32,
5531 pub rumble_off_cycles: u32,
5532 pub wx_just_changed: bool,
5533 pub tile_sel_glitch: bool,
5534 pub disable_oam_corruption: bool,
5535 pub in_dma_read: bool,
5536 pub hdma_in_progress: bool,
5537 pub returned_open_bus: bool,
5538 pub addr_for_hdma_conflict: u16,
5539 pub during_div_write: bool,
5540 pub running_thread_id: *mut ::core::ffi::c_void,
5541 pub gbs_header: GB_gbs_header_t,
5542}
5543pub const GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1_GB_STANDARD_MBC1_WIRING:
5544 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 = 0;
5545pub const GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1_GB_MBC1M_WIRING:
5546 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 = 1;
5547pub type GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 = ::core::ffi::c_uint;
5548#[repr(C)]
5549#[derive(Debug, Copy, Clone)]
5550pub struct GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 {
5551 pub x: i8,
5552 pub y: i8,
5553}
5554#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5555const _: () = {
5556 ["Size of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2"]
5557 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2>(
5558 ) - 2usize];
5559 ["Alignment of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2"]
5560 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2>(
5561 ) - 1usize];
5562 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::x"][::core::mem::offset_of!(
5563 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2,
5564 x
5565 )
5566 - 0usize];
5567 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::y"][::core::mem::offset_of!(
5568 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2,
5569 y
5570 )
5571 - 1usize];
5572};
5573#[repr(C)]
5574#[derive(Debug, Copy, Clone)]
5575pub struct GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 {
5576 pub bank: u16,
5577 pub addr: u16,
5578}
5579#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5580const _: () = {
5581 ["Size of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3"]
5582 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3>(
5583 ) - 4usize];
5584 ["Alignment of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3"]
5585 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3>(
5586 ) - 2usize];
5587 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::bank"][::core::mem::offset_of!(
5588 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3,
5589 bank
5590 )
5591 - 0usize];
5592 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::addr"][::core::mem::offset_of!(
5593 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3,
5594 addr
5595 )
5596 - 2usize];
5597};
5598#[repr(C)]
5599#[derive(Debug, Copy, Clone)]
5600pub struct GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 {
5601 pub key_state: *mut u8,
5602 pub compressed_states: [*mut u8; 255usize],
5603 pub instruction_count: [u32; 256usize],
5604 pub pos: ::core::ffi::c_uint,
5605}
5606#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5607const _: () = {
5608 ["Size of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4"]
5609 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4>(
5610 ) - 3080usize];
5611 ["Alignment of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4"]
5612 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4>(
5613 ) - 8usize];
5614 [
5615 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::key_state",
5616 ][::core::mem::offset_of!(
5617 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4,
5618 key_state
5619 ) - 0usize];
5620 [
5621 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::compressed_states",
5622 ][::core::mem::offset_of!(
5623 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4,
5624 compressed_states
5625 ) - 8usize];
5626 [
5627 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::instruction_count",
5628 ][::core::mem::offset_of!(
5629 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4,
5630 instruction_count
5631 ) - 2048usize];
5632 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::pos"][::core::mem::offset_of!(
5633 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4,
5634 pos
5635 )
5636 - 3072usize];
5637};
5638#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5639const _: () = {
5640 ["Size of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1"]
5641 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1>() - 91168usize];
5642 ["Alignment of GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1"]
5643 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1>() - 8usize];
5644 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rom"]
5645 [::core::mem::offset_of!(GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1, rom) - 0usize];
5646 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rom_size"][::core::mem::offset_of!(
5647 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5648 rom_size
5649 ) - 8usize];
5650 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cartridge_type"][::core::mem::offset_of!(
5651 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5652 cartridge_type
5653 )
5654 - 16usize];
5655 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::mbc1_wiring"][::core::mem::offset_of!(
5656 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5657 mbc1_wiring
5658 )
5659 - 24usize];
5660 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::is_mbc30"][::core::mem::offset_of!(
5661 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5662 is_mbc30
5663 ) - 28usize];
5664 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::pending_cycles"][::core::mem::offset_of!(
5665 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5666 pending_cycles
5667 )
5668 - 32usize];
5669 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::ram"][::core::mem::offset_of!(
5670 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5671 ram
5672 ) - 40usize];
5673 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::vram"][::core::mem::offset_of!(
5674 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5675 vram
5676 ) - 48usize];
5677 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::mbc_ram"][::core::mem::offset_of!(
5678 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5679 mbc_ram
5680 ) - 56usize];
5681 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::screen"][::core::mem::offset_of!(
5682 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5683 screen
5684 ) - 64usize];
5685 [
5686 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::background_palettes_rgb",
5687 ][::core::mem::offset_of!(
5688 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5689 background_palettes_rgb
5690 ) - 72usize];
5691 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::object_palettes_rgb"][::core::mem::offset_of!(
5692 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5693 object_palettes_rgb
5694 )
5695 - 200usize];
5696 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::dmg_palette"][::core::mem::offset_of!(
5697 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5698 dmg_palette
5699 )
5700 - 328usize];
5701 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::color_correction_mode"]
5702 [::core::mem::offset_of!(
5703 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5704 color_correction_mode
5705 ) - 336usize];
5706 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::light_temperature"][::core::mem::offset_of!(
5707 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5708 light_temperature
5709 )
5710 - 344usize];
5711 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::keys"][::core::mem::offset_of!(
5712 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5713 keys
5714 ) - 352usize];
5715 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::use_faux_analog"][::core::mem::offset_of!(
5716 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5717 use_faux_analog
5718 )
5719 - 384usize];
5720 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::faux_analog_inputs"][::core::mem::offset_of!(
5721 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5722 faux_analog_inputs
5723 )
5724 - 388usize];
5725 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::faux_analog_ticks"][::core::mem::offset_of!(
5726 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5727 faux_analog_ticks
5728 )
5729 - 396usize];
5730 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::accelerometer_x"][::core::mem::offset_of!(
5731 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5732 accelerometer_x
5733 )
5734 - 400usize];
5735 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::accelerometer_y"][::core::mem::offset_of!(
5736 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5737 accelerometer_y
5738 )
5739 - 408usize];
5740 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::border_mode"][::core::mem::offset_of!(
5741 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5742 border_mode
5743 )
5744 - 416usize];
5745 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::borrowed_border"][::core::mem::offset_of!(
5746 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5747 borrowed_border
5748 )
5749 - 420usize];
5750 [
5751 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::tried_loading_sgb_border",
5752 ][::core::mem::offset_of!(
5753 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5754 tried_loading_sgb_border
5755 ) - 10788usize];
5756 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::has_sgb_border"][::core::mem::offset_of!(
5757 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5758 has_sgb_border
5759 )
5760 - 10789usize];
5761 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::objects_disabled"][::core::mem::offset_of!(
5762 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5763 objects_disabled
5764 )
5765 - 10790usize];
5766 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::background_disabled"][::core::mem::offset_of!(
5767 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5768 background_disabled
5769 )
5770 - 10791usize];
5771 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::joyp_accessed"][::core::mem::offset_of!(
5772 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5773 joyp_accessed
5774 )
5775 - 10792usize];
5776 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::illegal_inputs_allowed"]
5777 [::core::mem::offset_of!(
5778 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5779 illegal_inputs_allowed
5780 ) - 10793usize];
5781 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::no_bouncing_emulation"]
5782 [::core::mem::offset_of!(
5783 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5784 no_bouncing_emulation
5785 ) - 10794usize];
5786 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::joypad_is_stable"][::core::mem::offset_of!(
5787 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5788 joypad_is_stable
5789 )
5790 - 10795usize];
5791 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::last_sync"][::core::mem::offset_of!(
5792 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5793 last_sync
5794 )
5795 - 10800usize];
5796 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::last_render"][::core::mem::offset_of!(
5797 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5798 last_render
5799 )
5800 - 10808usize];
5801 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cycles_since_last_sync"]
5802 [::core::mem::offset_of!(
5803 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5804 cycles_since_last_sync
5805 ) - 10816usize];
5806 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rtc_mode"][::core::mem::offset_of!(
5807 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5808 rtc_mode
5809 )
5810 - 10824usize];
5811 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rtc_second_length"][::core::mem::offset_of!(
5812 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5813 rtc_second_length
5814 )
5815 - 10828usize];
5816 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::clock_rate"][::core::mem::offset_of!(
5817 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5818 clock_rate
5819 )
5820 - 10832usize];
5821 [
5822 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::unmultiplied_clock_rate",
5823 ][::core::mem::offset_of!(
5824 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5825 unmultiplied_clock_rate
5826 ) - 10836usize];
5827 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::data_bus_decay"][::core::mem::offset_of!(
5828 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5829 data_bus_decay
5830 )
5831 - 10840usize];
5832 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::apu_output"][::core::mem::offset_of!(
5833 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5834 apu_output
5835 )
5836 - 10848usize];
5837 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::user_data"][::core::mem::offset_of!(
5838 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5839 user_data
5840 )
5841 - 15440usize];
5842 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::log_callback"][::core::mem::offset_of!(
5843 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5844 log_callback
5845 )
5846 - 15448usize];
5847 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::input_callback"][::core::mem::offset_of!(
5848 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5849 input_callback
5850 )
5851 - 15456usize];
5852 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::async_input_callback"][::core::mem::offset_of!(
5853 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5854 async_input_callback
5855 )
5856 - 15464usize];
5857 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rgb_encode_callback"][::core::mem::offset_of!(
5858 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5859 rgb_encode_callback
5860 )
5861 - 15472usize];
5862 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::vblank_callback"][::core::mem::offset_of!(
5863 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5864 vblank_callback
5865 )
5866 - 15480usize];
5867 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::infrared_callback"][::core::mem::offset_of!(
5868 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5869 infrared_callback
5870 )
5871 - 15488usize];
5872 [
5873 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::camera_get_pixel_callback",
5874 ][::core::mem::offset_of!(
5875 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5876 camera_get_pixel_callback
5877 ) - 15496usize];
5878 [
5879 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::camera_update_request_callback",
5880 ][::core::mem::offset_of!(
5881 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5882 camera_update_request_callback
5883 ) - 15504usize];
5884 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rumble_callback"][::core::mem::offset_of!(
5885 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5886 rumble_callback
5887 )
5888 - 15512usize];
5889 [
5890 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::serial_transfer_bit_start_callback",
5891 ][::core::mem::offset_of!(
5892 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5893 serial_transfer_bit_start_callback
5894 ) - 15520usize];
5895 [
5896 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::serial_transfer_bit_end_callback",
5897 ][::core::mem::offset_of!(
5898 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5899 serial_transfer_bit_end_callback
5900 ) - 15528usize];
5901 [
5902 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::update_input_hint_callback",
5903 ][::core::mem::offset_of!(
5904 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5905 update_input_hint_callback
5906 ) - 15536usize];
5907 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::joyp_write_callback"][::core::mem::offset_of!(
5908 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5909 joyp_write_callback
5910 )
5911 - 15544usize];
5912 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::icd_pixel_callback"][::core::mem::offset_of!(
5913 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5914 icd_pixel_callback
5915 )
5916 - 15552usize];
5917 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::icd_hreset_callback"][::core::mem::offset_of!(
5918 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5919 icd_hreset_callback
5920 )
5921 - 15560usize];
5922 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::icd_vreset_callback"][::core::mem::offset_of!(
5923 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5924 icd_vreset_callback
5925 )
5926 - 15568usize];
5927 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::read_memory_callback"][::core::mem::offset_of!(
5928 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5929 read_memory_callback
5930 )
5931 - 15576usize];
5932 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::write_memory_callback"]
5933 [::core::mem::offset_of!(
5934 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5935 write_memory_callback
5936 ) - 15584usize];
5937 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::boot_rom_load_callback"]
5938 [::core::mem::offset_of!(
5939 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5940 boot_rom_load_callback
5941 ) - 15592usize];
5942 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::printer_callback"][::core::mem::offset_of!(
5943 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5944 printer_callback
5945 )
5946 - 15600usize];
5947 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::printer_done_callback"]
5948 [::core::mem::offset_of!(
5949 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5950 printer_done_callback
5951 ) - 15608usize];
5952 [
5953 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::workboy_set_time_callback",
5954 ][::core::mem::offset_of!(
5955 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5956 workboy_set_time_callback
5957 ) - 15616usize];
5958 [
5959 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::workboy_get_time_callback",
5960 ][::core::mem::offset_of!(
5961 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5962 workboy_get_time_callback
5963 ) - 15624usize];
5964 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::execution_callback"][::core::mem::offset_of!(
5965 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5966 execution_callback
5967 )
5968 - 15632usize];
5969 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::lcd_line_callback"][::core::mem::offset_of!(
5970 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5971 lcd_line_callback
5972 )
5973 - 15640usize];
5974 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::lcd_status_callback"][::core::mem::offset_of!(
5975 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5976 lcd_status_callback
5977 )
5978 - 15648usize];
5979 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debug_stopped"][::core::mem::offset_of!(
5980 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5981 debug_stopped
5982 )
5983 - 15656usize];
5984 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debug_disable"][::core::mem::offset_of!(
5985 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5986 debug_disable
5987 )
5988 - 15657usize];
5989 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debug_fin_command"][::core::mem::offset_of!(
5990 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5991 debug_fin_command
5992 )
5993 - 15658usize];
5994 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debug_next_command"][::core::mem::offset_of!(
5995 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
5996 debug_next_command
5997 )
5998 - 15659usize];
5999 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debug_active"][::core::mem::offset_of!(
6000 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6001 debug_active
6002 )
6003 - 15660usize];
6004 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::help_shown"][::core::mem::offset_of!(
6005 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6006 help_shown
6007 )
6008 - 15661usize];
6009 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::backstep_instructions"]
6010 [::core::mem::offset_of!(
6011 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6012 backstep_instructions
6013 ) - 15664usize];
6014 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::n_breakpoints"][::core::mem::offset_of!(
6015 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6016 n_breakpoints
6017 )
6018 - 15668usize];
6019 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::breakpoints"][::core::mem::offset_of!(
6020 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6021 breakpoints
6022 )
6023 - 15672usize];
6024 [
6025 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::has_jump_to_breakpoints",
6026 ][::core::mem::offset_of!(
6027 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6028 has_jump_to_breakpoints
6029 ) - 15680usize];
6030 [
6031 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::has_software_breakpoints",
6032 ][::core::mem::offset_of!(
6033 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6034 has_software_breakpoints
6035 ) - 15681usize];
6036 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::nontrivial_jump_state"]
6037 [::core::mem::offset_of!(
6038 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6039 nontrivial_jump_state
6040 ) - 15688usize];
6041 [
6042 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::non_trivial_jump_breakpoint_occured",
6043 ][::core::mem::offset_of!(
6044 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6045 non_trivial_jump_breakpoint_occured
6046 ) - 15696usize];
6047 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debug_call_depth"][::core::mem::offset_of!(
6048 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6049 debug_call_depth
6050 )
6051 - 15700usize];
6052 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::sp_for_call_depth"][::core::mem::offset_of!(
6053 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6054 sp_for_call_depth
6055 )
6056 - 15704usize];
6057 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::addr_for_call_depth"][::core::mem::offset_of!(
6058 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6059 addr_for_call_depth
6060 )
6061 - 16728usize];
6062 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::backtrace_size"][::core::mem::offset_of!(
6063 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6064 backtrace_size
6065 )
6066 - 17752usize];
6067 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::backtrace_sps"][::core::mem::offset_of!(
6068 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6069 backtrace_sps
6070 )
6071 - 17756usize];
6072 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::backtrace_returns"][::core::mem::offset_of!(
6073 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6074 backtrace_returns
6075 )
6076 - 18780usize];
6077 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::n_watchpoints"][::core::mem::offset_of!(
6078 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6079 n_watchpoints
6080 )
6081 - 20828usize];
6082 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::watchpoints"][::core::mem::offset_of!(
6083 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6084 watchpoints
6085 )
6086 - 20832usize];
6087 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::bank_symbols"][::core::mem::offset_of!(
6088 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6089 bank_symbols
6090 )
6091 - 20840usize];
6092 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::n_symbol_maps"][::core::mem::offset_of!(
6093 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6094 n_symbol_maps
6095 )
6096 - 20848usize];
6097 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::reversed_symbol_map"][::core::mem::offset_of!(
6098 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6099 reversed_symbol_map
6100 )
6101 - 20856usize];
6102 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debugger_ticks"][::core::mem::offset_of!(
6103 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6104 debugger_ticks
6105 )
6106 - 86392usize];
6107 [
6108 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::absolute_debugger_ticks",
6109 ][::core::mem::offset_of!(
6110 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6111 absolute_debugger_ticks
6112 ) - 86400usize];
6113 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::undo_state"][::core::mem::offset_of!(
6114 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6115 undo_state
6116 )
6117 - 86408usize];
6118 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::undo_label"][::core::mem::offset_of!(
6119 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6120 undo_label
6121 )
6122 - 86416usize];
6123 [
6124 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::debugger_reload_callback",
6125 ][::core::mem::offset_of!(
6126 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6127 debugger_reload_callback
6128 ) - 86424usize];
6129 [
6130 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::current_frame_idle_cycles",
6131 ][::core::mem::offset_of!(
6132 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6133 current_frame_idle_cycles
6134 ) - 86432usize];
6135 [
6136 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::current_frame_busy_cycles",
6137 ][::core::mem::offset_of!(
6138 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6139 current_frame_busy_cycles
6140 ) - 86436usize];
6141 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::last_frame_idle_cycles"]
6142 [::core::mem::offset_of!(
6143 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6144 last_frame_idle_cycles
6145 ) - 86440usize];
6146 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::last_frame_busy_cycles"]
6147 [::core::mem::offset_of!(
6148 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6149 last_frame_busy_cycles
6150 ) - 86444usize];
6151 [
6152 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::current_second_idle_cycles",
6153 ][::core::mem::offset_of!(
6154 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6155 current_second_idle_cycles
6156 ) - 86448usize];
6157 [
6158 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::current_second_busy_cycles",
6159 ][::core::mem::offset_of!(
6160 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6161 current_second_busy_cycles
6162 ) - 86452usize];
6163 [
6164 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::last_second_idle_cycles",
6165 ][::core::mem::offset_of!(
6166 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6167 last_second_idle_cycles
6168 ) - 86456usize];
6169 [
6170 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::last_second_busy_cycles",
6171 ][::core::mem::offset_of!(
6172 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6173 last_second_busy_cycles
6174 ) - 86460usize];
6175 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::usage_frame_count"][::core::mem::offset_of!(
6176 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6177 usage_frame_count
6178 )
6179 - 86464usize];
6180 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rewind_buffer_length"][::core::mem::offset_of!(
6181 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6182 rewind_buffer_length
6183 )
6184 - 86472usize];
6185 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rewind_state_size"][::core::mem::offset_of!(
6186 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6187 rewind_state_size
6188 )
6189 - 86480usize];
6190 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rewind_sequences"][::core::mem::offset_of!(
6191 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6192 rewind_sequences
6193 )
6194 - 86488usize];
6195 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rewind_pos"][::core::mem::offset_of!(
6196 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6197 rewind_pos
6198 )
6199 - 86496usize];
6200 [
6201 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rewind_disable_invalidation",
6202 ][::core::mem::offset_of!(
6203 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6204 rewind_disable_invalidation
6205 ) - 86504usize];
6206 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::sgb"][::core::mem::offset_of!(
6207 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6208 sgb
6209 ) - 86512usize];
6210 [
6211 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::sgb_intro_jingle_phases",
6212 ][::core::mem::offset_of!(
6213 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6214 sgb_intro_jingle_phases
6215 ) - 86520usize];
6216 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::sgb_intro_sweep_phase"]
6217 [::core::mem::offset_of!(
6218 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6219 sgb_intro_sweep_phase
6220 ) - 86576usize];
6221 [
6222 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::sgb_intro_sweep_previous_sample",
6223 ][::core::mem::offset_of!(
6224 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6225 sgb_intro_sweep_previous_sample
6226 ) - 86584usize];
6227 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheat_enabled"][::core::mem::offset_of!(
6228 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6229 cheat_enabled
6230 )
6231 - 86592usize];
6232 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheat_count"][::core::mem::offset_of!(
6233 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6234 cheat_count
6235 )
6236 - 86600usize];
6237 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheats"][::core::mem::offset_of!(
6238 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6239 cheats
6240 ) - 86608usize];
6241 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheat_hash"][::core::mem::offset_of!(
6242 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6243 cheat_hash
6244 )
6245 - 86616usize];
6246 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheat_search_data"][::core::mem::offset_of!(
6247 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6248 cheat_search_data
6249 )
6250 - 88664usize];
6251 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheat_search_bitmap"][::core::mem::offset_of!(
6252 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6253 cheat_search_bitmap
6254 )
6255 - 88672usize];
6256 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheat_search_count"][::core::mem::offset_of!(
6257 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6258 cheat_search_count
6259 )
6260 - 88680usize];
6261 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cheat_search_data_type"]
6262 [::core::mem::offset_of!(
6263 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6264 cheat_search_data_type
6265 ) - 88688usize];
6266 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::turbo"][::core::mem::offset_of!(
6267 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6268 turbo
6269 ) - 88692usize];
6270 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::turbo_dont_skip"][::core::mem::offset_of!(
6271 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6272 turbo_dont_skip
6273 )
6274 - 88693usize];
6275 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::turbo_cap_multiplier"][::core::mem::offset_of!(
6276 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6277 turbo_cap_multiplier
6278 )
6279 - 88696usize];
6280 [
6281 "Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::enable_skipped_frame_vblank_callbacks",
6282 ][::core::mem::offset_of!(
6283 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6284 enable_skipped_frame_vblank_callbacks
6285 ) - 88704usize];
6286 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::disable_rendering"][::core::mem::offset_of!(
6287 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6288 disable_rendering
6289 )
6290 - 88705usize];
6291 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::boot_rom"][::core::mem::offset_of!(
6292 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6293 boot_rom
6294 )
6295 - 88706usize];
6296 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::vblank_just_occured"][::core::mem::offset_of!(
6297 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6298 vblank_just_occured
6299 )
6300 - 91010usize];
6301 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::cycles_since_run"][::core::mem::offset_of!(
6302 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6303 cycles_since_run
6304 )
6305 - 91012usize];
6306 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::clock_multiplier"][::core::mem::offset_of!(
6307 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6308 clock_multiplier
6309 )
6310 - 91016usize];
6311 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rumble_mode"][::core::mem::offset_of!(
6312 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6313 rumble_mode
6314 )
6315 - 91024usize];
6316 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rumble_on_cycles"][::core::mem::offset_of!(
6317 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6318 rumble_on_cycles
6319 )
6320 - 91028usize];
6321 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::rumble_off_cycles"][::core::mem::offset_of!(
6322 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6323 rumble_off_cycles
6324 )
6325 - 91032usize];
6326 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::wx_just_changed"][::core::mem::offset_of!(
6327 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6328 wx_just_changed
6329 )
6330 - 91036usize];
6331 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::tile_sel_glitch"][::core::mem::offset_of!(
6332 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6333 tile_sel_glitch
6334 )
6335 - 91037usize];
6336 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::disable_oam_corruption"]
6337 [::core::mem::offset_of!(
6338 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6339 disable_oam_corruption
6340 ) - 91038usize];
6341 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::in_dma_read"][::core::mem::offset_of!(
6342 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6343 in_dma_read
6344 )
6345 - 91039usize];
6346 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::hdma_in_progress"][::core::mem::offset_of!(
6347 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6348 hdma_in_progress
6349 )
6350 - 91040usize];
6351 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::returned_open_bus"][::core::mem::offset_of!(
6352 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6353 returned_open_bus
6354 )
6355 - 91041usize];
6356 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::addr_for_hdma_conflict"]
6357 [::core::mem::offset_of!(
6358 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6359 addr_for_hdma_conflict
6360 ) - 91042usize];
6361 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::during_div_write"][::core::mem::offset_of!(
6362 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6363 during_div_write
6364 )
6365 - 91044usize];
6366 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::running_thread_id"][::core::mem::offset_of!(
6367 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6368 running_thread_id
6369 )
6370 - 91048usize];
6371 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1::gbs_header"][::core::mem::offset_of!(
6372 GB_gameboy_internal_s__bindgen_ty_11__bindgen_ty_1,
6373 gbs_header
6374 )
6375 - 91056usize];
6376};
6377#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6378const _: () = {
6379 ["Size of GB_gameboy_internal_s__bindgen_ty_11"]
6380 [::core::mem::size_of::<GB_gameboy_internal_s__bindgen_ty_11>() - 91168usize];
6381 ["Alignment of GB_gameboy_internal_s__bindgen_ty_11"]
6382 [::core::mem::align_of::<GB_gameboy_internal_s__bindgen_ty_11>() - 8usize];
6383 ["Offset of field: GB_gameboy_internal_s__bindgen_ty_11::unsaved_section_start"][::core::mem::offset_of!(
6384 GB_gameboy_internal_s__bindgen_ty_11,
6385 unsaved_section_start
6386 ) - 0usize];
6387};
6388#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6389const _: () = {
6390 ["Size of GB_gameboy_internal_s"]
6391 [::core::mem::size_of::<GB_gameboy_internal_s>() - 125048usize];
6392 ["Alignment of GB_gameboy_internal_s"]
6393 [::core::mem::align_of::<GB_gameboy_internal_s>() - 8usize];
6394 ["Offset of field: GB_gameboy_internal_s::header_section_end"]
6395 [::core::mem::offset_of!(GB_gameboy_internal_s, header_section_end) - 8usize];
6396 ["Offset of field: GB_gameboy_internal_s::core_state_section_end"]
6397 [::core::mem::offset_of!(GB_gameboy_internal_s, core_state_section_end) - 160usize];
6398 ["Offset of field: GB_gameboy_internal_s::dma_section_end"]
6399 [::core::mem::offset_of!(GB_gameboy_internal_s, dma_section_end) - 184usize];
6400 ["Offset of field: GB_gameboy_internal_s::mbc_section_end"]
6401 [::core::mem::offset_of!(GB_gameboy_internal_s, mbc_section_end) - 280usize];
6402 ["Offset of field: GB_gameboy_internal_s::hram_section_end"]
6403 [::core::mem::offset_of!(GB_gameboy_internal_s, hram_section_end) - 536usize];
6404 ["Offset of field: GB_gameboy_internal_s::timing_section_end"]
6405 [::core::mem::offset_of!(GB_gameboy_internal_s, timing_section_end) - 600usize];
6406 ["Offset of field: GB_gameboy_internal_s::apu_section_end"]
6407 [::core::mem::offset_of!(GB_gameboy_internal_s, apu_section_end) - 704usize];
6408 ["Offset of field: GB_gameboy_internal_s::rtc_section_end"]
6409 [::core::mem::offset_of!(GB_gameboy_internal_s, rtc_section_end) - 736usize];
6410 ["Offset of field: GB_gameboy_internal_s::video_section_end"]
6411 [::core::mem::offset_of!(GB_gameboy_internal_s, video_section_end) - 1200usize];
6412 ["Offset of field: GB_gameboy_internal_s::accessory_section_end"]
6413 [::core::mem::offset_of!(GB_gameboy_internal_s, accessory_section_end) - 33880usize];
6414 ["Offset of field: GB_gameboy_internal_s::unsaved_section_end"]
6415 [::core::mem::offset_of!(GB_gameboy_internal_s, unsaved_section_end) - 125048usize];
6416};
6417#[repr(C)]
6418#[repr(align(8))]
6419#[derive(Debug, Copy, Clone)]
6420pub struct GB_gameboy_s {
6421 pub __internal: [u8; 125048usize],
6422}
6423#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6424const _: () = {
6425 ["Size of GB_gameboy_s"][::core::mem::size_of::<GB_gameboy_s>() - 125048usize];
6426 ["Alignment of GB_gameboy_s"][::core::mem::align_of::<GB_gameboy_s>() - 8usize];
6427 ["Offset of field: GB_gameboy_s::__internal"]
6428 [::core::mem::offset_of!(GB_gameboy_s, __internal) - 0usize];
6429};
6430unsafe extern "C" {
6431 pub fn GB_init(gb: *mut GB_gameboy_t, model: GB_model_t) -> *mut GB_gameboy_t;
6432}
6433unsafe extern "C" {
6434 pub fn GB_free(gb: *mut GB_gameboy_t);
6435}
6436unsafe extern "C" {
6437 pub fn GB_alloc() -> *mut GB_gameboy_t;
6438}
6439unsafe extern "C" {
6440 pub fn GB_dealloc(gb: *mut GB_gameboy_t);
6441}
6442unsafe extern "C" {
6443 pub fn GB_allocation_size() -> usize;
6444}
6445unsafe extern "C" {
6446 pub fn GB_is_inited(gb: *mut GB_gameboy_t) -> bool;
6447}
6448unsafe extern "C" {
6449 pub fn GB_is_cgb(gb: *const GB_gameboy_t) -> bool;
6450}
6451unsafe extern "C" {
6452 pub fn GB_is_cgb_in_cgb_mode(gb: *mut GB_gameboy_t) -> bool;
6453}
6454unsafe extern "C" {
6455 pub fn GB_is_sgb(gb: *mut GB_gameboy_t) -> bool;
6456}
6457unsafe extern "C" {
6458 pub fn GB_is_hle_sgb(gb: *mut GB_gameboy_t) -> bool;
6459}
6460unsafe extern "C" {
6461 pub fn GB_get_model(gb: *mut GB_gameboy_t) -> GB_model_t;
6462}
6463unsafe extern "C" {
6464 pub fn GB_reset(gb: *mut GB_gameboy_t);
6465}
6466unsafe extern "C" {
6467 pub fn GB_quick_reset(gb: *mut GB_gameboy_t);
6468}
6469unsafe extern "C" {
6470 pub fn GB_switch_model_and_reset(gb: *mut GB_gameboy_t, model: GB_model_t);
6471}
6472unsafe extern "C" {
6473 pub fn GB_run(gb: *mut GB_gameboy_t) -> ::core::ffi::c_uint;
6474}
6475unsafe extern "C" {
6476 pub fn GB_run_frame(gb: *mut GB_gameboy_t) -> u64;
6477}
6478pub const GB_direct_access_t_GB_DIRECT_ACCESS_ROM: GB_direct_access_t = 0;
6479pub const GB_direct_access_t_GB_DIRECT_ACCESS_RAM: GB_direct_access_t = 1;
6480pub const GB_direct_access_t_GB_DIRECT_ACCESS_CART_RAM: GB_direct_access_t = 2;
6481pub const GB_direct_access_t_GB_DIRECT_ACCESS_VRAM: GB_direct_access_t = 3;
6482pub const GB_direct_access_t_GB_DIRECT_ACCESS_HRAM: GB_direct_access_t = 4;
6483pub const GB_direct_access_t_GB_DIRECT_ACCESS_IO: GB_direct_access_t = 5;
6484pub const GB_direct_access_t_GB_DIRECT_ACCESS_BOOTROM: GB_direct_access_t = 6;
6485pub const GB_direct_access_t_GB_DIRECT_ACCESS_OAM: GB_direct_access_t = 7;
6486pub const GB_direct_access_t_GB_DIRECT_ACCESS_BGP: GB_direct_access_t = 8;
6487pub const GB_direct_access_t_GB_DIRECT_ACCESS_OBP: GB_direct_access_t = 9;
6488pub const GB_direct_access_t_GB_DIRECT_ACCESS_IE: GB_direct_access_t = 10;
6489pub const GB_direct_access_t_GB_DIRECT_ACCESS_ROM0: GB_direct_access_t = 11;
6490pub type GB_direct_access_t = ::core::ffi::c_uint;
6491unsafe extern "C" {
6492 pub fn GB_get_direct_access(
6493 gb: *mut GB_gameboy_t,
6494 access: GB_direct_access_t,
6495 size: *mut usize,
6496 bank: *mut u16,
6497 ) -> *mut ::core::ffi::c_void;
6498}
6499unsafe extern "C" {
6500 pub fn GB_get_registers(gb: *mut GB_gameboy_t) -> *mut GB_registers_t;
6501}
6502unsafe extern "C" {
6503 pub fn GB_get_user_data(gb: *mut GB_gameboy_t) -> *mut ::core::ffi::c_void;
6504}
6505unsafe extern "C" {
6506 pub fn GB_set_user_data(gb: *mut GB_gameboy_t, data: *mut ::core::ffi::c_void);
6507}
6508unsafe extern "C" {
6509 pub fn GB_load_boot_rom(
6510 gb: *mut GB_gameboy_t,
6511 path: *const ::core::ffi::c_char,
6512 ) -> ::core::ffi::c_int;
6513}
6514unsafe extern "C" {
6515 pub fn GB_load_boot_rom_from_buffer(
6516 gb: *mut GB_gameboy_t,
6517 buffer: *const ::core::ffi::c_uchar,
6518 size: usize,
6519 );
6520}
6521unsafe extern "C" {
6522 pub fn GB_load_rom(
6523 gb: *mut GB_gameboy_t,
6524 path: *const ::core::ffi::c_char,
6525 ) -> ::core::ffi::c_int;
6526}
6527unsafe extern "C" {
6528 pub fn GB_load_rom_from_buffer(gb: *mut GB_gameboy_t, buffer: *const u8, size: usize);
6529}
6530unsafe extern "C" {
6531 pub fn GB_load_isx(
6532 gb: *mut GB_gameboy_t,
6533 path: *const ::core::ffi::c_char,
6534 ) -> ::core::ffi::c_int;
6535}
6536unsafe extern "C" {
6537 pub fn GB_load_gbs_from_buffer(
6538 gb: *mut GB_gameboy_t,
6539 buffer: *const u8,
6540 size: usize,
6541 info: *mut GB_gbs_info_t,
6542 ) -> ::core::ffi::c_int;
6543}
6544unsafe extern "C" {
6545 pub fn GB_load_gbs(
6546 gb: *mut GB_gameboy_t,
6547 path: *const ::core::ffi::c_char,
6548 info: *mut GB_gbs_info_t,
6549 ) -> ::core::ffi::c_int;
6550}
6551unsafe extern "C" {
6552 pub fn GB_gbs_switch_track(gb: *mut GB_gameboy_t, track: u8);
6553}
6554unsafe extern "C" {
6555 pub fn GB_save_battery_size(gb: *mut GB_gameboy_t) -> ::core::ffi::c_int;
6556}
6557unsafe extern "C" {
6558 pub fn GB_save_battery_to_buffer(
6559 gb: *mut GB_gameboy_t,
6560 buffer: *mut u8,
6561 size: usize,
6562 ) -> ::core::ffi::c_int;
6563}
6564unsafe extern "C" {
6565 pub fn GB_save_battery(
6566 gb: *mut GB_gameboy_t,
6567 path: *const ::core::ffi::c_char,
6568 ) -> ::core::ffi::c_int;
6569}
6570unsafe extern "C" {
6571 pub fn GB_load_battery_from_buffer(gb: *mut GB_gameboy_t, buffer: *const u8, size: usize);
6572}
6573unsafe extern "C" {
6574 pub fn GB_load_battery(
6575 gb: *mut GB_gameboy_t,
6576 path: *const ::core::ffi::c_char,
6577 ) -> ::core::ffi::c_int;
6578}
6579unsafe extern "C" {
6580 pub fn GB_set_turbo_mode(gb: *mut GB_gameboy_t, on: bool, no_frame_skip: bool);
6581}
6582unsafe extern "C" {
6583 pub fn GB_set_turbo_cap(gb: *mut GB_gameboy_t, multiplier: f64);
6584}
6585unsafe extern "C" {
6586 pub fn GB_set_rendering_disabled(gb: *mut GB_gameboy_t, disabled: bool);
6587}
6588unsafe extern "C" {
6589 pub fn GB_log(gb: *mut GB_gameboy_t, fmt: *const ::core::ffi::c_char, ...);
6590}
6591unsafe extern "C" {
6592 pub fn GB_attributed_log(
6593 gb: *mut GB_gameboy_t,
6594 attributes: GB_log_attributes_t,
6595 fmt: *const ::core::ffi::c_char,
6596 ...
6597 );
6598}
6599unsafe extern "C" {
6600 pub fn GB_get_pixels_output(gb: *mut GB_gameboy_t) -> *mut u32;
6601}
6602unsafe extern "C" {
6603 pub fn GB_set_border_mode(gb: *mut GB_gameboy_t, border_mode: GB_border_mode_t);
6604}
6605unsafe extern "C" {
6606 pub fn GB_set_infrared_input(gb: *mut GB_gameboy_t, state: bool);
6607}
6608unsafe extern "C" {
6609 pub fn GB_set_log_callback(gb: *mut GB_gameboy_t, callback: GB_log_callback_t);
6610}
6611unsafe extern "C" {
6612 pub fn GB_set_input_callback(gb: *mut GB_gameboy_t, callback: GB_input_callback_t);
6613}
6614unsafe extern "C" {
6615 pub fn GB_set_async_input_callback(gb: *mut GB_gameboy_t, callback: GB_input_callback_t);
6616}
6617unsafe extern "C" {
6618 pub fn GB_set_infrared_callback(gb: *mut GB_gameboy_t, callback: GB_infrared_callback_t);
6619}
6620unsafe extern "C" {
6621 pub fn GB_set_rumble_callback(gb: *mut GB_gameboy_t, callback: GB_rumble_callback_t);
6622}
6623unsafe extern "C" {
6624 pub fn GB_set_boot_rom_load_callback(
6625 gb: *mut GB_gameboy_t,
6626 callback: GB_boot_rom_load_callback_t,
6627 );
6628}
6629unsafe extern "C" {
6630 pub fn GB_set_execution_callback(gb: *mut GB_gameboy_t, callback: GB_execution_callback_t);
6631}
6632unsafe extern "C" {
6633 pub fn GB_set_lcd_line_callback(gb: *mut GB_gameboy_t, callback: GB_lcd_line_callback_t);
6634}
6635unsafe extern "C" {
6636 pub fn GB_set_lcd_status_callback(gb: *mut GB_gameboy_t, callback: GB_lcd_status_callback_t);
6637}
6638unsafe extern "C" {
6639 pub fn GB_set_serial_transfer_bit_start_callback(
6640 gb: *mut GB_gameboy_t,
6641 callback: GB_serial_transfer_bit_start_callback_t,
6642 );
6643}
6644unsafe extern "C" {
6645 pub fn GB_set_serial_transfer_bit_end_callback(
6646 gb: *mut GB_gameboy_t,
6647 callback: GB_serial_transfer_bit_end_callback_t,
6648 );
6649}
6650unsafe extern "C" {
6651 pub fn GB_serial_get_data_bit(gb: *mut GB_gameboy_t) -> bool;
6652}
6653unsafe extern "C" {
6654 pub fn GB_serial_set_data_bit(gb: *mut GB_gameboy_t, data: bool);
6655}
6656unsafe extern "C" {
6657 pub fn GB_disconnect_serial(gb: *mut GB_gameboy_t);
6658}
6659unsafe extern "C" {
6660 pub fn GB_get_built_in_accessory(gb: *mut GB_gameboy_t) -> GB_accessory_t;
6661}
6662unsafe extern "C" {
6663 pub fn GB_rom_supports_alarms(gb: *mut GB_gameboy_t) -> bool;
6664}
6665unsafe extern "C" {
6666 pub fn GB_time_to_alarm(gb: *mut GB_gameboy_t) -> ::core::ffi::c_uint;
6667}
6668unsafe extern "C" {
6669 pub fn GB_has_accelerometer(gb: *mut GB_gameboy_t) -> bool;
6670}
6671unsafe extern "C" {
6672 pub fn GB_set_accelerometer_values(gb: *mut GB_gameboy_t, x: f64, y: f64);
6673}
6674unsafe extern "C" {
6675 pub fn GB_set_open_bus_decay_time(gb: *mut GB_gameboy_t, decay: u32);
6676}
6677unsafe extern "C" {
6678 pub fn GB_set_joyp_write_callback(gb: *mut GB_gameboy_t, callback: GB_joyp_write_callback_t);
6679}
6680unsafe extern "C" {
6681 pub fn GB_set_icd_pixel_callback(gb: *mut GB_gameboy_t, callback: GB_icd_pixel_callback_t);
6682}
6683unsafe extern "C" {
6684 pub fn GB_set_icd_hreset_callback(gb: *mut GB_gameboy_t, callback: GB_icd_hreset_callback_t);
6685}
6686unsafe extern "C" {
6687 pub fn GB_set_icd_vreset_callback(gb: *mut GB_gameboy_t, callback: GB_icd_vreset_callback_t);
6688}
6689unsafe extern "C" {
6690 pub fn GB_get_clock_rate(gb: *mut GB_gameboy_t) -> u32;
6691}
6692unsafe extern "C" {
6693 pub fn GB_get_unmultiplied_clock_rate(gb: *mut GB_gameboy_t) -> u32;
6694}
6695unsafe extern "C" {
6696 pub fn GB_set_clock_multiplier(gb: *mut GB_gameboy_t, multiplier: f64);
6697}
6698unsafe extern "C" {
6699 pub fn GB_get_rom_title(gb: *mut GB_gameboy_t, title: *mut ::core::ffi::c_char);
6700}
6701unsafe extern "C" {
6702 pub fn GB_get_rom_crc32(gb: *mut GB_gameboy_t) -> u32;
6703}