void direct_mono_sample16_handler(void) { uae_u32 data0 = audio_channel[0].current_sample; uae_u32 data1 = audio_channel[1].current_sample; uae_u32 data2 = audio_channel[2].current_sample; uae_u32 data3 = audio_channel[3].current_sample; DO_CHANNEL_1 (data0, 0); DO_CHANNEL_1 (data1, 1); DO_CHANNEL_1 (data2, 2); DO_CHANNEL_1 (data3, 3); data0 &= audio_channel[0].adk_mask; data1 &= audio_channel[1].adk_mask; data2 &= audio_channel[2].adk_mask; data3 &= audio_channel[3].adk_mask; data0 += data1; data0 += data2; data0 += data3; { uae_u32 data = SBASEVAL16(2) + data0; FINISH_DATA(16, 2); _farnspokew(direct_sndbufpt, data); direct_sndbufpt += 2; } direct_check_sound_buffers(); eventtab[ev_sample].evtime = cycles + sample_evtime; eventtab[ev_sample].oldcycles = cycles; }
void mywrite(unsigned char *s) { int p; while ((*s) && (x_pos < 0)) { x_pos++; s++; } p = SCRN_ADDR(x_pos, y_pos); _farsetsel(dos_seg); while ((*s) && (x_pos < screen_w)) { _farnspokew(p, (attrib<<8) | *s); p += 2; x_pos++; s++; } while (*s) { x_pos++; s++; } }
/* * Display msg with color at coordinates (y, x) */ void ossdsp(int y, int x, int color, char *s) { if (bios_flag) { __dpmi_regs regs; while (*s) { ossloc(y, x++); regs.h.ah = B_WRITECHAR; regs.h.al = *s++; regs.h.bh = video_page; regs.h.bl = color; regs.x.cx = 1; /* count = 1 */ __dpmi_int(0x10, ®s); } } else { union vcell vc; unsigned long vp; char *p = s; vp = scrbase + ((y * 80 + x) << 1); vc.ca.vattr = color; _farsetsel(_go32_conventional_mem_selector()); while (*p) { vc.ca.vchar = *p++; _farnspokew(vp, vc.s); vp += 2; } ossloc(y, x + (p - s - (*s ? 1 : 0))); } }
void fb_hFarMemSetW(unsigned short selector, unsigned long dest, unsigned short word_to_set, size_t words) { unsigned long addr = dest; int i; _farsetsel(selector); for (i = 0; i < words; i++, addr += 2) { _farnspokew(addr, word_to_set); } }
void del_to_eol() { int c = MAX(x_pos, 0); int p = SCRN_ADDR(c, y_pos); _farsetsel(dos_seg); while (c++ < screen_w) { _farnspokew(p, attrib<<8); p += 2; } }