Guest User

Untitled

a guest
Nov 30th, 2013
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 163.72 KB | None | 0 0
  1. /*
  2.  
  3. Cave CV1000 hardware
  4.  
  5. Games by Cave ID number:
  6.  
  7. CA011 Mushihime-Sama
  8. CA012 Ibara
  9. CA012B Ibara Kuro Black Label
  10. CA013 Espgaluda II
  11. CA014 Pink Sweets: Ibara Sorekara
  12. CA015 Mushihime-Sama Futari
  13. CA015B Mushihime-Sama Futari Black Label
  14. CA016 Muchi Muchi Pork!
  15. CA017 Deathsmiles
  16. CA017B Deathsmiles Mega Black Label
  17. CA019 Do-Don-Pachi Dai-Fukkatsu
  18. CA019B Do-Don-Pachi Dai-Fukkatsu Black Label
  19. CA021 Akai Katana
  20.  
  21. CMDL01 Medal Mahjong Moukari Bancho
  22.  
  23. Note: CA018 - DoDonPachi Dai-Ou-Jou Tamashii on PGM2 platform
  24. CA020 - Deathsmiles II: Makai no Merry Christmas on unknown custom platform
  25.  
  26. PCB CV1000-B / CV1000-D
  27. +--------------------------------------------+
  28. | |
  29. | |
  30. | |
  31. | VOL |
  32. | |
  33. +-+ +-----+ +-----+ X3 |
  34. | | U24 | | U23 | |
  35. +-+ +-----+ +-----+ +------+ |
  36. | |Yamaha| |
  37. | U25* U26* |YMZ770| |
  38. | | | |
  39. |J D5 +------+ |
  40. |A D2 |
  41. |M D3 +-----+ +-----+ |
  42. |M D4 P2* | U7 | | U6 | |
  43. |A D1 +-----+ +-----+ |
  44. | +-------+ |
  45. |C |P4 JTAG| |
  46. |o +-------+ +-------+ |
  47. |n |Altera | +--+ |
  48. |n D6 |Cyclone| | | |
  49. |e X1 S1 | | |U1| |
  50. |c S3 +---------+ +-------+ | | |
  51. |t | | +--+ |
  52. |e | Hitachi | |
  53. |r | | S2 |
  54. | | SH3 | +-----------------+ |
  55. | | | | P3 | |
  56. | +---------+ +-----------------+ |
  57. +-+ X2 |
  58. | +--+ +--+ +---+ U27 |
  59. +-+ | | | | |U13| |
  60. |+-+ |U2| |U4| +---+ |
  61. ||P| | | | | __ |
  62. ||8| U12* +--+ +--+ U10 / \ |
  63. |+-+ |C126| |
  64. | P5* P7* \__/ |
  65. +--------------------------------------------+
  66.  
  67. * Denotes not populated
  68.  
  69. CPU: Hitachi 6417709S SH3 clocked at 102.4MHz (12.800MHz * 8)
  70. Sound: Yamaha YMZ770C-F clocked at 16.384MHz
  71. Other: Altera Cyclone EP1C12 FPGA
  72. Altera EPM7032 (MAX 7000 Series) at U13
  73.  
  74. OSC:
  75. X1 12.800MHz (SH3 clock derived from this)
  76. X2 32.768kHz (Used by the RTC)
  77. X3 16.384MHz (Yamaha YMZ770C-F clock)
  78.  
  79. Memory:
  80. U6 (SDRAM) MT46V16M16 ? 4 MBit x 16 x 4 banks, RAM (256 MBit)
  81. U7 (SDRAM) MT46V16M16 ? 4 MBit x 16 x 4 banks, RAM (256 MBit)
  82. U1 (SDRAM) MT48LC2M32 ? 512K x 32 x 4 banks, (64 MBit) for CV1000-B
  83. U1 (SDRAM) IS42S32400 - 1024K x 32 x 4 banks, (128 MBit) for CV1000-D
  84.  
  85. Roms:
  86. U4 (FLASH) 29LV160BB 16M-Bit CMOS 3.0V, Boot device, FPGA bit file, main program code for CV1000-B
  87. U4 (FLASH) S29JL032H 32M-Bit CMOS 3.0V, Boot device, FPGA bit file, main program code for CV1000-D
  88. U2 (FLASH) K9F1G08U0M 128M x 8 Bit / 64M x 16 Bit NAND. Graphics data.
  89. U23-U24 (FLASH) MBM 29DL321, 32M-Bit CMOS 3.0V. Sound data.
  90. U25-U26 (FLASH) MBM 29DL321, not populated
  91.  
  92. Battery:
  93. C126 CR2450, Powers the RTC (Real Time Clock) U10. Look at the garden clock in Ibara. NOT present on CV1000-D
  94.  
  95. Dipswitches & Push Buttons:
  96. S1 (DIL SWITCH) Half Pitch DIL Switch x 1, function unknown
  97. S2 (DIL SWITCH) Half Pitch DIL Switch x 4, SW1=Setup, other switches unknown
  98. S3 (MICRO PUSH BUTTON) Test switch, same as on the JAMMA connector
  99. .
  100. Connectors:
  101. P2 (IDC CONNECTOR 20 PIN) function unknown, P2 is not always mounted
  102. P4 (IDC CONNECTOR 14 PIN) JTAG connector
  103. P8 (IDC CONNECTOR 10 PIN) Advanced User Debugger
  104. P3 (CONNECTOR) Most likely an expansion port, P3 is not always mounted
  105. P5 (CONNECTOR) D9 serial connector. Used for the mahjong Touchscreen titles. Also mounted on early Mushihime-Sama PCB's
  106. P7 (CONNECTOR) Network port pinout. Never seen mounted on any PCB.
  107.  
  108. Misc:
  109. U27 (SUPERVISOR) MAX 690S 3.0V Microprocessor Supervisory Circuit.
  110. U10 (RTC & EEPROM) RTC 9701, Serial RTC Module with EEPROM 4 kbit (256x16 bit), controlled by Altera EPM7032 U13.
  111. U12 (RS-232 TRANCEIVER) MAX 3244E RS-232 Tranceiver, only mounted when P5 is mounted.
  112. D1-D6 (LED) Status LED's. D6 lights up at power on then shuts off, D2 indicates coinage.
  113.  
  114. Note: * The Altera EPM7032 usually stamped / labeled with the Cave game ID number as listed above.
  115. * Actual flash ROMs will vary by manufacturer but will be compatible with flash ROM listed.
  116. * The CV1000-D revision PCB has double the RAM at U1, double the ROM at U4 and no battery.
  117. The CV1000-D is used for Dodonpachi Daifukkatsu and later games. Commonly referred to as SH3B PCB.
  118.  
  119. Information by The Sheep, rtw, Ex-Cyber, BrianT & Guru
  120.  
  121. ------------------------------------------------------
  122.  
  123. To enter service mode in most cases hold down 0 (Service 2) for a few seconds
  124. (I believe it's the test button on the PCB)
  125. Some games also use the test dipswitch as an alternative method.
  126.  
  127. ToDo:
  128.  
  129. Improve Blending precision?
  130. - I'm not sure what precision the original HW mixes with, source data is 555 RGB with 1 bit transparency (16-bits)
  131. and the real VRAM is also clearly in this format. The Alpha values supplied however are 8bpp, and the 'Tint'
  132. values use 0x20 for 'normal' (not 0x1f)
  133.  
  134. Overall screen brightness / contrast (see test mode)
  135. - Could convert ram back to 16-bit and use a palette lookup at the final blit.. probably easiest / quickest.
  136.  
  137. Touchscreen
  138. - Used for mmmbanc, needs SH3 serial support.
  139.  
  140. Remaining Video issues
  141. - mmpork startup screen flicker - the FOR USE IN JAPAN screen doesn't appear on the real PCB until after the graphics are fully loaded, it still displays 'please wait' until that point.
  142. - is the use of the 'scroll' registers 100% correct? (related to above?)
  143. - Sometimes the 'sprites' in mushisam lag by a frame vs the 'backgrounds' is this a timing problem, does the real game do it?
  144.  
  145. Speedups
  146. - Blitter is already tightly optimized
  147. - Need SH3 recompiler?
  148.  
  149. */
  150.  
  151. #include "emu.h"
  152. #include "cpu/sh4/sh4.h"
  153. #include "cpu/sh4/sh3comn.h"
  154. #include "profiler.h"
  155. #include "machine/rtc9701.h"
  156. #include "sound/ymz770.h"
  157. #include "drivlgcy.h"
  158. #include "mcfglgcy.h"
  159. #include "scrlegcy.h"
  160.  
  161. static UINT64* cavesh3_ram;
  162. static UINT16* cavesh3_ram16;
  163. static UINT16* cavesh3_ram16_copy = 0;
  164.  
  165.  
  166.  
  167.  
  168. class cavesh3_state : public driver_device
  169. {
  170. public:
  171. cavesh3_state(const machine_config &mconfig, device_type type, const char *tag)
  172. : driver_device(mconfig, type, tag) { }
  173.  
  174. UINT8* flashregion;
  175. UINT8* flashwritemap;
  176.  
  177. osd_work_queue * queue; /* work queue */
  178. osd_work_item * blitter_request;
  179.  
  180. // blit timing
  181. emu_timer *cavesh3_blitter_delay_timer;
  182. int blitter_busy;
  183.  
  184. // read/write methods
  185. DECLARE_WRITE8_MEMBER(ibara_flash_io_w);
  186. DECLARE_WRITE8_MEMBER(flash_addr_w);
  187. DECLARE_WRITE8_MEMBER(flash_cmd_w);
  188. DECLARE_WRITE8_MEMBER(flash_data_w);
  189. DECLARE_WRITE8_MEMBER(serial_rtc_eeprom_w);
  190. DECLARE_WRITE8_MEMBER(flash_enab_w);
  191. DECLARE_WRITE32_MEMBER(cavesh3_blitter_w);
  192. DECLARE_WRITE32_MEMBER(cavesh_gfx_exec_w);
  193. //DECLARE_WRITE64_MEMBER(ibara_fpga_w);
  194. //DECLARE_WRITE64_MEMBER(cavesh3_nop_write);
  195. DECLARE_READ8_MEMBER(ibara_flash_io_r);
  196. DECLARE_READ8_MEMBER(flash_io_r);
  197. DECLARE_READ8_MEMBER(serial_rtc_eeprom_r);
  198. //DECLARE_READ8_MEMBER(flash_ready_r);
  199. DECLARE_READ32_MEMBER(cavesh3_blitter_r);
  200. DECLARE_READ32_MEMBER(cavesh_gfx_ready_r);
  201. DECLARE_READ64_MEMBER(ibara_flash_port_e_r);
  202. DECLARE_READ64_MEMBER(ibara_fpga_r);
  203. INTERRUPT_GEN_MEMBER(cavesh3_interrupt);
  204.  
  205. // Driver init methods
  206. DECLARE_DRIVER_INIT(mushisam);
  207. DECLARE_DRIVER_INIT(mushisama);
  208. DECLARE_DRIVER_INIT(espgal2);
  209. };
  210.  
  211. /***************************************************************************
  212. Video Hardware
  213. ***************************************************************************/
  214.  
  215. UINT8 cavesh3_colrtable[0x20][0x40];
  216. UINT8 cavesh3_colrtable_rev[0x20][0x40];
  217. UINT8 cavesh3_colrtable_add[0x20][0x20];
  218. struct _clr_t
  219. {
  220. UINT8 b,g,r,t;
  221. };
  222.  
  223.  
  224.  
  225. typedef struct _clr_t clr_t;
  226.  
  227. union colour_t
  228. {
  229. clr_t trgb;
  230. UINT32 u32;
  231. };
  232.  
  233.  
  234.  
  235. // r5g5b5 ro clr_t
  236. INLINE void pen_to_clr(UINT32 pen, clr_t *clr)
  237. {
  238. // --t- ---- rrrr r--- gggg g--- bbbb b--- format
  239. clr->r = (pen >> (16+3));// & 0x1f;
  240. clr->g = (pen >> (8+3));// & 0x1f;
  241. clr->b = (pen >> 3);// & 0x1f;
  242. }
  243.  
  244.  
  245. // convert separate r,g,b biases (0..80..ff) to clr_t (-1f..0..1f)
  246. INLINE void tint_to_clr(UINT8 r, UINT8 g, UINT8 b, clr_t *clr)
  247. {
  248. clr->r = r>>2;
  249. clr->g = g>>2;
  250. clr->b = b>>2;
  251. }
  252.  
  253. #if 0
  254. INLINE void clamp_clr(clr_t *clr)
  255. {
  256. if (clr->r > 0x1f) clr->r = 0x1f;
  257. if (clr->g > 0x1f) clr->g = 0x1f;
  258. if (clr->b > 0x1f) clr->b = 0x1f;
  259. }
  260. #endif
  261.  
  262. // clr_t to r5g5b5
  263. INLINE UINT32 clr_to_pen(const clr_t *clr)
  264. {
  265. // --t- ---- rrrr r--- gggg g--- bbbb b--- format
  266. return (clr->r << (16+3)) | (clr->g << (8+3)) | (clr->b << 3);
  267. }
  268.  
  269.  
  270.  
  271. // add clrs
  272. INLINE void clr_add_with_clr_mul_fixed(clr_t *clr, const clr_t *clr0, const UINT8 mulfixed_val, const clr_t *mulfixed_clr0)
  273. {
  274. clr->r = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable[(mulfixed_clr0->r)][mulfixed_val]];
  275. clr->g = cavesh3_colrtable_add[clr0->g][cavesh3_colrtable[(mulfixed_clr0->g)][mulfixed_val]];
  276. clr->b = cavesh3_colrtable_add[clr0->b][cavesh3_colrtable[(mulfixed_clr0->b)][mulfixed_val]];
  277. }
  278.  
  279. INLINE void clr_add_with_clr_mul_3param(clr_t *clr, const clr_t *clr0, const clr_t *clr1, const clr_t *clr2)
  280. {
  281. clr->r = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable[(clr2->r)][(clr1->r)]];
  282. clr->g = cavesh3_colrtable_add[clr0->g][cavesh3_colrtable[(clr2->g)][(clr1->g)]];
  283. clr->b = cavesh3_colrtable_add[clr0->b][cavesh3_colrtable[(clr2->b)][(clr1->b)]];
  284. }
  285.  
  286. INLINE void clr_add_with_clr_square(clr_t *clr, const clr_t *clr0, const clr_t *clr1)
  287. {
  288. clr->r = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable[(clr1->r)][(clr1->r)]];
  289. clr->g = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable[(clr1->g)][(clr1->g)]];
  290. clr->b = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable[(clr1->b)][(clr1->b)]];
  291. }
  292.  
  293. INLINE void clr_add_with_clr_mul_fixed_rev(clr_t *clr, const clr_t *clr0, const UINT8 val, const clr_t *clr1)
  294. {
  295. clr->r = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable_rev[val][(clr1->r)]];
  296. clr->g = cavesh3_colrtable_add[clr0->g][cavesh3_colrtable_rev[val][(clr1->g)]];
  297. clr->b = cavesh3_colrtable_add[clr0->b][cavesh3_colrtable_rev[val][(clr1->b)]];
  298. }
  299.  
  300. INLINE void clr_add_with_clr_mul_rev_3param(clr_t *clr, const clr_t *clr0, const clr_t *clr1, const clr_t *clr2)
  301. {
  302. clr->r = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable_rev[(clr2->r)][(clr1->r)]];
  303. clr->g = cavesh3_colrtable_add[clr0->g][cavesh3_colrtable_rev[(clr2->g)][(clr1->g)]];
  304. clr->b = cavesh3_colrtable_add[clr0->b][cavesh3_colrtable_rev[(clr2->b)][(clr1->b)]];
  305. }
  306.  
  307. INLINE void clr_add_with_clr_mul_rev_square(clr_t *clr, const clr_t *clr0, const clr_t *clr1)
  308. {
  309. clr->r = cavesh3_colrtable_add[clr0->r][cavesh3_colrtable_rev[(clr1->r)][(clr1->r)]];
  310. clr->g = cavesh3_colrtable_add[clr0->g][cavesh3_colrtable_rev[(clr1->g)][(clr1->g)]];
  311. clr->b = cavesh3_colrtable_add[clr0->b][cavesh3_colrtable_rev[(clr1->b)][(clr1->b)]];
  312. }
  313.  
  314.  
  315. INLINE void clr_add(clr_t *clr, const clr_t *clr0, const clr_t *clr1)
  316. {
  317. // use pre-clamped lookup table
  318. clr->r = cavesh3_colrtable_add[clr0->r][clr1->r];
  319. clr->g = cavesh3_colrtable_add[clr0->g][clr1->g];
  320. clr->b = cavesh3_colrtable_add[clr0->b][clr1->b];
  321. }
  322.  
  323. // multiply clrs
  324. INLINE void clr_mul(clr_t *clr0, const clr_t *clr1)
  325. {
  326. clr0->r = cavesh3_colrtable[(clr0->r)][(clr1->r)];
  327. clr0->g = cavesh3_colrtable[(clr0->g)][(clr1->g)];
  328. clr0->b = cavesh3_colrtable[(clr0->b)][(clr1->b)];
  329. }
  330.  
  331. INLINE void clr_square(clr_t *clr0, const clr_t *clr1)
  332. {
  333. clr0->r = cavesh3_colrtable[(clr1->r)][(clr1->r)];
  334. clr0->g = cavesh3_colrtable[(clr1->g)][(clr1->g)];
  335. clr0->b = cavesh3_colrtable[(clr1->b)][(clr1->b)];
  336. }
  337.  
  338. INLINE void clr_mul_3param(clr_t *clr0, const clr_t *clr1, const clr_t *clr2)
  339. {
  340. clr0->r = cavesh3_colrtable[(clr2->r)][(clr1->r)];
  341. clr0->g = cavesh3_colrtable[(clr2->g)][(clr1->g)];
  342. clr0->b = cavesh3_colrtable[(clr2->b)][(clr1->b)];
  343. }
  344.  
  345. INLINE void clr_mul_rev(clr_t *clr0, const clr_t *clr1)
  346. {
  347. clr0->r = cavesh3_colrtable_rev[(clr0->r)][(clr1->r)];
  348. clr0->g = cavesh3_colrtable_rev[(clr0->g)][(clr1->g)];
  349. clr0->b = cavesh3_colrtable_rev[(clr0->b)][(clr1->b)];
  350. }
  351.  
  352. INLINE void clr_mul_rev_square(clr_t *clr0, const clr_t *clr1)
  353. {
  354. clr0->r = cavesh3_colrtable_rev[(clr1->r)][(clr1->r)];
  355. clr0->g = cavesh3_colrtable_rev[(clr1->g)][(clr1->g)];
  356. clr0->b = cavesh3_colrtable_rev[(clr1->b)][(clr1->b)];
  357. }
  358.  
  359.  
  360. INLINE void clr_mul_rev_3param(clr_t *clr0, const clr_t *clr1, const clr_t *clr2)
  361. {
  362. clr0->r = cavesh3_colrtable_rev[(clr2->r)][(clr1->r)];
  363. clr0->g = cavesh3_colrtable_rev[(clr2->g)][(clr1->g)];
  364. clr0->b = cavesh3_colrtable_rev[(clr2->b)][(clr1->b)];
  365. }
  366.  
  367. INLINE void clr_mul_fixed(clr_t *clr, const UINT8 val, const clr_t *clr0)
  368. {
  369. clr->r = cavesh3_colrtable[val][(clr0->r)];
  370. clr->g = cavesh3_colrtable[val][(clr0->g)];
  371. clr->b = cavesh3_colrtable[val][(clr0->b)];
  372. }
  373.  
  374. INLINE void clr_mul_fixed_rev(clr_t *clr, const UINT8 val, const clr_t *clr0)
  375. {
  376. clr->r = cavesh3_colrtable_rev[val][(clr0->r)];
  377. clr->g = cavesh3_colrtable_rev[val][(clr0->g)];
  378. clr->b = cavesh3_colrtable_rev[val][(clr0->b)];
  379. }
  380.  
  381. INLINE void clr_copy(clr_t *clr, const clr_t *clr0)
  382. {
  383. clr->r = clr0->r;
  384. clr->g = clr0->g;
  385. clr->b = clr0->b;
  386. }
  387.  
  388.  
  389.  
  390. // (1|s|d) * s_factor * s + (1|s|d) * d_factor * d
  391. // 0: +alpha
  392. // 1: +source
  393. // 2: +dest
  394. // 3: *
  395. // 4: -alpha
  396. // 5: -source
  397. // 6: -dest
  398. // 7: *
  399.  
  400.  
  401.  
  402. static UINT32 cavesh_gfx_addr;
  403. static UINT32 cavesh_gfx_scroll_0_x, cavesh_gfx_scroll_0_y;
  404. static UINT32 cavesh_gfx_scroll_1_x, cavesh_gfx_scroll_1_y;
  405.  
  406. static UINT32 cavesh_gfx_addr_shadowcopy;
  407. static UINT32 cavesh_gfx_scroll_0_x_shadowcopy, cavesh_gfx_scroll_0_y_shadowcopy;
  408. static UINT32 cavesh_gfx_scroll_1_x_shadowcopy, cavesh_gfx_scroll_1_y_shadowcopy;
  409.  
  410. static UINT64 cave_blit_delay;
  411.  
  412.  
  413. static int cavesh_gfx_size;
  414. static bitmap_rgb32 *cavesh_bitmaps;
  415. static rectangle cavesh_clip;
  416.  
  417. static VIDEO_START( cavesh3 )
  418. {
  419. cavesh_gfx_size = 0x2000 * 0x1000;
  420. cavesh_bitmaps = auto_bitmap_rgb32_alloc(machine, 0x2000, 0x1000);
  421. cavesh_clip = cavesh_bitmaps->cliprect();
  422. }
  423.  
  424.  
  425.  
  426. #define TRANSPARENT 1
  427.  
  428. #define FUNCNAME draw_sprite_notint_plain
  429. #include "video/csh3blit.inc"
  430. #undef FUNCNAME
  431.  
  432.  
  433. #define BLENDED
  434.  
  435. #define _SMODE 0
  436. #define _DMODE 0
  437. #define FUNCNAME draw_sprite_notint_s0_d0
  438. #include "video/csh3blit.inc"
  439. #undef FUNCNAME
  440. #undef _SMODE
  441. #undef _DMODE
  442.  
  443. #define _SMODE 1
  444. #define _DMODE 0
  445. #define FUNCNAME draw_sprite_notint_s1_d0
  446. #include "video/csh3blit.inc"
  447. #undef FUNCNAME
  448. #undef _SMODE
  449. #undef _DMODE
  450.  
  451. #define _SMODE 2
  452. #define _DMODE 0
  453. #define FUNCNAME draw_sprite_notint_s2_d0
  454. #include "video/csh3blit.inc"
  455. #undef FUNCNAME
  456. #undef _SMODE
  457. #undef _DMODE
  458.  
  459. #define _SMODE 3
  460. #define _DMODE 0
  461. #define FUNCNAME draw_sprite_notint_s3_d0
  462. #include "video/csh3blit.inc"
  463. #undef FUNCNAME
  464. #undef _SMODE
  465. #undef _DMODE
  466.  
  467. #define _SMODE 4
  468. #define _DMODE 0
  469. #define FUNCNAME draw_sprite_notint_s4_d0
  470. #include "video/csh3blit.inc"
  471. #undef FUNCNAME
  472. #undef _SMODE
  473. #undef _DMODE
  474.  
  475. #define _SMODE 5
  476. #define _DMODE 0
  477. #define FUNCNAME draw_sprite_notint_s5_d0
  478. #include "video/csh3blit.inc"
  479. #undef FUNCNAME
  480. #undef _SMODE
  481. #undef _DMODE
  482.  
  483. #define _SMODE 6
  484. #define _DMODE 0
  485. #define FUNCNAME draw_sprite_notint_s6_d0
  486. #include "video/csh3blit.inc"
  487. #undef FUNCNAME
  488. #undef _SMODE
  489. #undef _DMODE
  490.  
  491. #define _SMODE 7
  492. #define _DMODE 0
  493. #define FUNCNAME draw_sprite_notint_s7_d0
  494. #include "video/csh3blit.inc"
  495. #undef FUNCNAME
  496. #undef _SMODE
  497. #undef _DMODE
  498.  
  499.  
  500. #define _SMODE 0
  501. #define _DMODE 1
  502. #define FUNCNAME draw_sprite_notint_s0_d1
  503. #include "video/csh3blit.inc"
  504. #undef FUNCNAME
  505. #undef _SMODE
  506. #undef _DMODE
  507.  
  508. #define _SMODE 1
  509. #define _DMODE 1
  510. #define FUNCNAME draw_sprite_notint_s1_d1
  511. #include "video/csh3blit.inc"
  512. #undef FUNCNAME
  513. #undef _SMODE
  514. #undef _DMODE
  515.  
  516. #define _SMODE 2
  517. #define _DMODE 1
  518. #define FUNCNAME draw_sprite_notint_s2_d1
  519. #include "video/csh3blit.inc"
  520. #undef FUNCNAME
  521. #undef _SMODE
  522. #undef _DMODE
  523.  
  524. #define _SMODE 3
  525. #define _DMODE 1
  526. #define FUNCNAME draw_sprite_notint_s3_d1
  527. #include "video/csh3blit.inc"
  528. #undef FUNCNAME
  529. #undef _SMODE
  530. #undef _DMODE
  531.  
  532. #define _SMODE 4
  533. #define _DMODE 1
  534. #define FUNCNAME draw_sprite_notint_s4_d1
  535. #include "video/csh3blit.inc"
  536. #undef FUNCNAME
  537. #undef _SMODE
  538. #undef _DMODE
  539.  
  540. #define _SMODE 5
  541. #define _DMODE 1
  542. #define FUNCNAME draw_sprite_notint_s5_d1
  543. #include "video/csh3blit.inc"
  544. #undef FUNCNAME
  545. #undef _SMODE
  546. #undef _DMODE
  547.  
  548. #define _SMODE 6
  549. #define _DMODE 1
  550. #define FUNCNAME draw_sprite_notint_s6_d1
  551. #include "video/csh3blit.inc"
  552. #undef FUNCNAME
  553. #undef _SMODE
  554. #undef _DMODE
  555.  
  556. #define _SMODE 7
  557. #define _DMODE 1
  558. #define FUNCNAME draw_sprite_notint_s7_d1
  559. #include "video/csh3blit.inc"
  560. #undef FUNCNAME
  561. #undef _SMODE
  562. #undef _DMODE
  563.  
  564.  
  565. #define _SMODE 0
  566. #define _DMODE 2
  567. #define FUNCNAME draw_sprite_notint_s0_d2
  568. #include "video/csh3blit.inc"
  569. #undef FUNCNAME
  570. #undef _SMODE
  571. #undef _DMODE
  572.  
  573. #define _SMODE 1
  574. #define _DMODE 2
  575. #define FUNCNAME draw_sprite_notint_s1_d2
  576. #include "video/csh3blit.inc"
  577. #undef FUNCNAME
  578. #undef _SMODE
  579. #undef _DMODE
  580.  
  581. #define _SMODE 2
  582. #define _DMODE 2
  583. #define FUNCNAME draw_sprite_notint_s2_d2
  584. #include "video/csh3blit.inc"
  585. #undef FUNCNAME
  586. #undef _SMODE
  587. #undef _DMODE
  588.  
  589. #define _SMODE 3
  590. #define _DMODE 2
  591. #define FUNCNAME draw_sprite_notint_s3_d2
  592. #include "video/csh3blit.inc"
  593. #undef FUNCNAME
  594. #undef _SMODE
  595. #undef _DMODE
  596.  
  597. #define _SMODE 4
  598. #define _DMODE 2
  599. #define FUNCNAME draw_sprite_notint_s4_d2
  600. #include "video/csh3blit.inc"
  601. #undef FUNCNAME
  602. #undef _SMODE
  603. #undef _DMODE
  604.  
  605. #define _SMODE 5
  606. #define _DMODE 2
  607. #define FUNCNAME draw_sprite_notint_s5_d2
  608. #include "video/csh3blit.inc"
  609. #undef FUNCNAME
  610. #undef _SMODE
  611. #undef _DMODE
  612.  
  613. #define _SMODE 6
  614. #define _DMODE 2
  615. #define FUNCNAME draw_sprite_notint_s6_d2
  616. #include "video/csh3blit.inc"
  617. #undef FUNCNAME
  618. #undef _SMODE
  619. #undef _DMODE
  620.  
  621. #define _SMODE 7
  622. #define _DMODE 2
  623. #define FUNCNAME draw_sprite_notint_s7_d2
  624. #include "video/csh3blit.inc"
  625. #undef FUNCNAME
  626. #undef _SMODE
  627. #undef _DMODE
  628.  
  629.  
  630. #define _SMODE 0
  631. #define _DMODE 3
  632. #define FUNCNAME draw_sprite_notint_s0_d3
  633. #include "video/csh3blit.inc"
  634. #undef FUNCNAME
  635. #undef _SMODE
  636. #undef _DMODE
  637.  
  638. #define _SMODE 1
  639. #define _DMODE 3
  640. #define FUNCNAME draw_sprite_notint_s1_d3
  641. #include "video/csh3blit.inc"
  642. #undef FUNCNAME
  643. #undef _SMODE
  644. #undef _DMODE
  645.  
  646. #define _SMODE 2
  647. #define _DMODE 3
  648. #define FUNCNAME draw_sprite_notint_s2_d3
  649. #include "video/csh3blit.inc"
  650. #undef FUNCNAME
  651. #undef _SMODE
  652. #undef _DMODE
  653.  
  654. #define _SMODE 3
  655. #define _DMODE 3
  656. #define FUNCNAME draw_sprite_notint_s3_d3
  657. #include "video/csh3blit.inc"
  658. #undef FUNCNAME
  659. #undef _SMODE
  660. #undef _DMODE
  661.  
  662. #define _SMODE 4
  663. #define _DMODE 3
  664. #define FUNCNAME draw_sprite_notint_s4_d3
  665. #include "video/csh3blit.inc"
  666. #undef FUNCNAME
  667. #undef _SMODE
  668. #undef _DMODE
  669.  
  670. #define _SMODE 5
  671. #define _DMODE 3
  672. #define FUNCNAME draw_sprite_notint_s5_d3
  673. #include "video/csh3blit.inc"
  674. #undef FUNCNAME
  675. #undef _SMODE
  676. #undef _DMODE
  677.  
  678. #define _SMODE 6
  679. #define _DMODE 3
  680. #define FUNCNAME draw_sprite_notint_s6_d3
  681. #include "video/csh3blit.inc"
  682. #undef FUNCNAME
  683. #undef _SMODE
  684. #undef _DMODE
  685.  
  686. #define _SMODE 7
  687. #define _DMODE 3
  688. #define FUNCNAME draw_sprite_notint_s7_d3
  689. #include "video/csh3blit.inc"
  690. #undef FUNCNAME
  691. #undef _SMODE
  692. #undef _DMODE
  693.  
  694.  
  695. #define _SMODE 0
  696. #define _DMODE 4
  697. #define FUNCNAME draw_sprite_notint_s0_d4
  698. #include "video/csh3blit.inc"
  699. #undef FUNCNAME
  700. #undef _SMODE
  701. #undef _DMODE
  702.  
  703. #define _SMODE 1
  704. #define _DMODE 4
  705. #define FUNCNAME draw_sprite_notint_s1_d4
  706. #include "video/csh3blit.inc"
  707. #undef FUNCNAME
  708. #undef _SMODE
  709. #undef _DMODE
  710.  
  711. #define _SMODE 2
  712. #define _DMODE 4
  713. #define FUNCNAME draw_sprite_notint_s2_d4
  714. #include "video/csh3blit.inc"
  715. #undef FUNCNAME
  716. #undef _SMODE
  717. #undef _DMODE
  718.  
  719. #define _SMODE 3
  720. #define _DMODE 4
  721. #define FUNCNAME draw_sprite_notint_s3_d4
  722. #include "video/csh3blit.inc"
  723. #undef FUNCNAME
  724. #undef _SMODE
  725. #undef _DMODE
  726.  
  727. #define _SMODE 4
  728. #define _DMODE 4
  729. #define FUNCNAME draw_sprite_notint_s4_d4
  730. #include "video/csh3blit.inc"
  731. #undef FUNCNAME
  732. #undef _SMODE
  733. #undef _DMODE
  734.  
  735. #define _SMODE 5
  736. #define _DMODE 4
  737. #define FUNCNAME draw_sprite_notint_s5_d4
  738. #include "video/csh3blit.inc"
  739. #undef FUNCNAME
  740. #undef _SMODE
  741. #undef _DMODE
  742.  
  743. #define _SMODE 6
  744. #define _DMODE 4
  745. #define FUNCNAME draw_sprite_notint_s6_d4
  746. #include "video/csh3blit.inc"
  747. #undef FUNCNAME
  748. #undef _SMODE
  749. #undef _DMODE
  750.  
  751. #define _SMODE 7
  752. #define _DMODE 4
  753. #define FUNCNAME draw_sprite_notint_s7_d4
  754. #include "video/csh3blit.inc"
  755. #undef FUNCNAME
  756. #undef _SMODE
  757. #undef _DMODE
  758.  
  759.  
  760. #define _SMODE 0
  761. #define _DMODE 5
  762. #define FUNCNAME draw_sprite_notint_s0_d5
  763. #include "video/csh3blit.inc"
  764. #undef FUNCNAME
  765. #undef _SMODE
  766. #undef _DMODE
  767.  
  768. #define _SMODE 1
  769. #define _DMODE 5
  770. #define FUNCNAME draw_sprite_notint_s1_d5
  771. #include "video/csh3blit.inc"
  772. #undef FUNCNAME
  773. #undef _SMODE
  774. #undef _DMODE
  775.  
  776. #define _SMODE 2
  777. #define _DMODE 5
  778. #define FUNCNAME draw_sprite_notint_s2_d5
  779. #include "video/csh3blit.inc"
  780. #undef FUNCNAME
  781. #undef _SMODE
  782. #undef _DMODE
  783.  
  784. #define _SMODE 3
  785. #define _DMODE 5
  786. #define FUNCNAME draw_sprite_notint_s3_d5
  787. #include "video/csh3blit.inc"
  788. #undef FUNCNAME
  789. #undef _SMODE
  790. #undef _DMODE
  791.  
  792. #define _SMODE 4
  793. #define _DMODE 5
  794. #define FUNCNAME draw_sprite_notint_s4_d5
  795. #include "video/csh3blit.inc"
  796. #undef FUNCNAME
  797. #undef _SMODE
  798. #undef _DMODE
  799.  
  800. #define _SMODE 5
  801. #define _DMODE 5
  802. #define FUNCNAME draw_sprite_notint_s5_d5
  803. #include "video/csh3blit.inc"
  804. #undef FUNCNAME
  805. #undef _SMODE
  806. #undef _DMODE
  807.  
  808. #define _SMODE 6
  809. #define _DMODE 5
  810. #define FUNCNAME draw_sprite_notint_s6_d5
  811. #include "video/csh3blit.inc"
  812. #undef FUNCNAME
  813. #undef _SMODE
  814. #undef _DMODE
  815.  
  816. #define _SMODE 7
  817. #define _DMODE 5
  818. #define FUNCNAME draw_sprite_notint_s7_d5
  819. #include "video/csh3blit.inc"
  820. #undef FUNCNAME
  821. #undef _SMODE
  822. #undef _DMODE
  823.  
  824.  
  825. #define _SMODE 0
  826. #define _DMODE 6
  827. #define FUNCNAME draw_sprite_notint_s0_d6
  828. #include "video/csh3blit.inc"
  829. #undef FUNCNAME
  830. #undef _SMODE
  831. #undef _DMODE
  832.  
  833. #define _SMODE 1
  834. #define _DMODE 6
  835. #define FUNCNAME draw_sprite_notint_s1_d6
  836. #include "video/csh3blit.inc"
  837. #undef FUNCNAME
  838. #undef _SMODE
  839. #undef _DMODE
  840.  
  841. #define _SMODE 2
  842. #define _DMODE 6
  843. #define FUNCNAME draw_sprite_notint_s2_d6
  844. #include "video/csh3blit.inc"
  845. #undef FUNCNAME
  846. #undef _SMODE
  847. #undef _DMODE
  848.  
  849. #define _SMODE 3
  850. #define _DMODE 6
  851. #define FUNCNAME draw_sprite_notint_s3_d6
  852. #include "video/csh3blit.inc"
  853. #undef FUNCNAME
  854. #undef _SMODE
  855. #undef _DMODE
  856.  
  857. #define _SMODE 4
  858. #define _DMODE 6
  859. #define FUNCNAME draw_sprite_notint_s4_d6
  860. #include "video/csh3blit.inc"
  861. #undef FUNCNAME
  862. #undef _SMODE
  863. #undef _DMODE
  864.  
  865. #define _SMODE 5
  866. #define _DMODE 6
  867. #define FUNCNAME draw_sprite_notint_s5_d6
  868. #include "video/csh3blit.inc"
  869. #undef FUNCNAME
  870. #undef _SMODE
  871. #undef _DMODE
  872.  
  873. #define _SMODE 6
  874. #define _DMODE 6
  875. #define FUNCNAME draw_sprite_notint_s6_d6
  876. #include "video/csh3blit.inc"
  877. #undef FUNCNAME
  878. #undef _SMODE
  879. #undef _DMODE
  880.  
  881. #define _SMODE 7
  882. #define _DMODE 6
  883. #define FUNCNAME draw_sprite_notint_s7_d6
  884. #include "video/csh3blit.inc"
  885. #undef FUNCNAME
  886. #undef _SMODE
  887. #undef _DMODE
  888.  
  889.  
  890. #define _SMODE 0
  891. #define _DMODE 7
  892. #define FUNCNAME draw_sprite_notint_s0_d7
  893. #include "video/csh3blit.inc"
  894. #undef FUNCNAME
  895. #undef _SMODE
  896. #undef _DMODE
  897.  
  898. #define _SMODE 1
  899. #define _DMODE 7
  900. #define FUNCNAME draw_sprite_notint_s1_d7
  901. #include "video/csh3blit.inc"
  902. #undef FUNCNAME
  903. #undef _SMODE
  904. #undef _DMODE
  905.  
  906. #define _SMODE 2
  907. #define _DMODE 7
  908. #define FUNCNAME draw_sprite_notint_s2_d7
  909. #include "video/csh3blit.inc"
  910. #undef FUNCNAME
  911. #undef _SMODE
  912. #undef _DMODE
  913.  
  914. #define _SMODE 3
  915. #define _DMODE 7
  916. #define FUNCNAME draw_sprite_notint_s3_d7
  917. #include "video/csh3blit.inc"
  918. #undef FUNCNAME
  919. #undef _SMODE
  920. #undef _DMODE
  921.  
  922. #define _SMODE 4
  923. #define _DMODE 7
  924. #define FUNCNAME draw_sprite_notint_s4_d7
  925. #include "video/csh3blit.inc"
  926. #undef FUNCNAME
  927. #undef _SMODE
  928. #undef _DMODE
  929.  
  930. #define _SMODE 5
  931. #define _DMODE 7
  932. #define FUNCNAME draw_sprite_notint_s5_d7
  933. #include "video/csh3blit.inc"
  934. #undef FUNCNAME
  935. #undef _SMODE
  936. #undef _DMODE
  937.  
  938. #define _SMODE 6
  939. #define _DMODE 7
  940. #define FUNCNAME draw_sprite_notint_s6_d7
  941. #include "video/csh3blit.inc"
  942. #undef FUNCNAME
  943. #undef _SMODE
  944. #undef _DMODE
  945.  
  946. #define _SMODE 7
  947. #define _DMODE 7
  948. #define FUNCNAME draw_sprite_notint_s7_d7
  949. #include "video/csh3blit.inc"
  950. #undef FUNCNAME
  951. #undef _SMODE
  952. #undef _DMODE
  953.  
  954. #undef BLENDED
  955.  
  956. #undef TRANSPARENT
  957. #define TRANSPARENT 0
  958.  
  959. #define FUNCNAME draw_sprite_notint_opaque_plain
  960. #include "video/csh3blit.inc"
  961. #undef FUNCNAME
  962.  
  963. #define BLENDED
  964.  
  965. #define _SMODE 0
  966. #define _DMODE 0
  967. #define FUNCNAME draw_sprite_notint_opaque_s0_d0
  968. #include "video/csh3blit.inc"
  969. #undef FUNCNAME
  970. #undef _SMODE
  971. #undef _DMODE
  972.  
  973. #define _SMODE 1
  974. #define _DMODE 0
  975. #define FUNCNAME draw_sprite_notint_opaque_s1_d0
  976. #include "video/csh3blit.inc"
  977. #undef FUNCNAME
  978. #undef _SMODE
  979. #undef _DMODE
  980.  
  981. #define _SMODE 2
  982. #define _DMODE 0
  983. #define FUNCNAME draw_sprite_notint_opaque_s2_d0
  984. #include "video/csh3blit.inc"
  985. #undef FUNCNAME
  986. #undef _SMODE
  987. #undef _DMODE
  988.  
  989. #define _SMODE 3
  990. #define _DMODE 0
  991. #define FUNCNAME draw_sprite_notint_opaque_s3_d0
  992. #include "video/csh3blit.inc"
  993. #undef FUNCNAME
  994. #undef _SMODE
  995. #undef _DMODE
  996.  
  997. #define _SMODE 4
  998. #define _DMODE 0
  999. #define FUNCNAME draw_sprite_notint_opaque_s4_d0
  1000. #include "video/csh3blit.inc"
  1001. #undef FUNCNAME
  1002. #undef _SMODE
  1003. #undef _DMODE
  1004.  
  1005. #define _SMODE 5
  1006. #define _DMODE 0
  1007. #define FUNCNAME draw_sprite_notint_opaque_s5_d0
  1008. #include "video/csh3blit.inc"
  1009. #undef FUNCNAME
  1010. #undef _SMODE
  1011. #undef _DMODE
  1012.  
  1013. #define _SMODE 6
  1014. #define _DMODE 0
  1015. #define FUNCNAME draw_sprite_notint_opaque_s6_d0
  1016. #include "video/csh3blit.inc"
  1017. #undef FUNCNAME
  1018. #undef _SMODE
  1019. #undef _DMODE
  1020.  
  1021. #define _SMODE 7
  1022. #define _DMODE 0
  1023. #define FUNCNAME draw_sprite_notint_opaque_s7_d0
  1024. #include "video/csh3blit.inc"
  1025. #undef FUNCNAME
  1026. #undef _SMODE
  1027. #undef _DMODE
  1028.  
  1029.  
  1030. #define _SMODE 0
  1031. #define _DMODE 1
  1032. #define FUNCNAME draw_sprite_notint_opaque_s0_d1
  1033. #include "video/csh3blit.inc"
  1034. #undef FUNCNAME
  1035. #undef _SMODE
  1036. #undef _DMODE
  1037.  
  1038. #define _SMODE 1
  1039. #define _DMODE 1
  1040. #define FUNCNAME draw_sprite_notint_opaque_s1_d1
  1041. #include "video/csh3blit.inc"
  1042. #undef FUNCNAME
  1043. #undef _SMODE
  1044. #undef _DMODE
  1045.  
  1046. #define _SMODE 2
  1047. #define _DMODE 1
  1048. #define FUNCNAME draw_sprite_notint_opaque_s2_d1
  1049. #include "video/csh3blit.inc"
  1050. #undef FUNCNAME
  1051. #undef _SMODE
  1052. #undef _DMODE
  1053.  
  1054. #define _SMODE 3
  1055. #define _DMODE 1
  1056. #define FUNCNAME draw_sprite_notint_opaque_s3_d1
  1057. #include "video/csh3blit.inc"
  1058. #undef FUNCNAME
  1059. #undef _SMODE
  1060. #undef _DMODE
  1061.  
  1062. #define _SMODE 4
  1063. #define _DMODE 1
  1064. #define FUNCNAME draw_sprite_notint_opaque_s4_d1
  1065. #include "video/csh3blit.inc"
  1066. #undef FUNCNAME
  1067. #undef _SMODE
  1068. #undef _DMODE
  1069.  
  1070. #define _SMODE 5
  1071. #define _DMODE 1
  1072. #define FUNCNAME draw_sprite_notint_opaque_s5_d1
  1073. #include "video/csh3blit.inc"
  1074. #undef FUNCNAME
  1075. #undef _SMODE
  1076. #undef _DMODE
  1077.  
  1078. #define _SMODE 6
  1079. #define _DMODE 1
  1080. #define FUNCNAME draw_sprite_notint_opaque_s6_d1
  1081. #include "video/csh3blit.inc"
  1082. #undef FUNCNAME
  1083. #undef _SMODE
  1084. #undef _DMODE
  1085.  
  1086. #define _SMODE 7
  1087. #define _DMODE 1
  1088. #define FUNCNAME draw_sprite_notint_opaque_s7_d1
  1089. #include "video/csh3blit.inc"
  1090. #undef FUNCNAME
  1091. #undef _SMODE
  1092. #undef _DMODE
  1093.  
  1094.  
  1095. #define _SMODE 0
  1096. #define _DMODE 2
  1097. #define FUNCNAME draw_sprite_notint_opaque_s0_d2
  1098. #include "video/csh3blit.inc"
  1099. #undef FUNCNAME
  1100. #undef _SMODE
  1101. #undef _DMODE
  1102.  
  1103. #define _SMODE 1
  1104. #define _DMODE 2
  1105. #define FUNCNAME draw_sprite_notint_opaque_s1_d2
  1106. #include "video/csh3blit.inc"
  1107. #undef FUNCNAME
  1108. #undef _SMODE
  1109. #undef _DMODE
  1110.  
  1111. #define _SMODE 2
  1112. #define _DMODE 2
  1113. #define FUNCNAME draw_sprite_notint_opaque_s2_d2
  1114. #include "video/csh3blit.inc"
  1115. #undef FUNCNAME
  1116. #undef _SMODE
  1117. #undef _DMODE
  1118.  
  1119. #define _SMODE 3
  1120. #define _DMODE 2
  1121. #define FUNCNAME draw_sprite_notint_opaque_s3_d2
  1122. #include "video/csh3blit.inc"
  1123. #undef FUNCNAME
  1124. #undef _SMODE
  1125. #undef _DMODE
  1126.  
  1127. #define _SMODE 4
  1128. #define _DMODE 2
  1129. #define FUNCNAME draw_sprite_notint_opaque_s4_d2
  1130. #include "video/csh3blit.inc"
  1131. #undef FUNCNAME
  1132. #undef _SMODE
  1133. #undef _DMODE
  1134.  
  1135. #define _SMODE 5
  1136. #define _DMODE 2
  1137. #define FUNCNAME draw_sprite_notint_opaque_s5_d2
  1138. #include "video/csh3blit.inc"
  1139. #undef FUNCNAME
  1140. #undef _SMODE
  1141. #undef _DMODE
  1142.  
  1143. #define _SMODE 6
  1144. #define _DMODE 2
  1145. #define FUNCNAME draw_sprite_notint_opaque_s6_d2
  1146. #include "video/csh3blit.inc"
  1147. #undef FUNCNAME
  1148. #undef _SMODE
  1149. #undef _DMODE
  1150.  
  1151. #define _SMODE 7
  1152. #define _DMODE 2
  1153. #define FUNCNAME draw_sprite_notint_opaque_s7_d2
  1154. #include "video/csh3blit.inc"
  1155. #undef FUNCNAME
  1156. #undef _SMODE
  1157. #undef _DMODE
  1158.  
  1159.  
  1160. #define _SMODE 0
  1161. #define _DMODE 3
  1162. #define FUNCNAME draw_sprite_notint_opaque_s0_d3
  1163. #include "video/csh3blit.inc"
  1164. #undef FUNCNAME
  1165. #undef _SMODE
  1166. #undef _DMODE
  1167.  
  1168. #define _SMODE 1
  1169. #define _DMODE 3
  1170. #define FUNCNAME draw_sprite_notint_opaque_s1_d3
  1171. #include "video/csh3blit.inc"
  1172. #undef FUNCNAME
  1173. #undef _SMODE
  1174. #undef _DMODE
  1175.  
  1176. #define _SMODE 2
  1177. #define _DMODE 3
  1178. #define FUNCNAME draw_sprite_notint_opaque_s2_d3
  1179. #include "video/csh3blit.inc"
  1180. #undef FUNCNAME
  1181. #undef _SMODE
  1182. #undef _DMODE
  1183.  
  1184. #define _SMODE 3
  1185. #define _DMODE 3
  1186. #define FUNCNAME draw_sprite_notint_opaque_s3_d3
  1187. #include "video/csh3blit.inc"
  1188. #undef FUNCNAME
  1189. #undef _SMODE
  1190. #undef _DMODE
  1191.  
  1192. #define _SMODE 4
  1193. #define _DMODE 3
  1194. #define FUNCNAME draw_sprite_notint_opaque_s4_d3
  1195. #include "video/csh3blit.inc"
  1196. #undef FUNCNAME
  1197. #undef _SMODE
  1198. #undef _DMODE
  1199.  
  1200. #define _SMODE 5
  1201. #define _DMODE 3
  1202. #define FUNCNAME draw_sprite_notint_opaque_s5_d3
  1203. #include "video/csh3blit.inc"
  1204. #undef FUNCNAME
  1205. #undef _SMODE
  1206. #undef _DMODE
  1207.  
  1208. #define _SMODE 6
  1209. #define _DMODE 3
  1210. #define FUNCNAME draw_sprite_notint_opaque_s6_d3
  1211. #include "video/csh3blit.inc"
  1212. #undef FUNCNAME
  1213. #undef _SMODE
  1214. #undef _DMODE
  1215.  
  1216. #define _SMODE 7
  1217. #define _DMODE 3
  1218. #define FUNCNAME draw_sprite_notint_opaque_s7_d3
  1219. #include "video/csh3blit.inc"
  1220. #undef FUNCNAME
  1221. #undef _SMODE
  1222. #undef _DMODE
  1223.  
  1224.  
  1225. #define _SMODE 0
  1226. #define _DMODE 4
  1227. #define FUNCNAME draw_sprite_notint_opaque_s0_d4
  1228. #include "video/csh3blit.inc"
  1229. #undef FUNCNAME
  1230. #undef _SMODE
  1231. #undef _DMODE
  1232.  
  1233. #define _SMODE 1
  1234. #define _DMODE 4
  1235. #define FUNCNAME draw_sprite_notint_opaque_s1_d4
  1236. #include "video/csh3blit.inc"
  1237. #undef FUNCNAME
  1238. #undef _SMODE
  1239. #undef _DMODE
  1240.  
  1241. #define _SMODE 2
  1242. #define _DMODE 4
  1243. #define FUNCNAME draw_sprite_notint_opaque_s2_d4
  1244. #include "video/csh3blit.inc"
  1245. #undef FUNCNAME
  1246. #undef _SMODE
  1247. #undef _DMODE
  1248.  
  1249. #define _SMODE 3
  1250. #define _DMODE 4
  1251. #define FUNCNAME draw_sprite_notint_opaque_s3_d4
  1252. #include "video/csh3blit.inc"
  1253. #undef FUNCNAME
  1254. #undef _SMODE
  1255. #undef _DMODE
  1256.  
  1257. #define _SMODE 4
  1258. #define _DMODE 4
  1259. #define FUNCNAME draw_sprite_notint_opaque_s4_d4
  1260. #include "video/csh3blit.inc"
  1261. #undef FUNCNAME
  1262. #undef _SMODE
  1263. #undef _DMODE
  1264.  
  1265. #define _SMODE 5
  1266. #define _DMODE 4
  1267. #define FUNCNAME draw_sprite_notint_opaque_s5_d4
  1268. #include "video/csh3blit.inc"
  1269. #undef FUNCNAME
  1270. #undef _SMODE
  1271. #undef _DMODE
  1272.  
  1273. #define _SMODE 6
  1274. #define _DMODE 4
  1275. #define FUNCNAME draw_sprite_notint_opaque_s6_d4
  1276. #include "video/csh3blit.inc"
  1277. #undef FUNCNAME
  1278. #undef _SMODE
  1279. #undef _DMODE
  1280.  
  1281. #define _SMODE 7
  1282. #define _DMODE 4
  1283. #define FUNCNAME draw_sprite_notint_opaque_s7_d4
  1284. #include "video/csh3blit.inc"
  1285. #undef FUNCNAME
  1286. #undef _SMODE
  1287. #undef _DMODE
  1288.  
  1289.  
  1290. #define _SMODE 0
  1291. #define _DMODE 5
  1292. #define FUNCNAME draw_sprite_notint_opaque_s0_d5
  1293. #include "video/csh3blit.inc"
  1294. #undef FUNCNAME
  1295. #undef _SMODE
  1296. #undef _DMODE
  1297.  
  1298. #define _SMODE 1
  1299. #define _DMODE 5
  1300. #define FUNCNAME draw_sprite_notint_opaque_s1_d5
  1301. #include "video/csh3blit.inc"
  1302. #undef FUNCNAME
  1303. #undef _SMODE
  1304. #undef _DMODE
  1305.  
  1306. #define _SMODE 2
  1307. #define _DMODE 5
  1308. #define FUNCNAME draw_sprite_notint_opaque_s2_d5
  1309. #include "video/csh3blit.inc"
  1310. #undef FUNCNAME
  1311. #undef _SMODE
  1312. #undef _DMODE
  1313.  
  1314. #define _SMODE 3
  1315. #define _DMODE 5
  1316. #define FUNCNAME draw_sprite_notint_opaque_s3_d5
  1317. #include "video/csh3blit.inc"
  1318. #undef FUNCNAME
  1319. #undef _SMODE
  1320. #undef _DMODE
  1321.  
  1322. #define _SMODE 4
  1323. #define _DMODE 5
  1324. #define FUNCNAME draw_sprite_notint_opaque_s4_d5
  1325. #include "video/csh3blit.inc"
  1326. #undef FUNCNAME
  1327. #undef _SMODE
  1328. #undef _DMODE
  1329.  
  1330. #define _SMODE 5
  1331. #define _DMODE 5
  1332. #define FUNCNAME draw_sprite_notint_opaque_s5_d5
  1333. #include "video/csh3blit.inc"
  1334. #undef FUNCNAME
  1335. #undef _SMODE
  1336. #undef _DMODE
  1337.  
  1338. #define _SMODE 6
  1339. #define _DMODE 5
  1340. #define FUNCNAME draw_sprite_notint_opaque_s6_d5
  1341. #include "video/csh3blit.inc"
  1342. #undef FUNCNAME
  1343. #undef _SMODE
  1344. #undef _DMODE
  1345.  
  1346. #define _SMODE 7
  1347. #define _DMODE 5
  1348. #define FUNCNAME draw_sprite_notint_opaque_s7_d5
  1349. #include "video/csh3blit.inc"
  1350. #undef FUNCNAME
  1351. #undef _SMODE
  1352. #undef _DMODE
  1353.  
  1354.  
  1355. #define _SMODE 0
  1356. #define _DMODE 6
  1357. #define FUNCNAME draw_sprite_notint_opaque_s0_d6
  1358. #include "video/csh3blit.inc"
  1359. #undef FUNCNAME
  1360. #undef _SMODE
  1361. #undef _DMODE
  1362.  
  1363. #define _SMODE 1
  1364. #define _DMODE 6
  1365. #define FUNCNAME draw_sprite_notint_opaque_s1_d6
  1366. #include "video/csh3blit.inc"
  1367. #undef FUNCNAME
  1368. #undef _SMODE
  1369. #undef _DMODE
  1370.  
  1371. #define _SMODE 2
  1372. #define _DMODE 6
  1373. #define FUNCNAME draw_sprite_notint_opaque_s2_d6
  1374. #include "video/csh3blit.inc"
  1375. #undef FUNCNAME
  1376. #undef _SMODE
  1377. #undef _DMODE
  1378.  
  1379. #define _SMODE 3
  1380. #define _DMODE 6
  1381. #define FUNCNAME draw_sprite_notint_opaque_s3_d6
  1382. #include "video/csh3blit.inc"
  1383. #undef FUNCNAME
  1384. #undef _SMODE
  1385. #undef _DMODE
  1386.  
  1387. #define _SMODE 4
  1388. #define _DMODE 6
  1389. #define FUNCNAME draw_sprite_notint_opaque_s4_d6
  1390. #include "video/csh3blit.inc"
  1391. #undef FUNCNAME
  1392. #undef _SMODE
  1393. #undef _DMODE
  1394.  
  1395. #define _SMODE 5
  1396. #define _DMODE 6
  1397. #define FUNCNAME draw_sprite_notint_opaque_s5_d6
  1398. #include "video/csh3blit.inc"
  1399. #undef FUNCNAME
  1400. #undef _SMODE
  1401. #undef _DMODE
  1402.  
  1403. #define _SMODE 6
  1404. #define _DMODE 6
  1405. #define FUNCNAME draw_sprite_notint_opaque_s6_d6
  1406. #include "video/csh3blit.inc"
  1407. #undef FUNCNAME
  1408. #undef _SMODE
  1409. #undef _DMODE
  1410.  
  1411. #define _SMODE 7
  1412. #define _DMODE 6
  1413. #define FUNCNAME draw_sprite_notint_opaque_s7_d6
  1414. #include "video/csh3blit.inc"
  1415. #undef FUNCNAME
  1416. #undef _SMODE
  1417. #undef _DMODE
  1418.  
  1419.  
  1420. #define _SMODE 0
  1421. #define _DMODE 7
  1422. #define FUNCNAME draw_sprite_notint_opaque_s0_d7
  1423. #include "video/csh3blit.inc"
  1424. #undef FUNCNAME
  1425. #undef _SMODE
  1426. #undef _DMODE
  1427.  
  1428. #define _SMODE 1
  1429. #define _DMODE 7
  1430. #define FUNCNAME draw_sprite_notint_opaque_s1_d7
  1431. #include "video/csh3blit.inc"
  1432. #undef FUNCNAME
  1433. #undef _SMODE
  1434. #undef _DMODE
  1435.  
  1436. #define _SMODE 2
  1437. #define _DMODE 7
  1438. #define FUNCNAME draw_sprite_notint_opaque_s2_d7
  1439. #include "video/csh3blit.inc"
  1440. #undef FUNCNAME
  1441. #undef _SMODE
  1442. #undef _DMODE
  1443.  
  1444. #define _SMODE 3
  1445. #define _DMODE 7
  1446. #define FUNCNAME draw_sprite_notint_opaque_s3_d7
  1447. #include "video/csh3blit.inc"
  1448. #undef FUNCNAME
  1449. #undef _SMODE
  1450. #undef _DMODE
  1451.  
  1452. #define _SMODE 4
  1453. #define _DMODE 7
  1454. #define FUNCNAME draw_sprite_notint_opaque_s4_d7
  1455. #include "video/csh3blit.inc"
  1456. #undef FUNCNAME
  1457. #undef _SMODE
  1458. #undef _DMODE
  1459.  
  1460. #define _SMODE 5
  1461. #define _DMODE 7
  1462. #define FUNCNAME draw_sprite_notint_opaque_s5_d7
  1463. #include "video/csh3blit.inc"
  1464. #undef FUNCNAME
  1465. #undef _SMODE
  1466. #undef _DMODE
  1467.  
  1468. #define _SMODE 6
  1469. #define _DMODE 7
  1470. #define FUNCNAME draw_sprite_notint_opaque_s6_d7
  1471. #include "video/csh3blit.inc"
  1472. #undef FUNCNAME
  1473. #undef _SMODE
  1474. #undef _DMODE
  1475.  
  1476. #define _SMODE 7
  1477. #define _DMODE 7
  1478. #define FUNCNAME draw_sprite_notint_opaque_s7_d7
  1479. #include "video/csh3blit.inc"
  1480. #undef FUNCNAME
  1481. #undef _SMODE
  1482. #undef _DMODE
  1483.  
  1484. #undef BLENDED
  1485.  
  1486. #undef TRANSPARENT
  1487.  
  1488.  
  1489. // flipped X cases
  1490.  
  1491. #define FLIPX 1
  1492. #define TRANSPARENT 1
  1493.  
  1494. #define FUNCNAME draw_sprite_notint_flipx_plain
  1495. #include "video/csh3blit.inc"
  1496. #undef FUNCNAME
  1497.  
  1498.  
  1499. #define BLENDED
  1500.  
  1501. #define _SMODE 0
  1502. #define _DMODE 0
  1503. #define FUNCNAME draw_sprite_notint_flipx_s0_d0
  1504. #include "video/csh3blit.inc"
  1505. #undef FUNCNAME
  1506. #undef _SMODE
  1507. #undef _DMODE
  1508.  
  1509. #define _SMODE 1
  1510. #define _DMODE 0
  1511. #define FUNCNAME draw_sprite_notint_flipx_s1_d0
  1512. #include "video/csh3blit.inc"
  1513. #undef FUNCNAME
  1514. #undef _SMODE
  1515. #undef _DMODE
  1516.  
  1517. #define _SMODE 2
  1518. #define _DMODE 0
  1519. #define FUNCNAME draw_sprite_notint_flipx_s2_d0
  1520. #include "video/csh3blit.inc"
  1521. #undef FUNCNAME
  1522. #undef _SMODE
  1523. #undef _DMODE
  1524.  
  1525. #define _SMODE 3
  1526. #define _DMODE 0
  1527. #define FUNCNAME draw_sprite_notint_flipx_s3_d0
  1528. #include "video/csh3blit.inc"
  1529. #undef FUNCNAME
  1530. #undef _SMODE
  1531. #undef _DMODE
  1532.  
  1533. #define _SMODE 4
  1534. #define _DMODE 0
  1535. #define FUNCNAME draw_sprite_notint_flipx_s4_d0
  1536. #include "video/csh3blit.inc"
  1537. #undef FUNCNAME
  1538. #undef _SMODE
  1539. #undef _DMODE
  1540.  
  1541. #define _SMODE 5
  1542. #define _DMODE 0
  1543. #define FUNCNAME draw_sprite_notint_flipx_s5_d0
  1544. #include "video/csh3blit.inc"
  1545. #undef FUNCNAME
  1546. #undef _SMODE
  1547. #undef _DMODE
  1548.  
  1549. #define _SMODE 6
  1550. #define _DMODE 0
  1551. #define FUNCNAME draw_sprite_notint_flipx_s6_d0
  1552. #include "video/csh3blit.inc"
  1553. #undef FUNCNAME
  1554. #undef _SMODE
  1555. #undef _DMODE
  1556.  
  1557. #define _SMODE 7
  1558. #define _DMODE 0
  1559. #define FUNCNAME draw_sprite_notint_flipx_s7_d0
  1560. #include "video/csh3blit.inc"
  1561. #undef FUNCNAME
  1562. #undef _SMODE
  1563. #undef _DMODE
  1564.  
  1565.  
  1566. #define _SMODE 0
  1567. #define _DMODE 1
  1568. #define FUNCNAME draw_sprite_notint_flipx_s0_d1
  1569. #include "video/csh3blit.inc"
  1570. #undef FUNCNAME
  1571. #undef _SMODE
  1572. #undef _DMODE
  1573.  
  1574. #define _SMODE 1
  1575. #define _DMODE 1
  1576. #define FUNCNAME draw_sprite_notint_flipx_s1_d1
  1577. #include "video/csh3blit.inc"
  1578. #undef FUNCNAME
  1579. #undef _SMODE
  1580. #undef _DMODE
  1581.  
  1582. #define _SMODE 2
  1583. #define _DMODE 1
  1584. #define FUNCNAME draw_sprite_notint_flipx_s2_d1
  1585. #include "video/csh3blit.inc"
  1586. #undef FUNCNAME
  1587. #undef _SMODE
  1588. #undef _DMODE
  1589.  
  1590. #define _SMODE 3
  1591. #define _DMODE 1
  1592. #define FUNCNAME draw_sprite_notint_flipx_s3_d1
  1593. #include "video/csh3blit.inc"
  1594. #undef FUNCNAME
  1595. #undef _SMODE
  1596. #undef _DMODE
  1597.  
  1598. #define _SMODE 4
  1599. #define _DMODE 1
  1600. #define FUNCNAME draw_sprite_notint_flipx_s4_d1
  1601. #include "video/csh3blit.inc"
  1602. #undef FUNCNAME
  1603. #undef _SMODE
  1604. #undef _DMODE
  1605.  
  1606. #define _SMODE 5
  1607. #define _DMODE 1
  1608. #define FUNCNAME draw_sprite_notint_flipx_s5_d1
  1609. #include "video/csh3blit.inc"
  1610. #undef FUNCNAME
  1611. #undef _SMODE
  1612. #undef _DMODE
  1613.  
  1614. #define _SMODE 6
  1615. #define _DMODE 1
  1616. #define FUNCNAME draw_sprite_notint_flipx_s6_d1
  1617. #include "video/csh3blit.inc"
  1618. #undef FUNCNAME
  1619. #undef _SMODE
  1620. #undef _DMODE
  1621.  
  1622. #define _SMODE 7
  1623. #define _DMODE 1
  1624. #define FUNCNAME draw_sprite_notint_flipx_s7_d1
  1625. #include "video/csh3blit.inc"
  1626. #undef FUNCNAME
  1627. #undef _SMODE
  1628. #undef _DMODE
  1629.  
  1630.  
  1631. #define _SMODE 0
  1632. #define _DMODE 2
  1633. #define FUNCNAME draw_sprite_notint_flipx_s0_d2
  1634. #include "video/csh3blit.inc"
  1635. #undef FUNCNAME
  1636. #undef _SMODE
  1637. #undef _DMODE
  1638.  
  1639. #define _SMODE 1
  1640. #define _DMODE 2
  1641. #define FUNCNAME draw_sprite_notint_flipx_s1_d2
  1642. #include "video/csh3blit.inc"
  1643. #undef FUNCNAME
  1644. #undef _SMODE
  1645. #undef _DMODE
  1646.  
  1647. #define _SMODE 2
  1648. #define _DMODE 2
  1649. #define FUNCNAME draw_sprite_notint_flipx_s2_d2
  1650. #include "video/csh3blit.inc"
  1651. #undef FUNCNAME
  1652. #undef _SMODE
  1653. #undef _DMODE
  1654.  
  1655. #define _SMODE 3
  1656. #define _DMODE 2
  1657. #define FUNCNAME draw_sprite_notint_flipx_s3_d2
  1658. #include "video/csh3blit.inc"
  1659. #undef FUNCNAME
  1660. #undef _SMODE
  1661. #undef _DMODE
  1662.  
  1663. #define _SMODE 4
  1664. #define _DMODE 2
  1665. #define FUNCNAME draw_sprite_notint_flipx_s4_d2
  1666. #include "video/csh3blit.inc"
  1667. #undef FUNCNAME
  1668. #undef _SMODE
  1669. #undef _DMODE
  1670.  
  1671. #define _SMODE 5
  1672. #define _DMODE 2
  1673. #define FUNCNAME draw_sprite_notint_flipx_s5_d2
  1674. #include "video/csh3blit.inc"
  1675. #undef FUNCNAME
  1676. #undef _SMODE
  1677. #undef _DMODE
  1678.  
  1679. #define _SMODE 6
  1680. #define _DMODE 2
  1681. #define FUNCNAME draw_sprite_notint_flipx_s6_d2
  1682. #include "video/csh3blit.inc"
  1683. #undef FUNCNAME
  1684. #undef _SMODE
  1685. #undef _DMODE
  1686.  
  1687. #define _SMODE 7
  1688. #define _DMODE 2
  1689. #define FUNCNAME draw_sprite_notint_flipx_s7_d2
  1690. #include "video/csh3blit.inc"
  1691. #undef FUNCNAME
  1692. #undef _SMODE
  1693. #undef _DMODE
  1694.  
  1695.  
  1696. #define _SMODE 0
  1697. #define _DMODE 3
  1698. #define FUNCNAME draw_sprite_notint_flipx_s0_d3
  1699. #include "video/csh3blit.inc"
  1700. #undef FUNCNAME
  1701. #undef _SMODE
  1702. #undef _DMODE
  1703.  
  1704. #define _SMODE 1
  1705. #define _DMODE 3
  1706. #define FUNCNAME draw_sprite_notint_flipx_s1_d3
  1707. #include "video/csh3blit.inc"
  1708. #undef FUNCNAME
  1709. #undef _SMODE
  1710. #undef _DMODE
  1711.  
  1712. #define _SMODE 2
  1713. #define _DMODE 3
  1714. #define FUNCNAME draw_sprite_notint_flipx_s2_d3
  1715. #include "video/csh3blit.inc"
  1716. #undef FUNCNAME
  1717. #undef _SMODE
  1718. #undef _DMODE
  1719.  
  1720. #define _SMODE 3
  1721. #define _DMODE 3
  1722. #define FUNCNAME draw_sprite_notint_flipx_s3_d3
  1723. #include "video/csh3blit.inc"
  1724. #undef FUNCNAME
  1725. #undef _SMODE
  1726. #undef _DMODE
  1727.  
  1728. #define _SMODE 4
  1729. #define _DMODE 3
  1730. #define FUNCNAME draw_sprite_notint_flipx_s4_d3
  1731. #include "video/csh3blit.inc"
  1732. #undef FUNCNAME
  1733. #undef _SMODE
  1734. #undef _DMODE
  1735.  
  1736. #define _SMODE 5
  1737. #define _DMODE 3
  1738. #define FUNCNAME draw_sprite_notint_flipx_s5_d3
  1739. #include "video/csh3blit.inc"
  1740. #undef FUNCNAME
  1741. #undef _SMODE
  1742. #undef _DMODE
  1743.  
  1744. #define _SMODE 6
  1745. #define _DMODE 3
  1746. #define FUNCNAME draw_sprite_notint_flipx_s6_d3
  1747. #include "video/csh3blit.inc"
  1748. #undef FUNCNAME
  1749. #undef _SMODE
  1750. #undef _DMODE
  1751.  
  1752. #define _SMODE 7
  1753. #define _DMODE 3
  1754. #define FUNCNAME draw_sprite_notint_flipx_s7_d3
  1755. #include "video/csh3blit.inc"
  1756. #undef FUNCNAME
  1757. #undef _SMODE
  1758. #undef _DMODE
  1759.  
  1760.  
  1761. #define _SMODE 0
  1762. #define _DMODE 4
  1763. #define FUNCNAME draw_sprite_notint_flipx_s0_d4
  1764. #include "video/csh3blit.inc"
  1765. #undef FUNCNAME
  1766. #undef _SMODE
  1767. #undef _DMODE
  1768.  
  1769. #define _SMODE 1
  1770. #define _DMODE 4
  1771. #define FUNCNAME draw_sprite_notint_flipx_s1_d4
  1772. #include "video/csh3blit.inc"
  1773. #undef FUNCNAME
  1774. #undef _SMODE
  1775. #undef _DMODE
  1776.  
  1777. #define _SMODE 2
  1778. #define _DMODE 4
  1779. #define FUNCNAME draw_sprite_notint_flipx_s2_d4
  1780. #include "video/csh3blit.inc"
  1781. #undef FUNCNAME
  1782. #undef _SMODE
  1783. #undef _DMODE
  1784.  
  1785. #define _SMODE 3
  1786. #define _DMODE 4
  1787. #define FUNCNAME draw_sprite_notint_flipx_s3_d4
  1788. #include "video/csh3blit.inc"
  1789. #undef FUNCNAME
  1790. #undef _SMODE
  1791. #undef _DMODE
  1792.  
  1793. #define _SMODE 4
  1794. #define _DMODE 4
  1795. #define FUNCNAME draw_sprite_notint_flipx_s4_d4
  1796. #include "video/csh3blit.inc"
  1797. #undef FUNCNAME
  1798. #undef _SMODE
  1799. #undef _DMODE
  1800.  
  1801. #define _SMODE 5
  1802. #define _DMODE 4
  1803. #define FUNCNAME draw_sprite_notint_flipx_s5_d4
  1804. #include "video/csh3blit.inc"
  1805. #undef FUNCNAME
  1806. #undef _SMODE
  1807. #undef _DMODE
  1808.  
  1809. #define _SMODE 6
  1810. #define _DMODE 4
  1811. #define FUNCNAME draw_sprite_notint_flipx_s6_d4
  1812. #include "video/csh3blit.inc"
  1813. #undef FUNCNAME
  1814. #undef _SMODE
  1815. #undef _DMODE
  1816.  
  1817. #define _SMODE 7
  1818. #define _DMODE 4
  1819. #define FUNCNAME draw_sprite_notint_flipx_s7_d4
  1820. #include "video/csh3blit.inc"
  1821. #undef FUNCNAME
  1822. #undef _SMODE
  1823. #undef _DMODE
  1824.  
  1825.  
  1826. #define _SMODE 0
  1827. #define _DMODE 5
  1828. #define FUNCNAME draw_sprite_notint_flipx_s0_d5
  1829. #include "video/csh3blit.inc"
  1830. #undef FUNCNAME
  1831. #undef _SMODE
  1832. #undef _DMODE
  1833.  
  1834. #define _SMODE 1
  1835. #define _DMODE 5
  1836. #define FUNCNAME draw_sprite_notint_flipx_s1_d5
  1837. #include "video/csh3blit.inc"
  1838. #undef FUNCNAME
  1839. #undef _SMODE
  1840. #undef _DMODE
  1841.  
  1842. #define _SMODE 2
  1843. #define _DMODE 5
  1844. #define FUNCNAME draw_sprite_notint_flipx_s2_d5
  1845. #include "video/csh3blit.inc"
  1846. #undef FUNCNAME
  1847. #undef _SMODE
  1848. #undef _DMODE
  1849.  
  1850. #define _SMODE 3
  1851. #define _DMODE 5
  1852. #define FUNCNAME draw_sprite_notint_flipx_s3_d5
  1853. #include "video/csh3blit.inc"
  1854. #undef FUNCNAME
  1855. #undef _SMODE
  1856. #undef _DMODE
  1857.  
  1858. #define _SMODE 4
  1859. #define _DMODE 5
  1860. #define FUNCNAME draw_sprite_notint_flipx_s4_d5
  1861. #include "video/csh3blit.inc"
  1862. #undef FUNCNAME
  1863. #undef _SMODE
  1864. #undef _DMODE
  1865.  
  1866. #define _SMODE 5
  1867. #define _DMODE 5
  1868. #define FUNCNAME draw_sprite_notint_flipx_s5_d5
  1869. #include "video/csh3blit.inc"
  1870. #undef FUNCNAME
  1871. #undef _SMODE
  1872. #undef _DMODE
  1873.  
  1874. #define _SMODE 6
  1875. #define _DMODE 5
  1876. #define FUNCNAME draw_sprite_notint_flipx_s6_d5
  1877. #include "video/csh3blit.inc"
  1878. #undef FUNCNAME
  1879. #undef _SMODE
  1880. #undef _DMODE
  1881.  
  1882. #define _SMODE 7
  1883. #define _DMODE 5
  1884. #define FUNCNAME draw_sprite_notint_flipx_s7_d5
  1885. #include "video/csh3blit.inc"
  1886. #undef FUNCNAME
  1887. #undef _SMODE
  1888. #undef _DMODE
  1889.  
  1890.  
  1891. #define _SMODE 0
  1892. #define _DMODE 6
  1893. #define FUNCNAME draw_sprite_notint_flipx_s0_d6
  1894. #include "video/csh3blit.inc"
  1895. #undef FUNCNAME
  1896. #undef _SMODE
  1897. #undef _DMODE
  1898.  
  1899. #define _SMODE 1
  1900. #define _DMODE 6
  1901. #define FUNCNAME draw_sprite_notint_flipx_s1_d6
  1902. #include "video/csh3blit.inc"
  1903. #undef FUNCNAME
  1904. #undef _SMODE
  1905. #undef _DMODE
  1906.  
  1907. #define _SMODE 2
  1908. #define _DMODE 6
  1909. #define FUNCNAME draw_sprite_notint_flipx_s2_d6
  1910. #include "video/csh3blit.inc"
  1911. #undef FUNCNAME
  1912. #undef _SMODE
  1913. #undef _DMODE
  1914.  
  1915. #define _SMODE 3
  1916. #define _DMODE 6
  1917. #define FUNCNAME draw_sprite_notint_flipx_s3_d6
  1918. #include "video/csh3blit.inc"
  1919. #undef FUNCNAME
  1920. #undef _SMODE
  1921. #undef _DMODE
  1922.  
  1923. #define _SMODE 4
  1924. #define _DMODE 6
  1925. #define FUNCNAME draw_sprite_notint_flipx_s4_d6
  1926. #include "video/csh3blit.inc"
  1927. #undef FUNCNAME
  1928. #undef _SMODE
  1929. #undef _DMODE
  1930.  
  1931. #define _SMODE 5
  1932. #define _DMODE 6
  1933. #define FUNCNAME draw_sprite_notint_flipx_s5_d6
  1934. #include "video/csh3blit.inc"
  1935. #undef FUNCNAME
  1936. #undef _SMODE
  1937. #undef _DMODE
  1938.  
  1939. #define _SMODE 6
  1940. #define _DMODE 6
  1941. #define FUNCNAME draw_sprite_notint_flipx_s6_d6
  1942. #include "video/csh3blit.inc"
  1943. #undef FUNCNAME
  1944. #undef _SMODE
  1945. #undef _DMODE
  1946.  
  1947. #define _SMODE 7
  1948. #define _DMODE 6
  1949. #define FUNCNAME draw_sprite_notint_flipx_s7_d6
  1950. #include "video/csh3blit.inc"
  1951. #undef FUNCNAME
  1952. #undef _SMODE
  1953. #undef _DMODE
  1954.  
  1955.  
  1956. #define _SMODE 0
  1957. #define _DMODE 7
  1958. #define FUNCNAME draw_sprite_notint_flipx_s0_d7
  1959. #include "video/csh3blit.inc"
  1960. #undef FUNCNAME
  1961. #undef _SMODE
  1962. #undef _DMODE
  1963.  
  1964. #define _SMODE 1
  1965. #define _DMODE 7
  1966. #define FUNCNAME draw_sprite_notint_flipx_s1_d7
  1967. #include "video/csh3blit.inc"
  1968. #undef FUNCNAME
  1969. #undef _SMODE
  1970. #undef _DMODE
  1971.  
  1972. #define _SMODE 2
  1973. #define _DMODE 7
  1974. #define FUNCNAME draw_sprite_notint_flipx_s2_d7
  1975. #include "video/csh3blit.inc"
  1976. #undef FUNCNAME
  1977. #undef _SMODE
  1978. #undef _DMODE
  1979.  
  1980. #define _SMODE 3
  1981. #define _DMODE 7
  1982. #define FUNCNAME draw_sprite_notint_flipx_s3_d7
  1983. #include "video/csh3blit.inc"
  1984. #undef FUNCNAME
  1985. #undef _SMODE
  1986. #undef _DMODE
  1987.  
  1988. #define _SMODE 4
  1989. #define _DMODE 7
  1990. #define FUNCNAME draw_sprite_notint_flipx_s4_d7
  1991. #include "video/csh3blit.inc"
  1992. #undef FUNCNAME
  1993. #undef _SMODE
  1994. #undef _DMODE
  1995.  
  1996. #define _SMODE 5
  1997. #define _DMODE 7
  1998. #define FUNCNAME draw_sprite_notint_flipx_s5_d7
  1999. #include "video/csh3blit.inc"
  2000. #undef FUNCNAME
  2001. #undef _SMODE
  2002. #undef _DMODE
  2003.  
  2004. #define _SMODE 6
  2005. #define _DMODE 7
  2006. #define FUNCNAME draw_sprite_notint_flipx_s6_d7
  2007. #include "video/csh3blit.inc"
  2008. #undef FUNCNAME
  2009. #undef _SMODE
  2010. #undef _DMODE
  2011.  
  2012. #define _SMODE 7
  2013. #define _DMODE 7
  2014. #define FUNCNAME draw_sprite_notint_flipx_s7_d7
  2015. #include "video/csh3blit.inc"
  2016. #undef FUNCNAME
  2017. #undef _SMODE
  2018. #undef _DMODE
  2019.  
  2020. #undef BLENDED
  2021.  
  2022. #undef TRANSPARENT
  2023. #define TRANSPARENT 0
  2024.  
  2025. #define FUNCNAME draw_sprite_notint_flipx_opaque_plain
  2026. #include "video/csh3blit.inc"
  2027. #undef FUNCNAME
  2028.  
  2029.  
  2030. #define BLENDED
  2031.  
  2032. #define _SMODE 0
  2033. #define _DMODE 0
  2034. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d0
  2035. #include "video/csh3blit.inc"
  2036. #undef FUNCNAME
  2037. #undef _SMODE
  2038. #undef _DMODE
  2039.  
  2040. #define _SMODE 1
  2041. #define _DMODE 0
  2042. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d0
  2043. #include "video/csh3blit.inc"
  2044. #undef FUNCNAME
  2045. #undef _SMODE
  2046. #undef _DMODE
  2047.  
  2048. #define _SMODE 2
  2049. #define _DMODE 0
  2050. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d0
  2051. #include "video/csh3blit.inc"
  2052. #undef FUNCNAME
  2053. #undef _SMODE
  2054. #undef _DMODE
  2055.  
  2056. #define _SMODE 3
  2057. #define _DMODE 0
  2058. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d0
  2059. #include "video/csh3blit.inc"
  2060. #undef FUNCNAME
  2061. #undef _SMODE
  2062. #undef _DMODE
  2063.  
  2064. #define _SMODE 4
  2065. #define _DMODE 0
  2066. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d0
  2067. #include "video/csh3blit.inc"
  2068. #undef FUNCNAME
  2069. #undef _SMODE
  2070. #undef _DMODE
  2071.  
  2072. #define _SMODE 5
  2073. #define _DMODE 0
  2074. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d0
  2075. #include "video/csh3blit.inc"
  2076. #undef FUNCNAME
  2077. #undef _SMODE
  2078. #undef _DMODE
  2079.  
  2080. #define _SMODE 6
  2081. #define _DMODE 0
  2082. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d0
  2083. #include "video/csh3blit.inc"
  2084. #undef FUNCNAME
  2085. #undef _SMODE
  2086. #undef _DMODE
  2087.  
  2088. #define _SMODE 7
  2089. #define _DMODE 0
  2090. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d0
  2091. #include "video/csh3blit.inc"
  2092. #undef FUNCNAME
  2093. #undef _SMODE
  2094. #undef _DMODE
  2095.  
  2096.  
  2097. #define _SMODE 0
  2098. #define _DMODE 1
  2099. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d1
  2100. #include "video/csh3blit.inc"
  2101. #undef FUNCNAME
  2102. #undef _SMODE
  2103. #undef _DMODE
  2104.  
  2105. #define _SMODE 1
  2106. #define _DMODE 1
  2107. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d1
  2108. #include "video/csh3blit.inc"
  2109. #undef FUNCNAME
  2110. #undef _SMODE
  2111. #undef _DMODE
  2112.  
  2113. #define _SMODE 2
  2114. #define _DMODE 1
  2115. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d1
  2116. #include "video/csh3blit.inc"
  2117. #undef FUNCNAME
  2118. #undef _SMODE
  2119. #undef _DMODE
  2120.  
  2121. #define _SMODE 3
  2122. #define _DMODE 1
  2123. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d1
  2124. #include "video/csh3blit.inc"
  2125. #undef FUNCNAME
  2126. #undef _SMODE
  2127. #undef _DMODE
  2128.  
  2129. #define _SMODE 4
  2130. #define _DMODE 1
  2131. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d1
  2132. #include "video/csh3blit.inc"
  2133. #undef FUNCNAME
  2134. #undef _SMODE
  2135. #undef _DMODE
  2136.  
  2137. #define _SMODE 5
  2138. #define _DMODE 1
  2139. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d1
  2140. #include "video/csh3blit.inc"
  2141. #undef FUNCNAME
  2142. #undef _SMODE
  2143. #undef _DMODE
  2144.  
  2145. #define _SMODE 6
  2146. #define _DMODE 1
  2147. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d1
  2148. #include "video/csh3blit.inc"
  2149. #undef FUNCNAME
  2150. #undef _SMODE
  2151. #undef _DMODE
  2152.  
  2153. #define _SMODE 7
  2154. #define _DMODE 1
  2155. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d1
  2156. #include "video/csh3blit.inc"
  2157. #undef FUNCNAME
  2158. #undef _SMODE
  2159. #undef _DMODE
  2160.  
  2161.  
  2162. #define _SMODE 0
  2163. #define _DMODE 2
  2164. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d2
  2165. #include "video/csh3blit.inc"
  2166. #undef FUNCNAME
  2167. #undef _SMODE
  2168. #undef _DMODE
  2169.  
  2170. #define _SMODE 1
  2171. #define _DMODE 2
  2172. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d2
  2173. #include "video/csh3blit.inc"
  2174. #undef FUNCNAME
  2175. #undef _SMODE
  2176. #undef _DMODE
  2177.  
  2178. #define _SMODE 2
  2179. #define _DMODE 2
  2180. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d2
  2181. #include "video/csh3blit.inc"
  2182. #undef FUNCNAME
  2183. #undef _SMODE
  2184. #undef _DMODE
  2185.  
  2186. #define _SMODE 3
  2187. #define _DMODE 2
  2188. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d2
  2189. #include "video/csh3blit.inc"
  2190. #undef FUNCNAME
  2191. #undef _SMODE
  2192. #undef _DMODE
  2193.  
  2194. #define _SMODE 4
  2195. #define _DMODE 2
  2196. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d2
  2197. #include "video/csh3blit.inc"
  2198. #undef FUNCNAME
  2199. #undef _SMODE
  2200. #undef _DMODE
  2201.  
  2202. #define _SMODE 5
  2203. #define _DMODE 2
  2204. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d2
  2205. #include "video/csh3blit.inc"
  2206. #undef FUNCNAME
  2207. #undef _SMODE
  2208. #undef _DMODE
  2209.  
  2210. #define _SMODE 6
  2211. #define _DMODE 2
  2212. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d2
  2213. #include "video/csh3blit.inc"
  2214. #undef FUNCNAME
  2215. #undef _SMODE
  2216. #undef _DMODE
  2217.  
  2218. #define _SMODE 7
  2219. #define _DMODE 2
  2220. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d2
  2221. #include "video/csh3blit.inc"
  2222. #undef FUNCNAME
  2223. #undef _SMODE
  2224. #undef _DMODE
  2225.  
  2226.  
  2227. #define _SMODE 0
  2228. #define _DMODE 3
  2229. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d3
  2230. #include "video/csh3blit.inc"
  2231. #undef FUNCNAME
  2232. #undef _SMODE
  2233. #undef _DMODE
  2234.  
  2235. #define _SMODE 1
  2236. #define _DMODE 3
  2237. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d3
  2238. #include "video/csh3blit.inc"
  2239. #undef FUNCNAME
  2240. #undef _SMODE
  2241. #undef _DMODE
  2242.  
  2243. #define _SMODE 2
  2244. #define _DMODE 3
  2245. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d3
  2246. #include "video/csh3blit.inc"
  2247. #undef FUNCNAME
  2248. #undef _SMODE
  2249. #undef _DMODE
  2250.  
  2251. #define _SMODE 3
  2252. #define _DMODE 3
  2253. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d3
  2254. #include "video/csh3blit.inc"
  2255. #undef FUNCNAME
  2256. #undef _SMODE
  2257. #undef _DMODE
  2258.  
  2259. #define _SMODE 4
  2260. #define _DMODE 3
  2261. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d3
  2262. #include "video/csh3blit.inc"
  2263. #undef FUNCNAME
  2264. #undef _SMODE
  2265. #undef _DMODE
  2266.  
  2267. #define _SMODE 5
  2268. #define _DMODE 3
  2269. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d3
  2270. #include "video/csh3blit.inc"
  2271. #undef FUNCNAME
  2272. #undef _SMODE
  2273. #undef _DMODE
  2274.  
  2275. #define _SMODE 6
  2276. #define _DMODE 3
  2277. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d3
  2278. #include "video/csh3blit.inc"
  2279. #undef FUNCNAME
  2280. #undef _SMODE
  2281. #undef _DMODE
  2282.  
  2283. #define _SMODE 7
  2284. #define _DMODE 3
  2285. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d3
  2286. #include "video/csh3blit.inc"
  2287. #undef FUNCNAME
  2288. #undef _SMODE
  2289. #undef _DMODE
  2290.  
  2291.  
  2292. #define _SMODE 0
  2293. #define _DMODE 4
  2294. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d4
  2295. #include "video/csh3blit.inc"
  2296. #undef FUNCNAME
  2297. #undef _SMODE
  2298. #undef _DMODE
  2299.  
  2300. #define _SMODE 1
  2301. #define _DMODE 4
  2302. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d4
  2303. #include "video/csh3blit.inc"
  2304. #undef FUNCNAME
  2305. #undef _SMODE
  2306. #undef _DMODE
  2307.  
  2308. #define _SMODE 2
  2309. #define _DMODE 4
  2310. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d4
  2311. #include "video/csh3blit.inc"
  2312. #undef FUNCNAME
  2313. #undef _SMODE
  2314. #undef _DMODE
  2315.  
  2316. #define _SMODE 3
  2317. #define _DMODE 4
  2318. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d4
  2319. #include "video/csh3blit.inc"
  2320. #undef FUNCNAME
  2321. #undef _SMODE
  2322. #undef _DMODE
  2323.  
  2324. #define _SMODE 4
  2325. #define _DMODE 4
  2326. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d4
  2327. #include "video/csh3blit.inc"
  2328. #undef FUNCNAME
  2329. #undef _SMODE
  2330. #undef _DMODE
  2331.  
  2332. #define _SMODE 5
  2333. #define _DMODE 4
  2334. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d4
  2335. #include "video/csh3blit.inc"
  2336. #undef FUNCNAME
  2337. #undef _SMODE
  2338. #undef _DMODE
  2339.  
  2340. #define _SMODE 6
  2341. #define _DMODE 4
  2342. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d4
  2343. #include "video/csh3blit.inc"
  2344. #undef FUNCNAME
  2345. #undef _SMODE
  2346. #undef _DMODE
  2347.  
  2348. #define _SMODE 7
  2349. #define _DMODE 4
  2350. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d4
  2351. #include "video/csh3blit.inc"
  2352. #undef FUNCNAME
  2353. #undef _SMODE
  2354. #undef _DMODE
  2355.  
  2356.  
  2357. #define _SMODE 0
  2358. #define _DMODE 5
  2359. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d5
  2360. #include "video/csh3blit.inc"
  2361. #undef FUNCNAME
  2362. #undef _SMODE
  2363. #undef _DMODE
  2364.  
  2365. #define _SMODE 1
  2366. #define _DMODE 5
  2367. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d5
  2368. #include "video/csh3blit.inc"
  2369. #undef FUNCNAME
  2370. #undef _SMODE
  2371. #undef _DMODE
  2372.  
  2373. #define _SMODE 2
  2374. #define _DMODE 5
  2375. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d5
  2376. #include "video/csh3blit.inc"
  2377. #undef FUNCNAME
  2378. #undef _SMODE
  2379. #undef _DMODE
  2380.  
  2381. #define _SMODE 3
  2382. #define _DMODE 5
  2383. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d5
  2384. #include "video/csh3blit.inc"
  2385. #undef FUNCNAME
  2386. #undef _SMODE
  2387. #undef _DMODE
  2388.  
  2389. #define _SMODE 4
  2390. #define _DMODE 5
  2391. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d5
  2392. #include "video/csh3blit.inc"
  2393. #undef FUNCNAME
  2394. #undef _SMODE
  2395. #undef _DMODE
  2396.  
  2397. #define _SMODE 5
  2398. #define _DMODE 5
  2399. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d5
  2400. #include "video/csh3blit.inc"
  2401. #undef FUNCNAME
  2402. #undef _SMODE
  2403. #undef _DMODE
  2404.  
  2405. #define _SMODE 6
  2406. #define _DMODE 5
  2407. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d5
  2408. #include "video/csh3blit.inc"
  2409. #undef FUNCNAME
  2410. #undef _SMODE
  2411. #undef _DMODE
  2412.  
  2413. #define _SMODE 7
  2414. #define _DMODE 5
  2415. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d5
  2416. #include "video/csh3blit.inc"
  2417. #undef FUNCNAME
  2418. #undef _SMODE
  2419. #undef _DMODE
  2420.  
  2421.  
  2422. #define _SMODE 0
  2423. #define _DMODE 6
  2424. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d6
  2425. #include "video/csh3blit.inc"
  2426. #undef FUNCNAME
  2427. #undef _SMODE
  2428. #undef _DMODE
  2429.  
  2430. #define _SMODE 1
  2431. #define _DMODE 6
  2432. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d6
  2433. #include "video/csh3blit.inc"
  2434. #undef FUNCNAME
  2435. #undef _SMODE
  2436. #undef _DMODE
  2437.  
  2438. #define _SMODE 2
  2439. #define _DMODE 6
  2440. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d6
  2441. #include "video/csh3blit.inc"
  2442. #undef FUNCNAME
  2443. #undef _SMODE
  2444. #undef _DMODE
  2445.  
  2446. #define _SMODE 3
  2447. #define _DMODE 6
  2448. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d6
  2449. #include "video/csh3blit.inc"
  2450. #undef FUNCNAME
  2451. #undef _SMODE
  2452. #undef _DMODE
  2453.  
  2454. #define _SMODE 4
  2455. #define _DMODE 6
  2456. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d6
  2457. #include "video/csh3blit.inc"
  2458. #undef FUNCNAME
  2459. #undef _SMODE
  2460. #undef _DMODE
  2461.  
  2462. #define _SMODE 5
  2463. #define _DMODE 6
  2464. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d6
  2465. #include "video/csh3blit.inc"
  2466. #undef FUNCNAME
  2467. #undef _SMODE
  2468. #undef _DMODE
  2469.  
  2470. #define _SMODE 6
  2471. #define _DMODE 6
  2472. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d6
  2473. #include "video/csh3blit.inc"
  2474. #undef FUNCNAME
  2475. #undef _SMODE
  2476. #undef _DMODE
  2477.  
  2478. #define _SMODE 7
  2479. #define _DMODE 6
  2480. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d6
  2481. #include "video/csh3blit.inc"
  2482. #undef FUNCNAME
  2483. #undef _SMODE
  2484. #undef _DMODE
  2485.  
  2486.  
  2487. #define _SMODE 0
  2488. #define _DMODE 7
  2489. #define FUNCNAME draw_sprite_notint_flipx_opaque_s0_d7
  2490. #include "video/csh3blit.inc"
  2491. #undef FUNCNAME
  2492. #undef _SMODE
  2493. #undef _DMODE
  2494.  
  2495. #define _SMODE 1
  2496. #define _DMODE 7
  2497. #define FUNCNAME draw_sprite_notint_flipx_opaque_s1_d7
  2498. #include "video/csh3blit.inc"
  2499. #undef FUNCNAME
  2500. #undef _SMODE
  2501. #undef _DMODE
  2502.  
  2503. #define _SMODE 2
  2504. #define _DMODE 7
  2505. #define FUNCNAME draw_sprite_notint_flipx_opaque_s2_d7
  2506. #include "video/csh3blit.inc"
  2507. #undef FUNCNAME
  2508. #undef _SMODE
  2509. #undef _DMODE
  2510.  
  2511. #define _SMODE 3
  2512. #define _DMODE 7
  2513. #define FUNCNAME draw_sprite_notint_flipx_opaque_s3_d7
  2514. #include "video/csh3blit.inc"
  2515. #undef FUNCNAME
  2516. #undef _SMODE
  2517. #undef _DMODE
  2518.  
  2519. #define _SMODE 4
  2520. #define _DMODE 7
  2521. #define FUNCNAME draw_sprite_notint_flipx_opaque_s4_d7
  2522. #include "video/csh3blit.inc"
  2523. #undef FUNCNAME
  2524. #undef _SMODE
  2525. #undef _DMODE
  2526.  
  2527. #define _SMODE 5
  2528. #define _DMODE 7
  2529. #define FUNCNAME draw_sprite_notint_flipx_opaque_s5_d7
  2530. #include "video/csh3blit.inc"
  2531. #undef FUNCNAME
  2532. #undef _SMODE
  2533. #undef _DMODE
  2534.  
  2535. #define _SMODE 6
  2536. #define _DMODE 7
  2537. #define FUNCNAME draw_sprite_notint_flipx_opaque_s6_d7
  2538. #include "video/csh3blit.inc"
  2539. #undef FUNCNAME
  2540. #undef _SMODE
  2541. #undef _DMODE
  2542.  
  2543. #define _SMODE 7
  2544. #define _DMODE 7
  2545. #define FUNCNAME draw_sprite_notint_flipx_opaque_s7_d7
  2546. #include "video/csh3blit.inc"
  2547. #undef FUNCNAME
  2548. #undef _SMODE
  2549. #undef _DMODE
  2550.  
  2551. #undef BLENDED
  2552.  
  2553. #undef TRANSPARENT
  2554. #undef FLIPX
  2555.  
  2556.  
  2557. // really simple cases
  2558.  
  2559. #define REALLY_SIMPLE
  2560.  
  2561. #define TRANSPARENT 1
  2562. #define FUNCNAME draw_sprite_notint_simple
  2563. #include "video/csh3blit.inc"
  2564. #undef FUNCNAME
  2565.  
  2566. #define FLIPX
  2567. #define FUNCNAME draw_sprite_notint_flipx_simple
  2568. #include "video/csh3blit.inc"
  2569. #undef FUNCNAME
  2570. #undef FLIPX
  2571. #undef TRANSPARENT
  2572.  
  2573. #define TRANSPARENT 0
  2574. #define FUNCNAME draw_sprite_notint_opaque_simple
  2575. #include "video/csh3blit.inc"
  2576. #undef FUNCNAME
  2577.  
  2578. #define FLIPX
  2579. #define FUNCNAME draw_sprite_notint_flipx_opaque_simple
  2580. #include "video/csh3blit.inc"
  2581. #undef FUNCNAME
  2582. #undef FLIPX
  2583. #undef TRANSPARENT
  2584. #undef REALLY_SIMPLE
  2585.  
  2586.  
  2587. // TINT
  2588.  
  2589. #define TINT
  2590.  
  2591.  
  2592. #define TRANSPARENT 1
  2593.  
  2594. #define FUNCNAME draw_sprite_plain
  2595. #include "video/csh3blit.inc"
  2596. #undef FUNCNAME
  2597.  
  2598.  
  2599. #define BLENDED
  2600.  
  2601. #define _SMODE 0
  2602. #define _DMODE 0
  2603. #define FUNCNAME draw_sprite_s0_d0
  2604. #include "video/csh3blit.inc"
  2605. #undef FUNCNAME
  2606. #undef _SMODE
  2607. #undef _DMODE
  2608.  
  2609. #define _SMODE 1
  2610. #define _DMODE 0
  2611. #define FUNCNAME draw_sprite_s1_d0
  2612. #include "video/csh3blit.inc"
  2613. #undef FUNCNAME
  2614. #undef _SMODE
  2615. #undef _DMODE
  2616.  
  2617. #define _SMODE 2
  2618. #define _DMODE 0
  2619. #define FUNCNAME draw_sprite_s2_d0
  2620. #include "video/csh3blit.inc"
  2621. #undef FUNCNAME
  2622. #undef _SMODE
  2623. #undef _DMODE
  2624.  
  2625. #define _SMODE 3
  2626. #define _DMODE 0
  2627. #define FUNCNAME draw_sprite_s3_d0
  2628. #include "video/csh3blit.inc"
  2629. #undef FUNCNAME
  2630. #undef _SMODE
  2631. #undef _DMODE
  2632.  
  2633. #define _SMODE 4
  2634. #define _DMODE 0
  2635. #define FUNCNAME draw_sprite_s4_d0
  2636. #include "video/csh3blit.inc"
  2637. #undef FUNCNAME
  2638. #undef _SMODE
  2639. #undef _DMODE
  2640.  
  2641. #define _SMODE 5
  2642. #define _DMODE 0
  2643. #define FUNCNAME draw_sprite_s5_d0
  2644. #include "video/csh3blit.inc"
  2645. #undef FUNCNAME
  2646. #undef _SMODE
  2647. #undef _DMODE
  2648.  
  2649. #define _SMODE 6
  2650. #define _DMODE 0
  2651. #define FUNCNAME draw_sprite_s6_d0
  2652. #include "video/csh3blit.inc"
  2653. #undef FUNCNAME
  2654. #undef _SMODE
  2655. #undef _DMODE
  2656.  
  2657. #define _SMODE 7
  2658. #define _DMODE 0
  2659. #define FUNCNAME draw_sprite_s7_d0
  2660. #include "video/csh3blit.inc"
  2661. #undef FUNCNAME
  2662. #undef _SMODE
  2663. #undef _DMODE
  2664.  
  2665.  
  2666. #define _SMODE 0
  2667. #define _DMODE 1
  2668. #define FUNCNAME draw_sprite_s0_d1
  2669. #include "video/csh3blit.inc"
  2670. #undef FUNCNAME
  2671. #undef _SMODE
  2672. #undef _DMODE
  2673.  
  2674. #define _SMODE 1
  2675. #define _DMODE 1
  2676. #define FUNCNAME draw_sprite_s1_d1
  2677. #include "video/csh3blit.inc"
  2678. #undef FUNCNAME
  2679. #undef _SMODE
  2680. #undef _DMODE
  2681.  
  2682. #define _SMODE 2
  2683. #define _DMODE 1
  2684. #define FUNCNAME draw_sprite_s2_d1
  2685. #include "video/csh3blit.inc"
  2686. #undef FUNCNAME
  2687. #undef _SMODE
  2688. #undef _DMODE
  2689.  
  2690. #define _SMODE 3
  2691. #define _DMODE 1
  2692. #define FUNCNAME draw_sprite_s3_d1
  2693. #include "video/csh3blit.inc"
  2694. #undef FUNCNAME
  2695. #undef _SMODE
  2696. #undef _DMODE
  2697.  
  2698. #define _SMODE 4
  2699. #define _DMODE 1
  2700. #define FUNCNAME draw_sprite_s4_d1
  2701. #include "video/csh3blit.inc"
  2702. #undef FUNCNAME
  2703. #undef _SMODE
  2704. #undef _DMODE
  2705.  
  2706. #define _SMODE 5
  2707. #define _DMODE 1
  2708. #define FUNCNAME draw_sprite_s5_d1
  2709. #include "video/csh3blit.inc"
  2710. #undef FUNCNAME
  2711. #undef _SMODE
  2712. #undef _DMODE
  2713.  
  2714. #define _SMODE 6
  2715. #define _DMODE 1
  2716. #define FUNCNAME draw_sprite_s6_d1
  2717. #include "video/csh3blit.inc"
  2718. #undef FUNCNAME
  2719. #undef _SMODE
  2720. #undef _DMODE
  2721.  
  2722. #define _SMODE 7
  2723. #define _DMODE 1
  2724. #define FUNCNAME draw_sprite_s7_d1
  2725. #include "video/csh3blit.inc"
  2726. #undef FUNCNAME
  2727. #undef _SMODE
  2728. #undef _DMODE
  2729.  
  2730.  
  2731. #define _SMODE 0
  2732. #define _DMODE 2
  2733. #define FUNCNAME draw_sprite_s0_d2
  2734. #include "video/csh3blit.inc"
  2735. #undef FUNCNAME
  2736. #undef _SMODE
  2737. #undef _DMODE
  2738.  
  2739. #define _SMODE 1
  2740. #define _DMODE 2
  2741. #define FUNCNAME draw_sprite_s1_d2
  2742. #include "video/csh3blit.inc"
  2743. #undef FUNCNAME
  2744. #undef _SMODE
  2745. #undef _DMODE
  2746.  
  2747. #define _SMODE 2
  2748. #define _DMODE 2
  2749. #define FUNCNAME draw_sprite_s2_d2
  2750. #include "video/csh3blit.inc"
  2751. #undef FUNCNAME
  2752. #undef _SMODE
  2753. #undef _DMODE
  2754.  
  2755. #define _SMODE 3
  2756. #define _DMODE 2
  2757. #define FUNCNAME draw_sprite_s3_d2
  2758. #include "video/csh3blit.inc"
  2759. #undef FUNCNAME
  2760. #undef _SMODE
  2761. #undef _DMODE
  2762.  
  2763. #define _SMODE 4
  2764. #define _DMODE 2
  2765. #define FUNCNAME draw_sprite_s4_d2
  2766. #include "video/csh3blit.inc"
  2767. #undef FUNCNAME
  2768. #undef _SMODE
  2769. #undef _DMODE
  2770.  
  2771. #define _SMODE 5
  2772. #define _DMODE 2
  2773. #define FUNCNAME draw_sprite_s5_d2
  2774. #include "video/csh3blit.inc"
  2775. #undef FUNCNAME
  2776. #undef _SMODE
  2777. #undef _DMODE
  2778.  
  2779. #define _SMODE 6
  2780. #define _DMODE 2
  2781. #define FUNCNAME draw_sprite_s6_d2
  2782. #include "video/csh3blit.inc"
  2783. #undef FUNCNAME
  2784. #undef _SMODE
  2785. #undef _DMODE
  2786.  
  2787. #define _SMODE 7
  2788. #define _DMODE 2
  2789. #define FUNCNAME draw_sprite_s7_d2
  2790. #include "video/csh3blit.inc"
  2791. #undef FUNCNAME
  2792. #undef _SMODE
  2793. #undef _DMODE
  2794.  
  2795.  
  2796. #define _SMODE 0
  2797. #define _DMODE 3
  2798. #define FUNCNAME draw_sprite_s0_d3
  2799. #include "video/csh3blit.inc"
  2800. #undef FUNCNAME
  2801. #undef _SMODE
  2802. #undef _DMODE
  2803.  
  2804. #define _SMODE 1
  2805. #define _DMODE 3
  2806. #define FUNCNAME draw_sprite_s1_d3
  2807. #include "video/csh3blit.inc"
  2808. #undef FUNCNAME
  2809. #undef _SMODE
  2810. #undef _DMODE
  2811.  
  2812. #define _SMODE 2
  2813. #define _DMODE 3
  2814. #define FUNCNAME draw_sprite_s2_d3
  2815. #include "video/csh3blit.inc"
  2816. #undef FUNCNAME
  2817. #undef _SMODE
  2818. #undef _DMODE
  2819.  
  2820. #define _SMODE 3
  2821. #define _DMODE 3
  2822. #define FUNCNAME draw_sprite_s3_d3
  2823. #include "video/csh3blit.inc"
  2824. #undef FUNCNAME
  2825. #undef _SMODE
  2826. #undef _DMODE
  2827.  
  2828. #define _SMODE 4
  2829. #define _DMODE 3
  2830. #define FUNCNAME draw_sprite_s4_d3
  2831. #include "video/csh3blit.inc"
  2832. #undef FUNCNAME
  2833. #undef _SMODE
  2834. #undef _DMODE
  2835.  
  2836. #define _SMODE 5
  2837. #define _DMODE 3
  2838. #define FUNCNAME draw_sprite_s5_d3
  2839. #include "video/csh3blit.inc"
  2840. #undef FUNCNAME
  2841. #undef _SMODE
  2842. #undef _DMODE
  2843.  
  2844. #define _SMODE 6
  2845. #define _DMODE 3
  2846. #define FUNCNAME draw_sprite_s6_d3
  2847. #include "video/csh3blit.inc"
  2848. #undef FUNCNAME
  2849. #undef _SMODE
  2850. #undef _DMODE
  2851.  
  2852. #define _SMODE 7
  2853. #define _DMODE 3
  2854. #define FUNCNAME draw_sprite_s7_d3
  2855. #include "video/csh3blit.inc"
  2856. #undef FUNCNAME
  2857. #undef _SMODE
  2858. #undef _DMODE
  2859.  
  2860.  
  2861. #define _SMODE 0
  2862. #define _DMODE 4
  2863. #define FUNCNAME draw_sprite_s0_d4
  2864. #include "video/csh3blit.inc"
  2865. #undef FUNCNAME
  2866. #undef _SMODE
  2867. #undef _DMODE
  2868.  
  2869. #define _SMODE 1
  2870. #define _DMODE 4
  2871. #define FUNCNAME draw_sprite_s1_d4
  2872. #include "video/csh3blit.inc"
  2873. #undef FUNCNAME
  2874. #undef _SMODE
  2875. #undef _DMODE
  2876.  
  2877. #define _SMODE 2
  2878. #define _DMODE 4
  2879. #define FUNCNAME draw_sprite_s2_d4
  2880. #include "video/csh3blit.inc"
  2881. #undef FUNCNAME
  2882. #undef _SMODE
  2883. #undef _DMODE
  2884.  
  2885. #define _SMODE 3
  2886. #define _DMODE 4
  2887. #define FUNCNAME draw_sprite_s3_d4
  2888. #include "video/csh3blit.inc"
  2889. #undef FUNCNAME
  2890. #undef _SMODE
  2891. #undef _DMODE
  2892.  
  2893. #define _SMODE 4
  2894. #define _DMODE 4
  2895. #define FUNCNAME draw_sprite_s4_d4
  2896. #include "video/csh3blit.inc"
  2897. #undef FUNCNAME
  2898. #undef _SMODE
  2899. #undef _DMODE
  2900.  
  2901. #define _SMODE 5
  2902. #define _DMODE 4
  2903. #define FUNCNAME draw_sprite_s5_d4
  2904. #include "video/csh3blit.inc"
  2905. #undef FUNCNAME
  2906. #undef _SMODE
  2907. #undef _DMODE
  2908.  
  2909. #define _SMODE 6
  2910. #define _DMODE 4
  2911. #define FUNCNAME draw_sprite_s6_d4
  2912. #include "video/csh3blit.inc"
  2913. #undef FUNCNAME
  2914. #undef _SMODE
  2915. #undef _DMODE
  2916.  
  2917. #define _SMODE 7
  2918. #define _DMODE 4
  2919. #define FUNCNAME draw_sprite_s7_d4
  2920. #include "video/csh3blit.inc"
  2921. #undef FUNCNAME
  2922. #undef _SMODE
  2923. #undef _DMODE
  2924.  
  2925.  
  2926. #define _SMODE 0
  2927. #define _DMODE 5
  2928. #define FUNCNAME draw_sprite_s0_d5
  2929. #include "video/csh3blit.inc"
  2930. #undef FUNCNAME
  2931. #undef _SMODE
  2932. #undef _DMODE
  2933.  
  2934. #define _SMODE 1
  2935. #define _DMODE 5
  2936. #define FUNCNAME draw_sprite_s1_d5
  2937. #include "video/csh3blit.inc"
  2938. #undef FUNCNAME
  2939. #undef _SMODE
  2940. #undef _DMODE
  2941.  
  2942. #define _SMODE 2
  2943. #define _DMODE 5
  2944. #define FUNCNAME draw_sprite_s2_d5
  2945. #include "video/csh3blit.inc"
  2946. #undef FUNCNAME
  2947. #undef _SMODE
  2948. #undef _DMODE
  2949.  
  2950. #define _SMODE 3
  2951. #define _DMODE 5
  2952. #define FUNCNAME draw_sprite_s3_d5
  2953. #include "video/csh3blit.inc"
  2954. #undef FUNCNAME
  2955. #undef _SMODE
  2956. #undef _DMODE
  2957.  
  2958. #define _SMODE 4
  2959. #define _DMODE 5
  2960. #define FUNCNAME draw_sprite_s4_d5
  2961. #include "video/csh3blit.inc"
  2962. #undef FUNCNAME
  2963. #undef _SMODE
  2964. #undef _DMODE
  2965.  
  2966. #define _SMODE 5
  2967. #define _DMODE 5
  2968. #define FUNCNAME draw_sprite_s5_d5
  2969. #include "video/csh3blit.inc"
  2970. #undef FUNCNAME
  2971. #undef _SMODE
  2972. #undef _DMODE
  2973.  
  2974. #define _SMODE 6
  2975. #define _DMODE 5
  2976. #define FUNCNAME draw_sprite_s6_d5
  2977. #include "video/csh3blit.inc"
  2978. #undef FUNCNAME
  2979. #undef _SMODE
  2980. #undef _DMODE
  2981.  
  2982. #define _SMODE 7
  2983. #define _DMODE 5
  2984. #define FUNCNAME draw_sprite_s7_d5
  2985. #include "video/csh3blit.inc"
  2986. #undef FUNCNAME
  2987. #undef _SMODE
  2988. #undef _DMODE
  2989.  
  2990.  
  2991. #define _SMODE 0
  2992. #define _DMODE 6
  2993. #define FUNCNAME draw_sprite_s0_d6
  2994. #include "video/csh3blit.inc"
  2995. #undef FUNCNAME
  2996. #undef _SMODE
  2997. #undef _DMODE
  2998.  
  2999. #define _SMODE 1
  3000. #define _DMODE 6
  3001. #define FUNCNAME draw_sprite_s1_d6
  3002. #include "video/csh3blit.inc"
  3003. #undef FUNCNAME
  3004. #undef _SMODE
  3005. #undef _DMODE
  3006.  
  3007. #define _SMODE 2
  3008. #define _DMODE 6
  3009. #define FUNCNAME draw_sprite_s2_d6
  3010. #include "video/csh3blit.inc"
  3011. #undef FUNCNAME
  3012. #undef _SMODE
  3013. #undef _DMODE
  3014.  
  3015. #define _SMODE 3
  3016. #define _DMODE 6
  3017. #define FUNCNAME draw_sprite_s3_d6
  3018. #include "video/csh3blit.inc"
  3019. #undef FUNCNAME
  3020. #undef _SMODE
  3021. #undef _DMODE
  3022.  
  3023. #define _SMODE 4
  3024. #define _DMODE 6
  3025. #define FUNCNAME draw_sprite_s4_d6
  3026. #include "video/csh3blit.inc"
  3027. #undef FUNCNAME
  3028. #undef _SMODE
  3029. #undef _DMODE
  3030.  
  3031. #define _SMODE 5
  3032. #define _DMODE 6
  3033. #define FUNCNAME draw_sprite_s5_d6
  3034. #include "video/csh3blit.inc"
  3035. #undef FUNCNAME
  3036. #undef _SMODE
  3037. #undef _DMODE
  3038.  
  3039. #define _SMODE 6
  3040. #define _DMODE 6
  3041. #define FUNCNAME draw_sprite_s6_d6
  3042. #include "video/csh3blit.inc"
  3043. #undef FUNCNAME
  3044. #undef _SMODE
  3045. #undef _DMODE
  3046.  
  3047. #define _SMODE 7
  3048. #define _DMODE 6
  3049. #define FUNCNAME draw_sprite_s7_d6
  3050. #include "video/csh3blit.inc"
  3051. #undef FUNCNAME
  3052. #undef _SMODE
  3053. #undef _DMODE
  3054.  
  3055.  
  3056. #define _SMODE 0
  3057. #define _DMODE 7
  3058. #define FUNCNAME draw_sprite_s0_d7
  3059. #include "video/csh3blit.inc"
  3060. #undef FUNCNAME
  3061. #undef _SMODE
  3062. #undef _DMODE
  3063.  
  3064. #define _SMODE 1
  3065. #define _DMODE 7
  3066. #define FUNCNAME draw_sprite_s1_d7
  3067. #include "video/csh3blit.inc"
  3068. #undef FUNCNAME
  3069. #undef _SMODE
  3070. #undef _DMODE
  3071.  
  3072. #define _SMODE 2
  3073. #define _DMODE 7
  3074. #define FUNCNAME draw_sprite_s2_d7
  3075. #include "video/csh3blit.inc"
  3076. #undef FUNCNAME
  3077. #undef _SMODE
  3078. #undef _DMODE
  3079.  
  3080. #define _SMODE 3
  3081. #define _DMODE 7
  3082. #define FUNCNAME draw_sprite_s3_d7
  3083. #include "video/csh3blit.inc"
  3084. #undef FUNCNAME
  3085. #undef _SMODE
  3086. #undef _DMODE
  3087.  
  3088. #define _SMODE 4
  3089. #define _DMODE 7
  3090. #define FUNCNAME draw_sprite_s4_d7
  3091. #include "video/csh3blit.inc"
  3092. #undef FUNCNAME
  3093. #undef _SMODE
  3094. #undef _DMODE
  3095.  
  3096. #define _SMODE 5
  3097. #define _DMODE 7
  3098. #define FUNCNAME draw_sprite_s5_d7
  3099. #include "video/csh3blit.inc"
  3100. #undef FUNCNAME
  3101. #undef _SMODE
  3102. #undef _DMODE
  3103.  
  3104. #define _SMODE 6
  3105. #define _DMODE 7
  3106. #define FUNCNAME draw_sprite_s6_d7
  3107. #include "video/csh3blit.inc"
  3108. #undef FUNCNAME
  3109. #undef _SMODE
  3110. #undef _DMODE
  3111.  
  3112. #define _SMODE 7
  3113. #define _DMODE 7
  3114. #define FUNCNAME draw_sprite_s7_d7
  3115. #include "video/csh3blit.inc"
  3116. #undef FUNCNAME
  3117. #undef _SMODE
  3118. #undef _DMODE
  3119.  
  3120. #undef BLENDED
  3121.  
  3122. #undef TRANSPARENT
  3123.  
  3124.  
  3125. #define TRANSPARENT 0
  3126.  
  3127. #define FUNCNAME draw_sprite_opaque_plain
  3128. #include "video/csh3blit.inc"
  3129. #undef FUNCNAME
  3130.  
  3131.  
  3132. #define BLENDED
  3133.  
  3134. #define _SMODE 0
  3135. #define _DMODE 0
  3136. #define FUNCNAME draw_sprite_opaque_s0_d0
  3137. #include "video/csh3blit.inc"
  3138. #undef FUNCNAME
  3139. #undef _SMODE
  3140. #undef _DMODE
  3141.  
  3142. #define _SMODE 1
  3143. #define _DMODE 0
  3144. #define FUNCNAME draw_sprite_opaque_s1_d0
  3145. #include "video/csh3blit.inc"
  3146. #undef FUNCNAME
  3147. #undef _SMODE
  3148. #undef _DMODE
  3149.  
  3150. #define _SMODE 2
  3151. #define _DMODE 0
  3152. #define FUNCNAME draw_sprite_opaque_s2_d0
  3153. #include "video/csh3blit.inc"
  3154. #undef FUNCNAME
  3155. #undef _SMODE
  3156. #undef _DMODE
  3157.  
  3158. #define _SMODE 3
  3159. #define _DMODE 0
  3160. #define FUNCNAME draw_sprite_opaque_s3_d0
  3161. #include "video/csh3blit.inc"
  3162. #undef FUNCNAME
  3163. #undef _SMODE
  3164. #undef _DMODE
  3165.  
  3166. #define _SMODE 4
  3167. #define _DMODE 0
  3168. #define FUNCNAME draw_sprite_opaque_s4_d0
  3169. #include "video/csh3blit.inc"
  3170. #undef FUNCNAME
  3171. #undef _SMODE
  3172. #undef _DMODE
  3173.  
  3174. #define _SMODE 5
  3175. #define _DMODE 0
  3176. #define FUNCNAME draw_sprite_opaque_s5_d0
  3177. #include "video/csh3blit.inc"
  3178. #undef FUNCNAME
  3179. #undef _SMODE
  3180. #undef _DMODE
  3181.  
  3182. #define _SMODE 6
  3183. #define _DMODE 0
  3184. #define FUNCNAME draw_sprite_opaque_s6_d0
  3185. #include "video/csh3blit.inc"
  3186. #undef FUNCNAME
  3187. #undef _SMODE
  3188. #undef _DMODE
  3189.  
  3190. #define _SMODE 7
  3191. #define _DMODE 0
  3192. #define FUNCNAME draw_sprite_opaque_s7_d0
  3193. #include "video/csh3blit.inc"
  3194. #undef FUNCNAME
  3195. #undef _SMODE
  3196. #undef _DMODE
  3197.  
  3198.  
  3199. #define _SMODE 0
  3200. #define _DMODE 1
  3201. #define FUNCNAME draw_sprite_opaque_s0_d1
  3202. #include "video/csh3blit.inc"
  3203. #undef FUNCNAME
  3204. #undef _SMODE
  3205. #undef _DMODE
  3206.  
  3207. #define _SMODE 1
  3208. #define _DMODE 1
  3209. #define FUNCNAME draw_sprite_opaque_s1_d1
  3210. #include "video/csh3blit.inc"
  3211. #undef FUNCNAME
  3212. #undef _SMODE
  3213. #undef _DMODE
  3214.  
  3215. #define _SMODE 2
  3216. #define _DMODE 1
  3217. #define FUNCNAME draw_sprite_opaque_s2_d1
  3218. #include "video/csh3blit.inc"
  3219. #undef FUNCNAME
  3220. #undef _SMODE
  3221. #undef _DMODE
  3222.  
  3223. #define _SMODE 3
  3224. #define _DMODE 1
  3225. #define FUNCNAME draw_sprite_opaque_s3_d1
  3226. #include "video/csh3blit.inc"
  3227. #undef FUNCNAME
  3228. #undef _SMODE
  3229. #undef _DMODE
  3230.  
  3231. #define _SMODE 4
  3232. #define _DMODE 1
  3233. #define FUNCNAME draw_sprite_opaque_s4_d1
  3234. #include "video/csh3blit.inc"
  3235. #undef FUNCNAME
  3236. #undef _SMODE
  3237. #undef _DMODE
  3238.  
  3239. #define _SMODE 5
  3240. #define _DMODE 1
  3241. #define FUNCNAME draw_sprite_opaque_s5_d1
  3242. #include "video/csh3blit.inc"
  3243. #undef FUNCNAME
  3244. #undef _SMODE
  3245. #undef _DMODE
  3246.  
  3247. #define _SMODE 6
  3248. #define _DMODE 1
  3249. #define FUNCNAME draw_sprite_opaque_s6_d1
  3250. #include "video/csh3blit.inc"
  3251. #undef FUNCNAME
  3252. #undef _SMODE
  3253. #undef _DMODE
  3254.  
  3255. #define _SMODE 7
  3256. #define _DMODE 1
  3257. #define FUNCNAME draw_sprite_opaque_s7_d1
  3258. #include "video/csh3blit.inc"
  3259. #undef FUNCNAME
  3260. #undef _SMODE
  3261. #undef _DMODE
  3262.  
  3263.  
  3264. #define _SMODE 0
  3265. #define _DMODE 2
  3266. #define FUNCNAME draw_sprite_opaque_s0_d2
  3267. #include "video/csh3blit.inc"
  3268. #undef FUNCNAME
  3269. #undef _SMODE
  3270. #undef _DMODE
  3271.  
  3272. #define _SMODE 1
  3273. #define _DMODE 2
  3274. #define FUNCNAME draw_sprite_opaque_s1_d2
  3275. #include "video/csh3blit.inc"
  3276. #undef FUNCNAME
  3277. #undef _SMODE
  3278. #undef _DMODE
  3279.  
  3280. #define _SMODE 2
  3281. #define _DMODE 2
  3282. #define FUNCNAME draw_sprite_opaque_s2_d2
  3283. #include "video/csh3blit.inc"
  3284. #undef FUNCNAME
  3285. #undef _SMODE
  3286. #undef _DMODE
  3287.  
  3288. #define _SMODE 3
  3289. #define _DMODE 2
  3290. #define FUNCNAME draw_sprite_opaque_s3_d2
  3291. #include "video/csh3blit.inc"
  3292. #undef FUNCNAME
  3293. #undef _SMODE
  3294. #undef _DMODE
  3295.  
  3296. #define _SMODE 4
  3297. #define _DMODE 2
  3298. #define FUNCNAME draw_sprite_opaque_s4_d2
  3299. #include "video/csh3blit.inc"
  3300. #undef FUNCNAME
  3301. #undef _SMODE
  3302. #undef _DMODE
  3303.  
  3304. #define _SMODE 5
  3305. #define _DMODE 2
  3306. #define FUNCNAME draw_sprite_opaque_s5_d2
  3307. #include "video/csh3blit.inc"
  3308. #undef FUNCNAME
  3309. #undef _SMODE
  3310. #undef _DMODE
  3311.  
  3312. #define _SMODE 6
  3313. #define _DMODE 2
  3314. #define FUNCNAME draw_sprite_opaque_s6_d2
  3315. #include "video/csh3blit.inc"
  3316. #undef FUNCNAME
  3317. #undef _SMODE
  3318. #undef _DMODE
  3319.  
  3320. #define _SMODE 7
  3321. #define _DMODE 2
  3322. #define FUNCNAME draw_sprite_opaque_s7_d2
  3323. #include "video/csh3blit.inc"
  3324. #undef FUNCNAME
  3325. #undef _SMODE
  3326. #undef _DMODE
  3327.  
  3328.  
  3329. #define _SMODE 0
  3330. #define _DMODE 3
  3331. #define FUNCNAME draw_sprite_opaque_s0_d3
  3332. #include "video/csh3blit.inc"
  3333. #undef FUNCNAME
  3334. #undef _SMODE
  3335. #undef _DMODE
  3336.  
  3337. #define _SMODE 1
  3338. #define _DMODE 3
  3339. #define FUNCNAME draw_sprite_opaque_s1_d3
  3340. #include "video/csh3blit.inc"
  3341. #undef FUNCNAME
  3342. #undef _SMODE
  3343. #undef _DMODE
  3344.  
  3345. #define _SMODE 2
  3346. #define _DMODE 3
  3347. #define FUNCNAME draw_sprite_opaque_s2_d3
  3348. #include "video/csh3blit.inc"
  3349. #undef FUNCNAME
  3350. #undef _SMODE
  3351. #undef _DMODE
  3352.  
  3353. #define _SMODE 3
  3354. #define _DMODE 3
  3355. #define FUNCNAME draw_sprite_opaque_s3_d3
  3356. #include "video/csh3blit.inc"
  3357. #undef FUNCNAME
  3358. #undef _SMODE
  3359. #undef _DMODE
  3360.  
  3361. #define _SMODE 4
  3362. #define _DMODE 3
  3363. #define FUNCNAME draw_sprite_opaque_s4_d3
  3364. #include "video/csh3blit.inc"
  3365. #undef FUNCNAME
  3366. #undef _SMODE
  3367. #undef _DMODE
  3368.  
  3369. #define _SMODE 5
  3370. #define _DMODE 3
  3371. #define FUNCNAME draw_sprite_opaque_s5_d3
  3372. #include "video/csh3blit.inc"
  3373. #undef FUNCNAME
  3374. #undef _SMODE
  3375. #undef _DMODE
  3376.  
  3377. #define _SMODE 6
  3378. #define _DMODE 3
  3379. #define FUNCNAME draw_sprite_opaque_s6_d3
  3380. #include "video/csh3blit.inc"
  3381. #undef FUNCNAME
  3382. #undef _SMODE
  3383. #undef _DMODE
  3384.  
  3385. #define _SMODE 7
  3386. #define _DMODE 3
  3387. #define FUNCNAME draw_sprite_opaque_s7_d3
  3388. #include "video/csh3blit.inc"
  3389. #undef FUNCNAME
  3390. #undef _SMODE
  3391. #undef _DMODE
  3392.  
  3393.  
  3394. #define _SMODE 0
  3395. #define _DMODE 4
  3396. #define FUNCNAME draw_sprite_opaque_s0_d4
  3397. #include "video/csh3blit.inc"
  3398. #undef FUNCNAME
  3399. #undef _SMODE
  3400. #undef _DMODE
  3401.  
  3402. #define _SMODE 1
  3403. #define _DMODE 4
  3404. #define FUNCNAME draw_sprite_opaque_s1_d4
  3405. #include "video/csh3blit.inc"
  3406. #undef FUNCNAME
  3407. #undef _SMODE
  3408. #undef _DMODE
  3409.  
  3410. #define _SMODE 2
  3411. #define _DMODE 4
  3412. #define FUNCNAME draw_sprite_opaque_s2_d4
  3413. #include "video/csh3blit.inc"
  3414. #undef FUNCNAME
  3415. #undef _SMODE
  3416. #undef _DMODE
  3417.  
  3418. #define _SMODE 3
  3419. #define _DMODE 4
  3420. #define FUNCNAME draw_sprite_opaque_s3_d4
  3421. #include "video/csh3blit.inc"
  3422. #undef FUNCNAME
  3423. #undef _SMODE
  3424. #undef _DMODE
  3425.  
  3426. #define _SMODE 4
  3427. #define _DMODE 4
  3428. #define FUNCNAME draw_sprite_opaque_s4_d4
  3429. #include "video/csh3blit.inc"
  3430. #undef FUNCNAME
  3431. #undef _SMODE
  3432. #undef _DMODE
  3433.  
  3434. #define _SMODE 5
  3435. #define _DMODE 4
  3436. #define FUNCNAME draw_sprite_opaque_s5_d4
  3437. #include "video/csh3blit.inc"
  3438. #undef FUNCNAME
  3439. #undef _SMODE
  3440. #undef _DMODE
  3441.  
  3442. #define _SMODE 6
  3443. #define _DMODE 4
  3444. #define FUNCNAME draw_sprite_opaque_s6_d4
  3445. #include "video/csh3blit.inc"
  3446. #undef FUNCNAME
  3447. #undef _SMODE
  3448. #undef _DMODE
  3449.  
  3450. #define _SMODE 7
  3451. #define _DMODE 4
  3452. #define FUNCNAME draw_sprite_opaque_s7_d4
  3453. #include "video/csh3blit.inc"
  3454. #undef FUNCNAME
  3455. #undef _SMODE
  3456. #undef _DMODE
  3457.  
  3458.  
  3459. #define _SMODE 0
  3460. #define _DMODE 5
  3461. #define FUNCNAME draw_sprite_opaque_s0_d5
  3462. #include "video/csh3blit.inc"
  3463. #undef FUNCNAME
  3464. #undef _SMODE
  3465. #undef _DMODE
  3466.  
  3467. #define _SMODE 1
  3468. #define _DMODE 5
  3469. #define FUNCNAME draw_sprite_opaque_s1_d5
  3470. #include "video/csh3blit.inc"
  3471. #undef FUNCNAME
  3472. #undef _SMODE
  3473. #undef _DMODE
  3474.  
  3475. #define _SMODE 2
  3476. #define _DMODE 5
  3477. #define FUNCNAME draw_sprite_opaque_s2_d5
  3478. #include "video/csh3blit.inc"
  3479. #undef FUNCNAME
  3480. #undef _SMODE
  3481. #undef _DMODE
  3482.  
  3483. #define _SMODE 3
  3484. #define _DMODE 5
  3485. #define FUNCNAME draw_sprite_opaque_s3_d5
  3486. #include "video/csh3blit.inc"
  3487. #undef FUNCNAME
  3488. #undef _SMODE
  3489. #undef _DMODE
  3490.  
  3491. #define _SMODE 4
  3492. #define _DMODE 5
  3493. #define FUNCNAME draw_sprite_opaque_s4_d5
  3494. #include "video/csh3blit.inc"
  3495. #undef FUNCNAME
  3496. #undef _SMODE
  3497. #undef _DMODE
  3498.  
  3499. #define _SMODE 5
  3500. #define _DMODE 5
  3501. #define FUNCNAME draw_sprite_opaque_s5_d5
  3502. #include "video/csh3blit.inc"
  3503. #undef FUNCNAME
  3504. #undef _SMODE
  3505. #undef _DMODE
  3506.  
  3507. #define _SMODE 6
  3508. #define _DMODE 5
  3509. #define FUNCNAME draw_sprite_opaque_s6_d5
  3510. #include "video/csh3blit.inc"
  3511. #undef FUNCNAME
  3512. #undef _SMODE
  3513. #undef _DMODE
  3514.  
  3515. #define _SMODE 7
  3516. #define _DMODE 5
  3517. #define FUNCNAME draw_sprite_opaque_s7_d5
  3518. #include "video/csh3blit.inc"
  3519. #undef FUNCNAME
  3520. #undef _SMODE
  3521. #undef _DMODE
  3522.  
  3523.  
  3524. #define _SMODE 0
  3525. #define _DMODE 6
  3526. #define FUNCNAME draw_sprite_opaque_s0_d6
  3527. #include "video/csh3blit.inc"
  3528. #undef FUNCNAME
  3529. #undef _SMODE
  3530. #undef _DMODE
  3531.  
  3532. #define _SMODE 1
  3533. #define _DMODE 6
  3534. #define FUNCNAME draw_sprite_opaque_s1_d6
  3535. #include "video/csh3blit.inc"
  3536. #undef FUNCNAME
  3537. #undef _SMODE
  3538. #undef _DMODE
  3539.  
  3540. #define _SMODE 2
  3541. #define _DMODE 6
  3542. #define FUNCNAME draw_sprite_opaque_s2_d6
  3543. #include "video/csh3blit.inc"
  3544. #undef FUNCNAME
  3545. #undef _SMODE
  3546. #undef _DMODE
  3547.  
  3548. #define _SMODE 3
  3549. #define _DMODE 6
  3550. #define FUNCNAME draw_sprite_opaque_s3_d6
  3551. #include "video/csh3blit.inc"
  3552. #undef FUNCNAME
  3553. #undef _SMODE
  3554. #undef _DMODE
  3555.  
  3556. #define _SMODE 4
  3557. #define _DMODE 6
  3558. #define FUNCNAME draw_sprite_opaque_s4_d6
  3559. #include "video/csh3blit.inc"
  3560. #undef FUNCNAME
  3561. #undef _SMODE
  3562. #undef _DMODE
  3563.  
  3564. #define _SMODE 5
  3565. #define _DMODE 6
  3566. #define FUNCNAME draw_sprite_opaque_s5_d6
  3567. #include "video/csh3blit.inc"
  3568. #undef FUNCNAME
  3569. #undef _SMODE
  3570. #undef _DMODE
  3571.  
  3572. #define _SMODE 6
  3573. #define _DMODE 6
  3574. #define FUNCNAME draw_sprite_opaque_s6_d6
  3575. #include "video/csh3blit.inc"
  3576. #undef FUNCNAME
  3577. #undef _SMODE
  3578. #undef _DMODE
  3579.  
  3580. #define _SMODE 7
  3581. #define _DMODE 6
  3582. #define FUNCNAME draw_sprite_opaque_s7_d6
  3583. #include "video/csh3blit.inc"
  3584. #undef FUNCNAME
  3585. #undef _SMODE
  3586. #undef _DMODE
  3587.  
  3588.  
  3589. #define _SMODE 0
  3590. #define _DMODE 7
  3591. #define FUNCNAME draw_sprite_opaque_s0_d7
  3592. #include "video/csh3blit.inc"
  3593. #undef FUNCNAME
  3594. #undef _SMODE
  3595. #undef _DMODE
  3596.  
  3597. #define _SMODE 1
  3598. #define _DMODE 7
  3599. #define FUNCNAME draw_sprite_opaque_s1_d7
  3600. #include "video/csh3blit.inc"
  3601. #undef FUNCNAME
  3602. #undef _SMODE
  3603. #undef _DMODE
  3604.  
  3605. #define _SMODE 2
  3606. #define _DMODE 7
  3607. #define FUNCNAME draw_sprite_opaque_s2_d7
  3608. #include "video/csh3blit.inc"
  3609. #undef FUNCNAME
  3610. #undef _SMODE
  3611. #undef _DMODE
  3612.  
  3613. #define _SMODE 3
  3614. #define _DMODE 7
  3615. #define FUNCNAME draw_sprite_opaque_s3_d7
  3616. #include "video/csh3blit.inc"
  3617. #undef FUNCNAME
  3618. #undef _SMODE
  3619. #undef _DMODE
  3620.  
  3621. #define _SMODE 4
  3622. #define _DMODE 7
  3623. #define FUNCNAME draw_sprite_opaque_s4_d7
  3624. #include "video/csh3blit.inc"
  3625. #undef FUNCNAME
  3626. #undef _SMODE
  3627. #undef _DMODE
  3628.  
  3629. #define _SMODE 5
  3630. #define _DMODE 7
  3631. #define FUNCNAME draw_sprite_opaque_s5_d7
  3632. #include "video/csh3blit.inc"
  3633. #undef FUNCNAME
  3634. #undef _SMODE
  3635. #undef _DMODE
  3636.  
  3637. #define _SMODE 6
  3638. #define _DMODE 7
  3639. #define FUNCNAME draw_sprite_opaque_s6_d7
  3640. #include "video/csh3blit.inc"
  3641. #undef FUNCNAME
  3642. #undef _SMODE
  3643. #undef _DMODE
  3644.  
  3645. #define _SMODE 7
  3646. #define _DMODE 7
  3647. #define FUNCNAME draw_sprite_opaque_s7_d7
  3648. #include "video/csh3blit.inc"
  3649. #undef FUNCNAME
  3650. #undef _SMODE
  3651. #undef _DMODE
  3652.  
  3653. #undef BLENDED
  3654.  
  3655. #undef TRANSPARENT
  3656.  
  3657.  
  3658. // flipped X cases
  3659.  
  3660. #define FLIPX 1
  3661. #define TRANSPARENT 1
  3662.  
  3663. #define FUNCNAME draw_sprite_flipx_plain
  3664. #include "video/csh3blit.inc"
  3665. #undef FUNCNAME
  3666.  
  3667.  
  3668. #define BLENDED
  3669.  
  3670. #define _SMODE 0
  3671. #define _DMODE 0
  3672. #define FUNCNAME draw_sprite_flipx_s0_d0
  3673. #include "video/csh3blit.inc"
  3674. #undef FUNCNAME
  3675. #undef _SMODE
  3676. #undef _DMODE
  3677.  
  3678. #define _SMODE 1
  3679. #define _DMODE 0
  3680. #define FUNCNAME draw_sprite_flipx_s1_d0
  3681. #include "video/csh3blit.inc"
  3682. #undef FUNCNAME
  3683. #undef _SMODE
  3684. #undef _DMODE
  3685.  
  3686. #define _SMODE 2
  3687. #define _DMODE 0
  3688. #define FUNCNAME draw_sprite_flipx_s2_d0
  3689. #include "video/csh3blit.inc"
  3690. #undef FUNCNAME
  3691. #undef _SMODE
  3692. #undef _DMODE
  3693.  
  3694. #define _SMODE 3
  3695. #define _DMODE 0
  3696. #define FUNCNAME draw_sprite_flipx_s3_d0
  3697. #include "video/csh3blit.inc"
  3698. #undef FUNCNAME
  3699. #undef _SMODE
  3700. #undef _DMODE
  3701.  
  3702. #define _SMODE 4
  3703. #define _DMODE 0
  3704. #define FUNCNAME draw_sprite_flipx_s4_d0
  3705. #include "video/csh3blit.inc"
  3706. #undef FUNCNAME
  3707. #undef _SMODE
  3708. #undef _DMODE
  3709.  
  3710. #define _SMODE 5
  3711. #define _DMODE 0
  3712. #define FUNCNAME draw_sprite_flipx_s5_d0
  3713. #include "video/csh3blit.inc"
  3714. #undef FUNCNAME
  3715. #undef _SMODE
  3716. #undef _DMODE
  3717.  
  3718. #define _SMODE 6
  3719. #define _DMODE 0
  3720. #define FUNCNAME draw_sprite_flipx_s6_d0
  3721. #include "video/csh3blit.inc"
  3722. #undef FUNCNAME
  3723. #undef _SMODE
  3724. #undef _DMODE
  3725.  
  3726. #define _SMODE 7
  3727. #define _DMODE 0
  3728. #define FUNCNAME draw_sprite_flipx_s7_d0
  3729. #include "video/csh3blit.inc"
  3730. #undef FUNCNAME
  3731. #undef _SMODE
  3732. #undef _DMODE
  3733.  
  3734.  
  3735. #define _SMODE 0
  3736. #define _DMODE 1
  3737. #define FUNCNAME draw_sprite_flipx_s0_d1
  3738. #include "video/csh3blit.inc"
  3739. #undef FUNCNAME
  3740. #undef _SMODE
  3741. #undef _DMODE
  3742.  
  3743. #define _SMODE 1
  3744. #define _DMODE 1
  3745. #define FUNCNAME draw_sprite_flipx_s1_d1
  3746. #include "video/csh3blit.inc"
  3747. #undef FUNCNAME
  3748. #undef _SMODE
  3749. #undef _DMODE
  3750.  
  3751. #define _SMODE 2
  3752. #define _DMODE 1
  3753. #define FUNCNAME draw_sprite_flipx_s2_d1
  3754. #include "video/csh3blit.inc"
  3755. #undef FUNCNAME
  3756. #undef _SMODE
  3757. #undef _DMODE
  3758.  
  3759. #define _SMODE 3
  3760. #define _DMODE 1
  3761. #define FUNCNAME draw_sprite_flipx_s3_d1
  3762. #include "video/csh3blit.inc"
  3763. #undef FUNCNAME
  3764. #undef _SMODE
  3765. #undef _DMODE
  3766.  
  3767. #define _SMODE 4
  3768. #define _DMODE 1
  3769. #define FUNCNAME draw_sprite_flipx_s4_d1
  3770. #include "video/csh3blit.inc"
  3771. #undef FUNCNAME
  3772. #undef _SMODE
  3773. #undef _DMODE
  3774.  
  3775. #define _SMODE 5
  3776. #define _DMODE 1
  3777. #define FUNCNAME draw_sprite_flipx_s5_d1
  3778. #include "video/csh3blit.inc"
  3779. #undef FUNCNAME
  3780. #undef _SMODE
  3781. #undef _DMODE
  3782.  
  3783. #define _SMODE 6
  3784. #define _DMODE 1
  3785. #define FUNCNAME draw_sprite_flipx_s6_d1
  3786. #include "video/csh3blit.inc"
  3787. #undef FUNCNAME
  3788. #undef _SMODE
  3789. #undef _DMODE
  3790.  
  3791. #define _SMODE 7
  3792. #define _DMODE 1
  3793. #define FUNCNAME draw_sprite_flipx_s7_d1
  3794. #include "video/csh3blit.inc"
  3795. #undef FUNCNAME
  3796. #undef _SMODE
  3797. #undef _DMODE
  3798.  
  3799.  
  3800. #define _SMODE 0
  3801. #define _DMODE 2
  3802. #define FUNCNAME draw_sprite_flipx_s0_d2
  3803. #include "video/csh3blit.inc"
  3804. #undef FUNCNAME
  3805. #undef _SMODE
  3806. #undef _DMODE
  3807.  
  3808. #define _SMODE 1
  3809. #define _DMODE 2
  3810. #define FUNCNAME draw_sprite_flipx_s1_d2
  3811. #include "video/csh3blit.inc"
  3812. #undef FUNCNAME
  3813. #undef _SMODE
  3814. #undef _DMODE
  3815.  
  3816. #define _SMODE 2
  3817. #define _DMODE 2
  3818. #define FUNCNAME draw_sprite_flipx_s2_d2
  3819. #include "video/csh3blit.inc"
  3820. #undef FUNCNAME
  3821. #undef _SMODE
  3822. #undef _DMODE
  3823.  
  3824. #define _SMODE 3
  3825. #define _DMODE 2
  3826. #define FUNCNAME draw_sprite_flipx_s3_d2
  3827. #include "video/csh3blit.inc"
  3828. #undef FUNCNAME
  3829. #undef _SMODE
  3830. #undef _DMODE
  3831.  
  3832. #define _SMODE 4
  3833. #define _DMODE 2
  3834. #define FUNCNAME draw_sprite_flipx_s4_d2
  3835. #include "video/csh3blit.inc"
  3836. #undef FUNCNAME
  3837. #undef _SMODE
  3838. #undef _DMODE
  3839.  
  3840. #define _SMODE 5
  3841. #define _DMODE 2
  3842. #define FUNCNAME draw_sprite_flipx_s5_d2
  3843. #include "video/csh3blit.inc"
  3844. #undef FUNCNAME
  3845. #undef _SMODE
  3846. #undef _DMODE
  3847.  
  3848. #define _SMODE 6
  3849. #define _DMODE 2
  3850. #define FUNCNAME draw_sprite_flipx_s6_d2
  3851. #include "video/csh3blit.inc"
  3852. #undef FUNCNAME
  3853. #undef _SMODE
  3854. #undef _DMODE
  3855.  
  3856. #define _SMODE 7
  3857. #define _DMODE 2
  3858. #define FUNCNAME draw_sprite_flipx_s7_d2
  3859. #include "video/csh3blit.inc"
  3860. #undef FUNCNAME
  3861. #undef _SMODE
  3862. #undef _DMODE
  3863.  
  3864.  
  3865. #define _SMODE 0
  3866. #define _DMODE 3
  3867. #define FUNCNAME draw_sprite_flipx_s0_d3
  3868. #include "video/csh3blit.inc"
  3869. #undef FUNCNAME
  3870. #undef _SMODE
  3871. #undef _DMODE
  3872.  
  3873. #define _SMODE 1
  3874. #define _DMODE 3
  3875. #define FUNCNAME draw_sprite_flipx_s1_d3
  3876. #include "video/csh3blit.inc"
  3877. #undef FUNCNAME
  3878. #undef _SMODE
  3879. #undef _DMODE
  3880.  
  3881. #define _SMODE 2
  3882. #define _DMODE 3
  3883. #define FUNCNAME draw_sprite_flipx_s2_d3
  3884. #include "video/csh3blit.inc"
  3885. #undef FUNCNAME
  3886. #undef _SMODE
  3887. #undef _DMODE
  3888.  
  3889. #define _SMODE 3
  3890. #define _DMODE 3
  3891. #define FUNCNAME draw_sprite_flipx_s3_d3
  3892. #include "video/csh3blit.inc"
  3893. #undef FUNCNAME
  3894. #undef _SMODE
  3895. #undef _DMODE
  3896.  
  3897. #define _SMODE 4
  3898. #define _DMODE 3
  3899. #define FUNCNAME draw_sprite_flipx_s4_d3
  3900. #include "video/csh3blit.inc"
  3901. #undef FUNCNAME
  3902. #undef _SMODE
  3903. #undef _DMODE
  3904.  
  3905. #define _SMODE 5
  3906. #define _DMODE 3
  3907. #define FUNCNAME draw_sprite_flipx_s5_d3
  3908. #include "video/csh3blit.inc"
  3909. #undef FUNCNAME
  3910. #undef _SMODE
  3911. #undef _DMODE
  3912.  
  3913. #define _SMODE 6
  3914. #define _DMODE 3
  3915. #define FUNCNAME draw_sprite_flipx_s6_d3
  3916. #include "video/csh3blit.inc"
  3917. #undef FUNCNAME
  3918. #undef _SMODE
  3919. #undef _DMODE
  3920.  
  3921. #define _SMODE 7
  3922. #define _DMODE 3
  3923. #define FUNCNAME draw_sprite_flipx_s7_d3
  3924. #include "video/csh3blit.inc"
  3925. #undef FUNCNAME
  3926. #undef _SMODE
  3927. #undef _DMODE
  3928.  
  3929.  
  3930. #define _SMODE 0
  3931. #define _DMODE 4
  3932. #define FUNCNAME draw_sprite_flipx_s0_d4
  3933. #include "video/csh3blit.inc"
  3934. #undef FUNCNAME
  3935. #undef _SMODE
  3936. #undef _DMODE
  3937.  
  3938. #define _SMODE 1
  3939. #define _DMODE 4
  3940. #define FUNCNAME draw_sprite_flipx_s1_d4
  3941. #include "video/csh3blit.inc"
  3942. #undef FUNCNAME
  3943. #undef _SMODE
  3944. #undef _DMODE
  3945.  
  3946. #define _SMODE 2
  3947. #define _DMODE 4
  3948. #define FUNCNAME draw_sprite_flipx_s2_d4
  3949. #include "video/csh3blit.inc"
  3950. #undef FUNCNAME
  3951. #undef _SMODE
  3952. #undef _DMODE
  3953.  
  3954. #define _SMODE 3
  3955. #define _DMODE 4
  3956. #define FUNCNAME draw_sprite_flipx_s3_d4
  3957. #include "video/csh3blit.inc"
  3958. #undef FUNCNAME
  3959. #undef _SMODE
  3960. #undef _DMODE
  3961.  
  3962. #define _SMODE 4
  3963. #define _DMODE 4
  3964. #define FUNCNAME draw_sprite_flipx_s4_d4
  3965. #include "video/csh3blit.inc"
  3966. #undef FUNCNAME
  3967. #undef _SMODE
  3968. #undef _DMODE
  3969.  
  3970. #define _SMODE 5
  3971. #define _DMODE 4
  3972. #define FUNCNAME draw_sprite_flipx_s5_d4
  3973. #include "video/csh3blit.inc"
  3974. #undef FUNCNAME
  3975. #undef _SMODE
  3976. #undef _DMODE
  3977.  
  3978. #define _SMODE 6
  3979. #define _DMODE 4
  3980. #define FUNCNAME draw_sprite_flipx_s6_d4
  3981. #include "video/csh3blit.inc"
  3982. #undef FUNCNAME
  3983. #undef _SMODE
  3984. #undef _DMODE
  3985.  
  3986. #define _SMODE 7
  3987. #define _DMODE 4
  3988. #define FUNCNAME draw_sprite_flipx_s7_d4
  3989. #include "video/csh3blit.inc"
  3990. #undef FUNCNAME
  3991. #undef _SMODE
  3992. #undef _DMODE
  3993.  
  3994.  
  3995. #define _SMODE 0
  3996. #define _DMODE 5
  3997. #define FUNCNAME draw_sprite_flipx_s0_d5
  3998. #include "video/csh3blit.inc"
  3999. #undef FUNCNAME
  4000. #undef _SMODE
  4001. #undef _DMODE
  4002.  
  4003. #define _SMODE 1
  4004. #define _DMODE 5
  4005. #define FUNCNAME draw_sprite_flipx_s1_d5
  4006. #include "video/csh3blit.inc"
  4007. #undef FUNCNAME
  4008. #undef _SMODE
  4009. #undef _DMODE
  4010.  
  4011. #define _SMODE 2
  4012. #define _DMODE 5
  4013. #define FUNCNAME draw_sprite_flipx_s2_d5
  4014. #include "video/csh3blit.inc"
  4015. #undef FUNCNAME
  4016. #undef _SMODE
  4017. #undef _DMODE
  4018.  
  4019. #define _SMODE 3
  4020. #define _DMODE 5
  4021. #define FUNCNAME draw_sprite_flipx_s3_d5
  4022. #include "video/csh3blit.inc"
  4023. #undef FUNCNAME
  4024. #undef _SMODE
  4025. #undef _DMODE
  4026.  
  4027. #define _SMODE 4
  4028. #define _DMODE 5
  4029. #define FUNCNAME draw_sprite_flipx_s4_d5
  4030. #include "video/csh3blit.inc"
  4031. #undef FUNCNAME
  4032. #undef _SMODE
  4033. #undef _DMODE
  4034.  
  4035. #define _SMODE 5
  4036. #define _DMODE 5
  4037. #define FUNCNAME draw_sprite_flipx_s5_d5
  4038. #include "video/csh3blit.inc"
  4039. #undef FUNCNAME
  4040. #undef _SMODE
  4041. #undef _DMODE
  4042.  
  4043. #define _SMODE 6
  4044. #define _DMODE 5
  4045. #define FUNCNAME draw_sprite_flipx_s6_d5
  4046. #include "video/csh3blit.inc"
  4047. #undef FUNCNAME
  4048. #undef _SMODE
  4049. #undef _DMODE
  4050.  
  4051. #define _SMODE 7
  4052. #define _DMODE 5
  4053. #define FUNCNAME draw_sprite_flipx_s7_d5
  4054. #include "video/csh3blit.inc"
  4055. #undef FUNCNAME
  4056. #undef _SMODE
  4057. #undef _DMODE
  4058.  
  4059.  
  4060. #define _SMODE 0
  4061. #define _DMODE 6
  4062. #define FUNCNAME draw_sprite_flipx_s0_d6
  4063. #include "video/csh3blit.inc"
  4064. #undef FUNCNAME
  4065. #undef _SMODE
  4066. #undef _DMODE
  4067.  
  4068. #define _SMODE 1
  4069. #define _DMODE 6
  4070. #define FUNCNAME draw_sprite_flipx_s1_d6
  4071. #include "video/csh3blit.inc"
  4072. #undef FUNCNAME
  4073. #undef _SMODE
  4074. #undef _DMODE
  4075.  
  4076. #define _SMODE 2
  4077. #define _DMODE 6
  4078. #define FUNCNAME draw_sprite_flipx_s2_d6
  4079. #include "video/csh3blit.inc"
  4080. #undef FUNCNAME
  4081. #undef _SMODE
  4082. #undef _DMODE
  4083.  
  4084. #define _SMODE 3
  4085. #define _DMODE 6
  4086. #define FUNCNAME draw_sprite_flipx_s3_d6
  4087. #include "video/csh3blit.inc"
  4088. #undef FUNCNAME
  4089. #undef _SMODE
  4090. #undef _DMODE
  4091.  
  4092. #define _SMODE 4
  4093. #define _DMODE 6
  4094. #define FUNCNAME draw_sprite_flipx_s4_d6
  4095. #include "video/csh3blit.inc"
  4096. #undef FUNCNAME
  4097. #undef _SMODE
  4098. #undef _DMODE
  4099.  
  4100. #define _SMODE 5
  4101. #define _DMODE 6
  4102. #define FUNCNAME draw_sprite_flipx_s5_d6
  4103. #include "video/csh3blit.inc"
  4104. #undef FUNCNAME
  4105. #undef _SMODE
  4106. #undef _DMODE
  4107.  
  4108. #define _SMODE 6
  4109. #define _DMODE 6
  4110. #define FUNCNAME draw_sprite_flipx_s6_d6
  4111. #include "video/csh3blit.inc"
  4112. #undef FUNCNAME
  4113. #undef _SMODE
  4114. #undef _DMODE
  4115.  
  4116. #define _SMODE 7
  4117. #define _DMODE 6
  4118. #define FUNCNAME draw_sprite_flipx_s7_d6
  4119. #include "video/csh3blit.inc"
  4120. #undef FUNCNAME
  4121. #undef _SMODE
  4122. #undef _DMODE
  4123.  
  4124.  
  4125. #define _SMODE 0
  4126. #define _DMODE 7
  4127. #define FUNCNAME draw_sprite_flipx_s0_d7
  4128. #include "video/csh3blit.inc"
  4129. #undef FUNCNAME
  4130. #undef _SMODE
  4131. #undef _DMODE
  4132.  
  4133. #define _SMODE 1
  4134. #define _DMODE 7
  4135. #define FUNCNAME draw_sprite_flipx_s1_d7
  4136. #include "video/csh3blit.inc"
  4137. #undef FUNCNAME
  4138. #undef _SMODE
  4139. #undef _DMODE
  4140.  
  4141. #define _SMODE 2
  4142. #define _DMODE 7
  4143. #define FUNCNAME draw_sprite_flipx_s2_d7
  4144. #include "video/csh3blit.inc"
  4145. #undef FUNCNAME
  4146. #undef _SMODE
  4147. #undef _DMODE
  4148.  
  4149. #define _SMODE 3
  4150. #define _DMODE 7
  4151. #define FUNCNAME draw_sprite_flipx_s3_d7
  4152. #include "video/csh3blit.inc"
  4153. #undef FUNCNAME
  4154. #undef _SMODE
  4155. #undef _DMODE
  4156.  
  4157. #define _SMODE 4
  4158. #define _DMODE 7
  4159. #define FUNCNAME draw_sprite_flipx_s4_d7
  4160. #include "video/csh3blit.inc"
  4161. #undef FUNCNAME
  4162. #undef _SMODE
  4163. #undef _DMODE
  4164.  
  4165. #define _SMODE 5
  4166. #define _DMODE 7
  4167. #define FUNCNAME draw_sprite_flipx_s5_d7
  4168. #include "video/csh3blit.inc"
  4169. #undef FUNCNAME
  4170. #undef _SMODE
  4171. #undef _DMODE
  4172.  
  4173. #define _SMODE 6
  4174. #define _DMODE 7
  4175. #define FUNCNAME draw_sprite_flipx_s6_d7
  4176. #include "video/csh3blit.inc"
  4177. #undef FUNCNAME
  4178. #undef _SMODE
  4179. #undef _DMODE
  4180.  
  4181. #define _SMODE 7
  4182. #define _DMODE 7
  4183. #define FUNCNAME draw_sprite_flipx_s7_d7
  4184. #include "video/csh3blit.inc"
  4185. #undef FUNCNAME
  4186. #undef _SMODE
  4187. #undef _DMODE
  4188.  
  4189. #undef BLENDED
  4190.  
  4191. #undef TRANSPARENT
  4192. #define TRANSPARENT 0
  4193.  
  4194. #define FUNCNAME draw_sprite_flipx_opaque_plain
  4195. #include "video/csh3blit.inc"
  4196. #undef FUNCNAME
  4197.  
  4198.  
  4199. #define BLENDED
  4200.  
  4201. #define _SMODE 0
  4202. #define _DMODE 0
  4203. #define FUNCNAME draw_sprite_flipx_opaque_s0_d0
  4204. #include "video/csh3blit.inc"
  4205. #undef FUNCNAME
  4206. #undef _SMODE
  4207. #undef _DMODE
  4208.  
  4209. #define _SMODE 1
  4210. #define _DMODE 0
  4211. #define FUNCNAME draw_sprite_flipx_opaque_s1_d0
  4212. #include "video/csh3blit.inc"
  4213. #undef FUNCNAME
  4214. #undef _SMODE
  4215. #undef _DMODE
  4216.  
  4217. #define _SMODE 2
  4218. #define _DMODE 0
  4219. #define FUNCNAME draw_sprite_flipx_opaque_s2_d0
  4220. #include "video/csh3blit.inc"
  4221. #undef FUNCNAME
  4222. #undef _SMODE
  4223. #undef _DMODE
  4224.  
  4225. #define _SMODE 3
  4226. #define _DMODE 0
  4227. #define FUNCNAME draw_sprite_flipx_opaque_s3_d0
  4228. #include "video/csh3blit.inc"
  4229. #undef FUNCNAME
  4230. #undef _SMODE
  4231. #undef _DMODE
  4232.  
  4233. #define _SMODE 4
  4234. #define _DMODE 0
  4235. #define FUNCNAME draw_sprite_flipx_opaque_s4_d0
  4236. #include "video/csh3blit.inc"
  4237. #undef FUNCNAME
  4238. #undef _SMODE
  4239. #undef _DMODE
  4240.  
  4241. #define _SMODE 5
  4242. #define _DMODE 0
  4243. #define FUNCNAME draw_sprite_flipx_opaque_s5_d0
  4244. #include "video/csh3blit.inc"
  4245. #undef FUNCNAME
  4246. #undef _SMODE
  4247. #undef _DMODE
  4248.  
  4249. #define _SMODE 6
  4250. #define _DMODE 0
  4251. #define FUNCNAME draw_sprite_flipx_opaque_s6_d0
  4252. #include "video/csh3blit.inc"
  4253. #undef FUNCNAME
  4254. #undef _SMODE
  4255. #undef _DMODE
  4256.  
  4257. #define _SMODE 7
  4258. #define _DMODE 0
  4259. #define FUNCNAME draw_sprite_flipx_opaque_s7_d0
  4260. #include "video/csh3blit.inc"
  4261. #undef FUNCNAME
  4262. #undef _SMODE
  4263. #undef _DMODE
  4264.  
  4265.  
  4266. #define _SMODE 0
  4267. #define _DMODE 1
  4268. #define FUNCNAME draw_sprite_flipx_opaque_s0_d1
  4269. #include "video/csh3blit.inc"
  4270. #undef FUNCNAME
  4271. #undef _SMODE
  4272. #undef _DMODE
  4273.  
  4274. #define _SMODE 1
  4275. #define _DMODE 1
  4276. #define FUNCNAME draw_sprite_flipx_opaque_s1_d1
  4277. #include "video/csh3blit.inc"
  4278. #undef FUNCNAME
  4279. #undef _SMODE
  4280. #undef _DMODE
  4281.  
  4282. #define _SMODE 2
  4283. #define _DMODE 1
  4284. #define FUNCNAME draw_sprite_flipx_opaque_s2_d1
  4285. #include "video/csh3blit.inc"
  4286. #undef FUNCNAME
  4287. #undef _SMODE
  4288. #undef _DMODE
  4289.  
  4290. #define _SMODE 3
  4291. #define _DMODE 1
  4292. #define FUNCNAME draw_sprite_flipx_opaque_s3_d1
  4293. #include "video/csh3blit.inc"
  4294. #undef FUNCNAME
  4295. #undef _SMODE
  4296. #undef _DMODE
  4297.  
  4298. #define _SMODE 4
  4299. #define _DMODE 1
  4300. #define FUNCNAME draw_sprite_flipx_opaque_s4_d1
  4301. #include "video/csh3blit.inc"
  4302. #undef FUNCNAME
  4303. #undef _SMODE
  4304. #undef _DMODE
  4305.  
  4306. #define _SMODE 5
  4307. #define _DMODE 1
  4308. #define FUNCNAME draw_sprite_flipx_opaque_s5_d1
  4309. #include "video/csh3blit.inc"
  4310. #undef FUNCNAME
  4311. #undef _SMODE
  4312. #undef _DMODE
  4313.  
  4314. #define _SMODE 6
  4315. #define _DMODE 1
  4316. #define FUNCNAME draw_sprite_flipx_opaque_s6_d1
  4317. #include "video/csh3blit.inc"
  4318. #undef FUNCNAME
  4319. #undef _SMODE
  4320. #undef _DMODE
  4321.  
  4322. #define _SMODE 7
  4323. #define _DMODE 1
  4324. #define FUNCNAME draw_sprite_flipx_opaque_s7_d1
  4325. #include "video/csh3blit.inc"
  4326. #undef FUNCNAME
  4327. #undef _SMODE
  4328. #undef _DMODE
  4329.  
  4330.  
  4331. #define _SMODE 0
  4332. #define _DMODE 2
  4333. #define FUNCNAME draw_sprite_flipx_opaque_s0_d2
  4334. #include "video/csh3blit.inc"
  4335. #undef FUNCNAME
  4336. #undef _SMODE
  4337. #undef _DMODE
  4338.  
  4339. #define _SMODE 1
  4340. #define _DMODE 2
  4341. #define FUNCNAME draw_sprite_flipx_opaque_s1_d2
  4342. #include "video/csh3blit.inc"
  4343. #undef FUNCNAME
  4344. #undef _SMODE
  4345. #undef _DMODE
  4346.  
  4347. #define _SMODE 2
  4348. #define _DMODE 2
  4349. #define FUNCNAME draw_sprite_flipx_opaque_s2_d2
  4350. #include "video/csh3blit.inc"
  4351. #undef FUNCNAME
  4352. #undef _SMODE
  4353. #undef _DMODE
  4354.  
  4355. #define _SMODE 3
  4356. #define _DMODE 2
  4357. #define FUNCNAME draw_sprite_flipx_opaque_s3_d2
  4358. #include "video/csh3blit.inc"
  4359. #undef FUNCNAME
  4360. #undef _SMODE
  4361. #undef _DMODE
  4362.  
  4363. #define _SMODE 4
  4364. #define _DMODE 2
  4365. #define FUNCNAME draw_sprite_flipx_opaque_s4_d2
  4366. #include "video/csh3blit.inc"
  4367. #undef FUNCNAME
  4368. #undef _SMODE
  4369. #undef _DMODE
  4370.  
  4371. #define _SMODE 5
  4372. #define _DMODE 2
  4373. #define FUNCNAME draw_sprite_flipx_opaque_s5_d2
  4374. #include "video/csh3blit.inc"
  4375. #undef FUNCNAME
  4376. #undef _SMODE
  4377. #undef _DMODE
  4378.  
  4379. #define _SMODE 6
  4380. #define _DMODE 2
  4381. #define FUNCNAME draw_sprite_flipx_opaque_s6_d2
  4382. #include "video/csh3blit.inc"
  4383. #undef FUNCNAME
  4384. #undef _SMODE
  4385. #undef _DMODE
  4386.  
  4387. #define _SMODE 7
  4388. #define _DMODE 2
  4389. #define FUNCNAME draw_sprite_flipx_opaque_s7_d2
  4390. #include "video/csh3blit.inc"
  4391. #undef FUNCNAME
  4392. #undef _SMODE
  4393. #undef _DMODE
  4394.  
  4395.  
  4396. #define _SMODE 0
  4397. #define _DMODE 3
  4398. #define FUNCNAME draw_sprite_flipx_opaque_s0_d3
  4399. #include "video/csh3blit.inc"
  4400. #undef FUNCNAME
  4401. #undef _SMODE
  4402. #undef _DMODE
  4403.  
  4404. #define _SMODE 1
  4405. #define _DMODE 3
  4406. #define FUNCNAME draw_sprite_flipx_opaque_s1_d3
  4407. #include "video/csh3blit.inc"
  4408. #undef FUNCNAME
  4409. #undef _SMODE
  4410. #undef _DMODE
  4411.  
  4412. #define _SMODE 2
  4413. #define _DMODE 3
  4414. #define FUNCNAME draw_sprite_flipx_opaque_s2_d3
  4415. #include "video/csh3blit.inc"
  4416. #undef FUNCNAME
  4417. #undef _SMODE
  4418. #undef _DMODE
  4419.  
  4420. #define _SMODE 3
  4421. #define _DMODE 3
  4422. #define FUNCNAME draw_sprite_flipx_opaque_s3_d3
  4423. #include "video/csh3blit.inc"
  4424. #undef FUNCNAME
  4425. #undef _SMODE
  4426. #undef _DMODE
  4427.  
  4428. #define _SMODE 4
  4429. #define _DMODE 3
  4430. #define FUNCNAME draw_sprite_flipx_opaque_s4_d3
  4431. #include "video/csh3blit.inc"
  4432. #undef FUNCNAME
  4433. #undef _SMODE
  4434. #undef _DMODE
  4435.  
  4436. #define _SMODE 5
  4437. #define _DMODE 3
  4438. #define FUNCNAME draw_sprite_flipx_opaque_s5_d3
  4439. #include "video/csh3blit.inc"
  4440. #undef FUNCNAME
  4441. #undef _SMODE
  4442. #undef _DMODE
  4443.  
  4444. #define _SMODE 6
  4445. #define _DMODE 3
  4446. #define FUNCNAME draw_sprite_flipx_opaque_s6_d3
  4447. #include "video/csh3blit.inc"
  4448. #undef FUNCNAME
  4449. #undef _SMODE
  4450. #undef _DMODE
  4451.  
  4452. #define _SMODE 7
  4453. #define _DMODE 3
  4454. #define FUNCNAME draw_sprite_flipx_opaque_s7_d3
  4455. #include "video/csh3blit.inc"
  4456. #undef FUNCNAME
  4457. #undef _SMODE
  4458. #undef _DMODE
  4459.  
  4460.  
  4461. #define _SMODE 0
  4462. #define _DMODE 4
  4463. #define FUNCNAME draw_sprite_flipx_opaque_s0_d4
  4464. #include "video/csh3blit.inc"
  4465. #undef FUNCNAME
  4466. #undef _SMODE
  4467. #undef _DMODE
  4468.  
  4469. #define _SMODE 1
  4470. #define _DMODE 4
  4471. #define FUNCNAME draw_sprite_flipx_opaque_s1_d4
  4472. #include "video/csh3blit.inc"
  4473. #undef FUNCNAME
  4474. #undef _SMODE
  4475. #undef _DMODE
  4476.  
  4477. #define _SMODE 2
  4478. #define _DMODE 4
  4479. #define FUNCNAME draw_sprite_flipx_opaque_s2_d4
  4480. #include "video/csh3blit.inc"
  4481. #undef FUNCNAME
  4482. #undef _SMODE
  4483. #undef _DMODE
  4484.  
  4485. #define _SMODE 3
  4486. #define _DMODE 4
  4487. #define FUNCNAME draw_sprite_flipx_opaque_s3_d4
  4488. #include "video/csh3blit.inc"
  4489. #undef FUNCNAME
  4490. #undef _SMODE
  4491. #undef _DMODE
  4492.  
  4493. #define _SMODE 4
  4494. #define _DMODE 4
  4495. #define FUNCNAME draw_sprite_flipx_opaque_s4_d4
  4496. #include "video/csh3blit.inc"
  4497. #undef FUNCNAME
  4498. #undef _SMODE
  4499. #undef _DMODE
  4500.  
  4501. #define _SMODE 5
  4502. #define _DMODE 4
  4503. #define FUNCNAME draw_sprite_flipx_opaque_s5_d4
  4504. #include "video/csh3blit.inc"
  4505. #undef FUNCNAME
  4506. #undef _SMODE
  4507. #undef _DMODE
  4508.  
  4509. #define _SMODE 6
  4510. #define _DMODE 4
  4511. #define FUNCNAME draw_sprite_flipx_opaque_s6_d4
  4512. #include "video/csh3blit.inc"
  4513. #undef FUNCNAME
  4514. #undef _SMODE
  4515. #undef _DMODE
  4516.  
  4517. #define _SMODE 7
  4518. #define _DMODE 4
  4519. #define FUNCNAME draw_sprite_flipx_opaque_s7_d4
  4520. #include "video/csh3blit.inc"
  4521. #undef FUNCNAME
  4522. #undef _SMODE
  4523. #undef _DMODE
  4524.  
  4525.  
  4526. #define _SMODE 0
  4527. #define _DMODE 5
  4528. #define FUNCNAME draw_sprite_flipx_opaque_s0_d5
  4529. #include "video/csh3blit.inc"
  4530. #undef FUNCNAME
  4531. #undef _SMODE
  4532. #undef _DMODE
  4533.  
  4534. #define _SMODE 1
  4535. #define _DMODE 5
  4536. #define FUNCNAME draw_sprite_flipx_opaque_s1_d5
  4537. #include "video/csh3blit.inc"
  4538. #undef FUNCNAME
  4539. #undef _SMODE
  4540. #undef _DMODE
  4541.  
  4542. #define _SMODE 2
  4543. #define _DMODE 5
  4544. #define FUNCNAME draw_sprite_flipx_opaque_s2_d5
  4545. #include "video/csh3blit.inc"
  4546. #undef FUNCNAME
  4547. #undef _SMODE
  4548. #undef _DMODE
  4549.  
  4550. #define _SMODE 3
  4551. #define _DMODE 5
  4552. #define FUNCNAME draw_sprite_flipx_opaque_s3_d5
  4553. #include "video/csh3blit.inc"
  4554. #undef FUNCNAME
  4555. #undef _SMODE
  4556. #undef _DMODE
  4557.  
  4558. #define _SMODE 4
  4559. #define _DMODE 5
  4560. #define FUNCNAME draw_sprite_flipx_opaque_s4_d5
  4561. #include "video/csh3blit.inc"
  4562. #undef FUNCNAME
  4563. #undef _SMODE
  4564. #undef _DMODE
  4565.  
  4566. #define _SMODE 5
  4567. #define _DMODE 5
  4568. #define FUNCNAME draw_sprite_flipx_opaque_s5_d5
  4569. #include "video/csh3blit.inc"
  4570. #undef FUNCNAME
  4571. #undef _SMODE
  4572. #undef _DMODE
  4573.  
  4574. #define _SMODE 6
  4575. #define _DMODE 5
  4576. #define FUNCNAME draw_sprite_flipx_opaque_s6_d5
  4577. #include "video/csh3blit.inc"
  4578. #undef FUNCNAME
  4579. #undef _SMODE
  4580. #undef _DMODE
  4581.  
  4582. #define _SMODE 7
  4583. #define _DMODE 5
  4584. #define FUNCNAME draw_sprite_flipx_opaque_s7_d5
  4585. #include "video/csh3blit.inc"
  4586. #undef FUNCNAME
  4587. #undef _SMODE
  4588. #undef _DMODE
  4589.  
  4590.  
  4591. #define _SMODE 0
  4592. #define _DMODE 6
  4593. #define FUNCNAME draw_sprite_flipx_opaque_s0_d6
  4594. #include "video/csh3blit.inc"
  4595. #undef FUNCNAME
  4596. #undef _SMODE
  4597. #undef _DMODE
  4598.  
  4599. #define _SMODE 1
  4600. #define _DMODE 6
  4601. #define FUNCNAME draw_sprite_flipx_opaque_s1_d6
  4602. #include "video/csh3blit.inc"
  4603. #undef FUNCNAME
  4604. #undef _SMODE
  4605. #undef _DMODE
  4606.  
  4607. #define _SMODE 2
  4608. #define _DMODE 6
  4609. #define FUNCNAME draw_sprite_flipx_opaque_s2_d6
  4610. #include "video/csh3blit.inc"
  4611. #undef FUNCNAME
  4612. #undef _SMODE
  4613. #undef _DMODE
  4614.  
  4615. #define _SMODE 3
  4616. #define _DMODE 6
  4617. #define FUNCNAME draw_sprite_flipx_opaque_s3_d6
  4618. #include "video/csh3blit.inc"
  4619. #undef FUNCNAME
  4620. #undef _SMODE
  4621. #undef _DMODE
  4622.  
  4623. #define _SMODE 4
  4624. #define _DMODE 6
  4625. #define FUNCNAME draw_sprite_flipx_opaque_s4_d6
  4626. #include "video/csh3blit.inc"
  4627. #undef FUNCNAME
  4628. #undef _SMODE
  4629. #undef _DMODE
  4630.  
  4631. #define _SMODE 5
  4632. #define _DMODE 6
  4633. #define FUNCNAME draw_sprite_flipx_opaque_s5_d6
  4634. #include "video/csh3blit.inc"
  4635. #undef FUNCNAME
  4636. #undef _SMODE
  4637. #undef _DMODE
  4638.  
  4639. #define _SMODE 6
  4640. #define _DMODE 6
  4641. #define FUNCNAME draw_sprite_flipx_opaque_s6_d6
  4642. #include "video/csh3blit.inc"
  4643. #undef FUNCNAME
  4644. #undef _SMODE
  4645. #undef _DMODE
  4646.  
  4647. #define _SMODE 7
  4648. #define _DMODE 6
  4649. #define FUNCNAME draw_sprite_flipx_opaque_s7_d6
  4650. #include "video/csh3blit.inc"
  4651. #undef FUNCNAME
  4652. #undef _SMODE
  4653. #undef _DMODE
  4654.  
  4655.  
  4656. #define _SMODE 0
  4657. #define _DMODE 7
  4658. #define FUNCNAME draw_sprite_flipx_opaque_s0_d7
  4659. #include "video/csh3blit.inc"
  4660. #undef FUNCNAME
  4661. #undef _SMODE
  4662. #undef _DMODE
  4663.  
  4664. #define _SMODE 1
  4665. #define _DMODE 7
  4666. #define FUNCNAME draw_sprite_flipx_opaque_s1_d7
  4667. #include "video/csh3blit.inc"
  4668. #undef FUNCNAME
  4669. #undef _SMODE
  4670. #undef _DMODE
  4671.  
  4672. #define _SMODE 2
  4673. #define _DMODE 7
  4674. #define FUNCNAME draw_sprite_flipx_opaque_s2_d7
  4675. #include "video/csh3blit.inc"
  4676. #undef FUNCNAME
  4677. #undef _SMODE
  4678. #undef _DMODE
  4679.  
  4680. #define _SMODE 3
  4681. #define _DMODE 7
  4682. #define FUNCNAME draw_sprite_flipx_opaque_s3_d7
  4683. #include "video/csh3blit.inc"
  4684. #undef FUNCNAME
  4685. #undef _SMODE
  4686. #undef _DMODE
  4687.  
  4688. #define _SMODE 4
  4689. #define _DMODE 7
  4690. #define FUNCNAME draw_sprite_flipx_opaque_s4_d7
  4691. #include "video/csh3blit.inc"
  4692. #undef FUNCNAME
  4693. #undef _SMODE
  4694. #undef _DMODE
  4695.  
  4696. #define _SMODE 5
  4697. #define _DMODE 7
  4698. #define FUNCNAME draw_sprite_flipx_opaque_s5_d7
  4699. #include "video/csh3blit.inc"
  4700. #undef FUNCNAME
  4701. #undef _SMODE
  4702. #undef _DMODE
  4703.  
  4704. #define _SMODE 6
  4705. #define _DMODE 7
  4706. #define FUNCNAME draw_sprite_flipx_opaque_s6_d7
  4707. #include "video/csh3blit.inc"
  4708. #undef FUNCNAME
  4709. #undef _SMODE
  4710. #undef _DMODE
  4711.  
  4712. #define _SMODE 7
  4713. #define _DMODE 7
  4714. #define FUNCNAME draw_sprite_flipx_opaque_s7_d7
  4715. #include "video/csh3blit.inc"
  4716. #undef FUNCNAME
  4717. #undef _SMODE
  4718. #undef _DMODE
  4719.  
  4720. #undef BLENDED
  4721.  
  4722. #undef TRANSPARENT
  4723. #undef FLIPX
  4724.  
  4725. #undef TINT
  4726.  
  4727.  
  4728. INLINE UINT16 READ_NEXT_WORD(offs_t *addr)
  4729. {
  4730. UINT16 data = cavesh3_ram16_copy[((*addr&(0x7fffff))>>1)^3]; // this probably needs to be made endian safe tho
  4731. *addr += 2;
  4732.  
  4733. return data;
  4734. }
  4735.  
  4736. INLINE UINT16 COPY_NEXT_WORD(address_space &space, offs_t *addr)
  4737. {
  4738. UINT16 data = cavesh3_ram16[((*addr&(0x7fffff))>>1)^3]; // this probably needs to be made endian safe tho
  4739. cavesh3_ram16_copy[((*addr&(0x7fffff))>>1)^3] = data;
  4740. *addr += 2;
  4741.  
  4742. return data;
  4743. }
  4744.  
  4745.  
  4746. INLINE void cavesh_gfx_upload_shadow_copy(address_space &space, offs_t *addr)
  4747. {
  4748. UINT32 x,y, dimx,dimy;
  4749. COPY_NEXT_WORD(space, addr);
  4750. COPY_NEXT_WORD(space, addr);
  4751. COPY_NEXT_WORD(space, addr);
  4752. COPY_NEXT_WORD(space, addr);
  4753. COPY_NEXT_WORD(space, addr);
  4754. COPY_NEXT_WORD(space, addr);
  4755.  
  4756. dimx = (COPY_NEXT_WORD(space, addr) & 0x1fff) + 1;
  4757. dimy = (COPY_NEXT_WORD(space, addr) & 0x0fff) + 1;
  4758.  
  4759. for (y = 0; y < dimy; y++)
  4760. for (x = 0; x < dimx; x++)
  4761. COPY_NEXT_WORD(space, addr);
  4762. }
  4763.  
  4764. INLINE void cavesh_gfx_upload(offs_t *addr)
  4765. {
  4766. UINT32 x,y, dst_x_start,dst_y_start, dimx,dimy;
  4767. UINT32 *dst;
  4768.  
  4769. // 0x20000000
  4770. READ_NEXT_WORD(addr);
  4771. READ_NEXT_WORD(addr);
  4772.  
  4773. // 0x99999999
  4774. READ_NEXT_WORD(addr);
  4775. READ_NEXT_WORD(addr);
  4776.  
  4777. dst_x_start = READ_NEXT_WORD(addr);
  4778. dst_y_start = READ_NEXT_WORD(addr);
  4779.  
  4780. dst_x_start &= 0x1fff;
  4781. dst_y_start &= 0x0fff;
  4782.  
  4783. dimx = (READ_NEXT_WORD(addr) & 0x1fff) + 1;
  4784. dimy = (READ_NEXT_WORD(addr) & 0x0fff) + 1;
  4785.  
  4786. for (y = 0; y < dimy; y++)
  4787. {
  4788. dst = &cavesh_bitmaps->pix32(dst_y_start + y);
  4789. dst += dst_x_start;
  4790.  
  4791. for (x = 0; x < dimx; x++)
  4792. {
  4793. UINT16 pendat = READ_NEXT_WORD(addr);
  4794. // real hw would upload the gfxword directly, but our VRAM is 32-bit, so convert it.
  4795. *dst++ = ((pendat&0x8000)<<14) | ((pendat&0x7c00)<<9) | ((pendat&0x03e0)<<6) | ((pendat&0x001f)<<3); // --t- ---- rrrr r--- gggg g--- bbbb b--- format
  4796.  
  4797. }
  4798. }
  4799. }
  4800.  
  4801. #define draw_params cavesh_bitmaps, &cavesh_clip, &cavesh_bitmaps->pix32(0,0), src_x,src_y, x,y, dimx,dimy, flipy, s_alpha, d_alpha, &tint_clr
  4802.  
  4803. typedef const void (*caveblitfunction)(bitmap_rgb32 *,
  4804. const rectangle *,
  4805. UINT32 *, /* gfx */
  4806. int , /* src_x */
  4807. int , /* src_y */
  4808. int , /* dst_x_start */
  4809. int , /* dst_y_start */
  4810. int , /* dimx */
  4811. int , /* dimy */
  4812. int , /* flipy */
  4813. const UINT8 , /* s_alpha */
  4814. const UINT8 , /* d_alpha */
  4815. clr_t * );
  4816.  
  4817. caveblitfunction cave_blit_funcs[] =
  4818. {
  4819. draw_sprite_s0_d0, draw_sprite_s1_d0, draw_sprite_s2_d0, draw_sprite_s3_d0, draw_sprite_s4_d0, draw_sprite_s5_d0, draw_sprite_s6_d0, draw_sprite_s7_d0,
  4820. draw_sprite_s0_d1, draw_sprite_s1_d1, draw_sprite_s2_d1, draw_sprite_s3_d1, draw_sprite_s4_d1, draw_sprite_s5_d1, draw_sprite_s6_d1, draw_sprite_s7_d1,
  4821. draw_sprite_s0_d2, draw_sprite_s1_d2, draw_sprite_s2_d2, draw_sprite_s3_d2, draw_sprite_s4_d2, draw_sprite_s5_d2, draw_sprite_s6_d2, draw_sprite_s7_d2,
  4822. draw_sprite_s0_d3, draw_sprite_s1_d3, draw_sprite_s2_d3, draw_sprite_s3_d3, draw_sprite_s4_d3, draw_sprite_s5_d3, draw_sprite_s6_d3, draw_sprite_s7_d3,
  4823. draw_sprite_s0_d4, draw_sprite_s1_d4, draw_sprite_s2_d4, draw_sprite_s3_d4, draw_sprite_s4_d4, draw_sprite_s5_d4, draw_sprite_s6_d4, draw_sprite_s7_d4,
  4824. draw_sprite_s0_d5, draw_sprite_s1_d5, draw_sprite_s2_d5, draw_sprite_s3_d5, draw_sprite_s4_d5, draw_sprite_s5_d5, draw_sprite_s6_d5, draw_sprite_s7_d5,
  4825. draw_sprite_s0_d6, draw_sprite_s1_d6, draw_sprite_s2_d6, draw_sprite_s3_d6, draw_sprite_s4_d6, draw_sprite_s5_d6, draw_sprite_s6_d6, draw_sprite_s7_d6,
  4826. draw_sprite_s0_d7, draw_sprite_s1_d7, draw_sprite_s2_d7, draw_sprite_s3_d7, draw_sprite_s4_d7, draw_sprite_s5_d7, draw_sprite_s6_d7, draw_sprite_s7_d7,
  4827. };
  4828.  
  4829. caveblitfunction cave_opaque_blit_funcs[] =
  4830. {
  4831. draw_sprite_opaque_s0_d0, draw_sprite_opaque_s1_d0, draw_sprite_opaque_s2_d0, draw_sprite_opaque_s3_d0, draw_sprite_opaque_s4_d0, draw_sprite_opaque_s5_d0, draw_sprite_opaque_s6_d0, draw_sprite_opaque_s7_d0,
  4832. draw_sprite_opaque_s0_d1, draw_sprite_opaque_s1_d1, draw_sprite_opaque_s2_d1, draw_sprite_opaque_s3_d1, draw_sprite_opaque_s4_d1, draw_sprite_opaque_s5_d1, draw_sprite_opaque_s6_d1, draw_sprite_opaque_s7_d1,
  4833. draw_sprite_opaque_s0_d2, draw_sprite_opaque_s1_d2, draw_sprite_opaque_s2_d2, draw_sprite_opaque_s3_d2, draw_sprite_opaque_s4_d2, draw_sprite_opaque_s5_d2, draw_sprite_opaque_s6_d2, draw_sprite_opaque_s7_d2,
  4834. draw_sprite_opaque_s0_d3, draw_sprite_opaque_s1_d3, draw_sprite_opaque_s2_d3, draw_sprite_opaque_s3_d3, draw_sprite_opaque_s4_d3, draw_sprite_opaque_s5_d3, draw_sprite_opaque_s6_d3, draw_sprite_opaque_s7_d3,
  4835. draw_sprite_opaque_s0_d4, draw_sprite_opaque_s1_d4, draw_sprite_opaque_s2_d4, draw_sprite_opaque_s3_d4, draw_sprite_opaque_s4_d4, draw_sprite_opaque_s5_d4, draw_sprite_opaque_s6_d4, draw_sprite_opaque_s7_d4,
  4836. draw_sprite_opaque_s0_d5, draw_sprite_opaque_s1_d5, draw_sprite_opaque_s2_d5, draw_sprite_opaque_s3_d5, draw_sprite_opaque_s4_d5, draw_sprite_opaque_s5_d5, draw_sprite_opaque_s6_d5, draw_sprite_opaque_s7_d5,
  4837. draw_sprite_opaque_s0_d6, draw_sprite_opaque_s1_d6, draw_sprite_opaque_s2_d6, draw_sprite_opaque_s3_d6, draw_sprite_opaque_s4_d6, draw_sprite_opaque_s5_d6, draw_sprite_opaque_s6_d6, draw_sprite_opaque_s7_d6,
  4838. draw_sprite_opaque_s0_d7, draw_sprite_opaque_s1_d7, draw_sprite_opaque_s2_d7, draw_sprite_opaque_s3_d7, draw_sprite_opaque_s4_d7, draw_sprite_opaque_s5_d7, draw_sprite_opaque_s6_d7, draw_sprite_opaque_s7_d7,
  4839. };
  4840.  
  4841. caveblitfunction cave_flipx_blit_funcs[] =
  4842. {
  4843. draw_sprite_flipx_s0_d0, draw_sprite_flipx_s1_d0, draw_sprite_flipx_s2_d0, draw_sprite_flipx_s3_d0, draw_sprite_flipx_s4_d0, draw_sprite_flipx_s5_d0, draw_sprite_flipx_s6_d0, draw_sprite_flipx_s7_d0,
  4844. draw_sprite_flipx_s0_d1, draw_sprite_flipx_s1_d1, draw_sprite_flipx_s2_d1, draw_sprite_flipx_s3_d1, draw_sprite_flipx_s4_d1, draw_sprite_flipx_s5_d1, draw_sprite_flipx_s6_d1, draw_sprite_flipx_s7_d1,
  4845. draw_sprite_flipx_s0_d2, draw_sprite_flipx_s1_d2, draw_sprite_flipx_s2_d2, draw_sprite_flipx_s3_d2, draw_sprite_flipx_s4_d2, draw_sprite_flipx_s5_d2, draw_sprite_flipx_s6_d2, draw_sprite_flipx_s7_d2,
  4846. draw_sprite_flipx_s0_d3, draw_sprite_flipx_s1_d3, draw_sprite_flipx_s2_d3, draw_sprite_flipx_s3_d3, draw_sprite_flipx_s4_d3, draw_sprite_flipx_s5_d3, draw_sprite_flipx_s6_d3, draw_sprite_flipx_s7_d3,
  4847. draw_sprite_flipx_s0_d4, draw_sprite_flipx_s1_d4, draw_sprite_flipx_s2_d4, draw_sprite_flipx_s3_d4, draw_sprite_flipx_s4_d4, draw_sprite_flipx_s5_d4, draw_sprite_flipx_s6_d4, draw_sprite_flipx_s7_d4,
  4848. draw_sprite_flipx_s0_d5, draw_sprite_flipx_s1_d5, draw_sprite_flipx_s2_d5, draw_sprite_flipx_s3_d5, draw_sprite_flipx_s4_d5, draw_sprite_flipx_s5_d5, draw_sprite_flipx_s6_d5, draw_sprite_flipx_s7_d5,
  4849. draw_sprite_flipx_s0_d6, draw_sprite_flipx_s1_d6, draw_sprite_flipx_s2_d6, draw_sprite_flipx_s3_d6, draw_sprite_flipx_s4_d6, draw_sprite_flipx_s5_d6, draw_sprite_flipx_s6_d6, draw_sprite_flipx_s7_d6,
  4850. draw_sprite_flipx_s0_d7, draw_sprite_flipx_s1_d7, draw_sprite_flipx_s2_d7, draw_sprite_flipx_s3_d7, draw_sprite_flipx_s4_d7, draw_sprite_flipx_s5_d7, draw_sprite_flipx_s6_d7, draw_sprite_flipx_s7_d7,
  4851. };
  4852.  
  4853. caveblitfunction cave_flipx_opaque_blit_funcs[] =
  4854. {
  4855. draw_sprite_flipx_opaque_s0_d0, draw_sprite_flipx_opaque_s1_d0, draw_sprite_flipx_opaque_s2_d0, draw_sprite_flipx_opaque_s3_d0, draw_sprite_flipx_opaque_s4_d0, draw_sprite_flipx_opaque_s5_d0, draw_sprite_flipx_opaque_s6_d0, draw_sprite_flipx_opaque_s7_d0,
  4856. draw_sprite_flipx_opaque_s0_d1, draw_sprite_flipx_opaque_s1_d1, draw_sprite_flipx_opaque_s2_d1, draw_sprite_flipx_opaque_s3_d1, draw_sprite_flipx_opaque_s4_d1, draw_sprite_flipx_opaque_s5_d1, draw_sprite_flipx_opaque_s6_d1, draw_sprite_flipx_opaque_s7_d1,
  4857. draw_sprite_flipx_opaque_s0_d2, draw_sprite_flipx_opaque_s1_d2, draw_sprite_flipx_opaque_s2_d2, draw_sprite_flipx_opaque_s3_d2, draw_sprite_flipx_opaque_s4_d2, draw_sprite_flipx_opaque_s5_d2, draw_sprite_flipx_opaque_s6_d2, draw_sprite_flipx_opaque_s7_d2,
  4858. draw_sprite_flipx_opaque_s0_d3, draw_sprite_flipx_opaque_s1_d3, draw_sprite_flipx_opaque_s2_d3, draw_sprite_flipx_opaque_s3_d3, draw_sprite_flipx_opaque_s4_d3, draw_sprite_flipx_opaque_s5_d3, draw_sprite_flipx_opaque_s6_d3, draw_sprite_flipx_opaque_s7_d3,
  4859. draw_sprite_flipx_opaque_s0_d4, draw_sprite_flipx_opaque_s1_d4, draw_sprite_flipx_opaque_s2_d4, draw_sprite_flipx_opaque_s3_d4, draw_sprite_flipx_opaque_s4_d4, draw_sprite_flipx_opaque_s5_d4, draw_sprite_flipx_opaque_s6_d4, draw_sprite_flipx_opaque_s7_d4,
  4860. draw_sprite_flipx_opaque_s0_d5, draw_sprite_flipx_opaque_s1_d5, draw_sprite_flipx_opaque_s2_d5, draw_sprite_flipx_opaque_s3_d5, draw_sprite_flipx_opaque_s4_d5, draw_sprite_flipx_opaque_s5_d5, draw_sprite_flipx_opaque_s6_d5, draw_sprite_flipx_opaque_s7_d5,
  4861. draw_sprite_flipx_opaque_s0_d6, draw_sprite_flipx_opaque_s1_d6, draw_sprite_flipx_opaque_s2_d6, draw_sprite_flipx_opaque_s3_d6, draw_sprite_flipx_opaque_s4_d6, draw_sprite_flipx_opaque_s5_d6, draw_sprite_flipx_opaque_s6_d6, draw_sprite_flipx_opaque_s7_d6,
  4862. draw_sprite_flipx_opaque_s0_d7, draw_sprite_flipx_opaque_s1_d7, draw_sprite_flipx_opaque_s2_d7, draw_sprite_flipx_opaque_s3_d7, draw_sprite_flipx_opaque_s4_d7, draw_sprite_flipx_opaque_s5_d7, draw_sprite_flipx_opaque_s6_d7, draw_sprite_flipx_opaque_s7_d7,
  4863. };
  4864.  
  4865.  
  4866.  
  4867. caveblitfunction cave_notint_blit_funcs[] =
  4868. {
  4869. draw_sprite_notint_s0_d0, draw_sprite_notint_s1_d0, draw_sprite_notint_s2_d0, draw_sprite_notint_s3_d0, draw_sprite_notint_s4_d0, draw_sprite_notint_s5_d0, draw_sprite_notint_s6_d0, draw_sprite_notint_s7_d0,
  4870. draw_sprite_notint_s0_d1, draw_sprite_notint_s1_d1, draw_sprite_notint_s2_d1, draw_sprite_notint_s3_d1, draw_sprite_notint_s4_d1, draw_sprite_notint_s5_d1, draw_sprite_notint_s6_d1, draw_sprite_notint_s7_d1,
  4871. draw_sprite_notint_s0_d2, draw_sprite_notint_s1_d2, draw_sprite_notint_s2_d2, draw_sprite_notint_s3_d2, draw_sprite_notint_s4_d2, draw_sprite_notint_s5_d2, draw_sprite_notint_s6_d2, draw_sprite_notint_s7_d2,
  4872. draw_sprite_notint_s0_d3, draw_sprite_notint_s1_d3, draw_sprite_notint_s2_d3, draw_sprite_notint_s3_d3, draw_sprite_notint_s4_d3, draw_sprite_notint_s5_d3, draw_sprite_notint_s6_d3, draw_sprite_notint_s7_d3,
  4873. draw_sprite_notint_s0_d4, draw_sprite_notint_s1_d4, draw_sprite_notint_s2_d4, draw_sprite_notint_s3_d4, draw_sprite_notint_s4_d4, draw_sprite_notint_s5_d4, draw_sprite_notint_s6_d4, draw_sprite_notint_s7_d4,
  4874. draw_sprite_notint_s0_d5, draw_sprite_notint_s1_d5, draw_sprite_notint_s2_d5, draw_sprite_notint_s3_d5, draw_sprite_notint_s4_d5, draw_sprite_notint_s5_d5, draw_sprite_notint_s6_d5, draw_sprite_notint_s7_d5,
  4875. draw_sprite_notint_s0_d6, draw_sprite_notint_s1_d6, draw_sprite_notint_s2_d6, draw_sprite_notint_s3_d6, draw_sprite_notint_s4_d6, draw_sprite_notint_s5_d6, draw_sprite_notint_s6_d6, draw_sprite_notint_s7_d6,
  4876. draw_sprite_notint_s0_d7, draw_sprite_notint_s1_d7, draw_sprite_notint_s2_d7, draw_sprite_notint_s3_d7, draw_sprite_notint_s4_d7, draw_sprite_notint_s5_d7, draw_sprite_notint_s6_d7, draw_sprite_notint_s7_d7,
  4877. };
  4878.  
  4879. caveblitfunction cave_notint_opaque_blit_funcs[] =
  4880. {
  4881. draw_sprite_notint_opaque_s0_d0, draw_sprite_notint_opaque_s1_d0, draw_sprite_notint_opaque_s2_d0, draw_sprite_notint_opaque_s3_d0, draw_sprite_notint_opaque_s4_d0, draw_sprite_notint_opaque_s5_d0, draw_sprite_notint_opaque_s6_d0, draw_sprite_notint_opaque_s7_d0,
  4882. draw_sprite_notint_opaque_s0_d1, draw_sprite_notint_opaque_s1_d1, draw_sprite_notint_opaque_s2_d1, draw_sprite_notint_opaque_s3_d1, draw_sprite_notint_opaque_s4_d1, draw_sprite_notint_opaque_s5_d1, draw_sprite_notint_opaque_s6_d1, draw_sprite_notint_opaque_s7_d1,
  4883. draw_sprite_notint_opaque_s0_d2, draw_sprite_notint_opaque_s1_d2, draw_sprite_notint_opaque_s2_d2, draw_sprite_notint_opaque_s3_d2, draw_sprite_notint_opaque_s4_d2, draw_sprite_notint_opaque_s5_d2, draw_sprite_notint_opaque_s6_d2, draw_sprite_notint_opaque_s7_d2,
  4884. draw_sprite_notint_opaque_s0_d3, draw_sprite_notint_opaque_s1_d3, draw_sprite_notint_opaque_s2_d3, draw_sprite_notint_opaque_s3_d3, draw_sprite_notint_opaque_s4_d3, draw_sprite_notint_opaque_s5_d3, draw_sprite_notint_opaque_s6_d3, draw_sprite_notint_opaque_s7_d3,
  4885. draw_sprite_notint_opaque_s0_d4, draw_sprite_notint_opaque_s1_d4, draw_sprite_notint_opaque_s2_d4, draw_sprite_notint_opaque_s3_d4, draw_sprite_notint_opaque_s4_d4, draw_sprite_notint_opaque_s5_d4, draw_sprite_notint_opaque_s6_d4, draw_sprite_notint_opaque_s7_d4,
  4886. draw_sprite_notint_opaque_s0_d5, draw_sprite_notint_opaque_s1_d5, draw_sprite_notint_opaque_s2_d5, draw_sprite_notint_opaque_s3_d5, draw_sprite_notint_opaque_s4_d5, draw_sprite_notint_opaque_s5_d5, draw_sprite_notint_opaque_s6_d5, draw_sprite_notint_opaque_s7_d5,
  4887. draw_sprite_notint_opaque_s0_d6, draw_sprite_notint_opaque_s1_d6, draw_sprite_notint_opaque_s2_d6, draw_sprite_notint_opaque_s3_d6, draw_sprite_notint_opaque_s4_d6, draw_sprite_notint_opaque_s5_d6, draw_sprite_notint_opaque_s6_d6, draw_sprite_notint_opaque_s7_d6,
  4888. draw_sprite_notint_opaque_s0_d7, draw_sprite_notint_opaque_s1_d7, draw_sprite_notint_opaque_s2_d7, draw_sprite_notint_opaque_s3_d7, draw_sprite_notint_opaque_s4_d7, draw_sprite_notint_opaque_s5_d7, draw_sprite_notint_opaque_s6_d7, draw_sprite_notint_opaque_s7_d7,
  4889. };
  4890.  
  4891. caveblitfunction cave_notint_flipx_blit_funcs[] =
  4892. {
  4893. draw_sprite_notint_flipx_s0_d0, draw_sprite_notint_flipx_s1_d0, draw_sprite_notint_flipx_s2_d0, draw_sprite_notint_flipx_s3_d0, draw_sprite_notint_flipx_s4_d0, draw_sprite_notint_flipx_s5_d0, draw_sprite_notint_flipx_s6_d0, draw_sprite_notint_flipx_s7_d0,
  4894. draw_sprite_notint_flipx_s0_d1, draw_sprite_notint_flipx_s1_d1, draw_sprite_notint_flipx_s2_d1, draw_sprite_notint_flipx_s3_d1, draw_sprite_notint_flipx_s4_d1, draw_sprite_notint_flipx_s5_d1, draw_sprite_notint_flipx_s6_d1, draw_sprite_notint_flipx_s7_d1,
  4895. draw_sprite_notint_flipx_s0_d2, draw_sprite_notint_flipx_s1_d2, draw_sprite_notint_flipx_s2_d2, draw_sprite_notint_flipx_s3_d2, draw_sprite_notint_flipx_s4_d2, draw_sprite_notint_flipx_s5_d2, draw_sprite_notint_flipx_s6_d2, draw_sprite_notint_flipx_s7_d2,
  4896. draw_sprite_notint_flipx_s0_d3, draw_sprite_notint_flipx_s1_d3, draw_sprite_notint_flipx_s2_d3, draw_sprite_notint_flipx_s3_d3, draw_sprite_notint_flipx_s4_d3, draw_sprite_notint_flipx_s5_d3, draw_sprite_notint_flipx_s6_d3, draw_sprite_notint_flipx_s7_d3,
  4897. draw_sprite_notint_flipx_s0_d4, draw_sprite_notint_flipx_s1_d4, draw_sprite_notint_flipx_s2_d4, draw_sprite_notint_flipx_s3_d4, draw_sprite_notint_flipx_s4_d4, draw_sprite_notint_flipx_s5_d4, draw_sprite_notint_flipx_s6_d4, draw_sprite_notint_flipx_s7_d4,
  4898. draw_sprite_notint_flipx_s0_d5, draw_sprite_notint_flipx_s1_d5, draw_sprite_notint_flipx_s2_d5, draw_sprite_notint_flipx_s3_d5, draw_sprite_notint_flipx_s4_d5, draw_sprite_notint_flipx_s5_d5, draw_sprite_notint_flipx_s6_d5, draw_sprite_notint_flipx_s7_d5,
  4899. draw_sprite_notint_flipx_s0_d6, draw_sprite_notint_flipx_s1_d6, draw_sprite_notint_flipx_s2_d6, draw_sprite_notint_flipx_s3_d6, draw_sprite_notint_flipx_s4_d6, draw_sprite_notint_flipx_s5_d6, draw_sprite_notint_flipx_s6_d6, draw_sprite_notint_flipx_s7_d6,
  4900. draw_sprite_notint_flipx_s0_d7, draw_sprite_notint_flipx_s1_d7, draw_sprite_notint_flipx_s2_d7, draw_sprite_notint_flipx_s3_d7, draw_sprite_notint_flipx_s4_d7, draw_sprite_notint_flipx_s5_d7, draw_sprite_notint_flipx_s6_d7, draw_sprite_notint_flipx_s7_d7,
  4901. };
  4902.  
  4903. caveblitfunction cave_notint_flipx_opaque_blit_funcs[] =
  4904. {
  4905. draw_sprite_notint_flipx_opaque_s0_d0, draw_sprite_notint_flipx_opaque_s1_d0, draw_sprite_notint_flipx_opaque_s2_d0, draw_sprite_notint_flipx_opaque_s3_d0, draw_sprite_notint_flipx_opaque_s4_d0, draw_sprite_notint_flipx_opaque_s5_d0, draw_sprite_notint_flipx_opaque_s6_d0, draw_sprite_notint_flipx_opaque_s7_d0,
  4906. draw_sprite_notint_flipx_opaque_s0_d1, draw_sprite_notint_flipx_opaque_s1_d1, draw_sprite_notint_flipx_opaque_s2_d1, draw_sprite_notint_flipx_opaque_s3_d1, draw_sprite_notint_flipx_opaque_s4_d1, draw_sprite_notint_flipx_opaque_s5_d1, draw_sprite_notint_flipx_opaque_s6_d1, draw_sprite_notint_flipx_opaque_s7_d1,
  4907. draw_sprite_notint_flipx_opaque_s0_d2, draw_sprite_notint_flipx_opaque_s1_d2, draw_sprite_notint_flipx_opaque_s2_d2, draw_sprite_notint_flipx_opaque_s3_d2, draw_sprite_notint_flipx_opaque_s4_d2, draw_sprite_notint_flipx_opaque_s5_d2, draw_sprite_notint_flipx_opaque_s6_d2, draw_sprite_notint_flipx_opaque_s7_d2,
  4908. draw_sprite_notint_flipx_opaque_s0_d3, draw_sprite_notint_flipx_opaque_s1_d3, draw_sprite_notint_flipx_opaque_s2_d3, draw_sprite_notint_flipx_opaque_s3_d3, draw_sprite_notint_flipx_opaque_s4_d3, draw_sprite_notint_flipx_opaque_s5_d3, draw_sprite_notint_flipx_opaque_s6_d3, draw_sprite_notint_flipx_opaque_s7_d3,
  4909. draw_sprite_notint_flipx_opaque_s0_d4, draw_sprite_notint_flipx_opaque_s1_d4, draw_sprite_notint_flipx_opaque_s2_d4, draw_sprite_notint_flipx_opaque_s3_d4, draw_sprite_notint_flipx_opaque_s4_d4, draw_sprite_notint_flipx_opaque_s5_d4, draw_sprite_notint_flipx_opaque_s6_d4, draw_sprite_notint_flipx_opaque_s7_d4,
  4910. draw_sprite_notint_flipx_opaque_s0_d5, draw_sprite_notint_flipx_opaque_s1_d5, draw_sprite_notint_flipx_opaque_s2_d5, draw_sprite_notint_flipx_opaque_s3_d5, draw_sprite_notint_flipx_opaque_s4_d5, draw_sprite_notint_flipx_opaque_s5_d5, draw_sprite_notint_flipx_opaque_s6_d5, draw_sprite_notint_flipx_opaque_s7_d5,
  4911. draw_sprite_notint_flipx_opaque_s0_d6, draw_sprite_notint_flipx_opaque_s1_d6, draw_sprite_notint_flipx_opaque_s2_d6, draw_sprite_notint_flipx_opaque_s3_d6, draw_sprite_notint_flipx_opaque_s4_d6, draw_sprite_notint_flipx_opaque_s5_d6, draw_sprite_notint_flipx_opaque_s6_d6, draw_sprite_notint_flipx_opaque_s7_d6,
  4912. draw_sprite_notint_flipx_opaque_s0_d7, draw_sprite_notint_flipx_opaque_s1_d7, draw_sprite_notint_flipx_opaque_s2_d7, draw_sprite_notint_flipx_opaque_s3_d7, draw_sprite_notint_flipx_opaque_s4_d7, draw_sprite_notint_flipx_opaque_s5_d7, draw_sprite_notint_flipx_opaque_s6_d7, draw_sprite_notint_flipx_opaque_s7_d7,
  4913. };
  4914.  
  4915.  
  4916.  
  4917. INLINE void cavesh_gfx_draw_shadow_copy(address_space &space, offs_t *addr, int cliptype)
  4918. {
  4919. COPY_NEXT_WORD(space, addr);
  4920. COPY_NEXT_WORD(space, addr);
  4921. COPY_NEXT_WORD(space, addr);
  4922. COPY_NEXT_WORD(space, addr);
  4923. COPY_NEXT_WORD(space, addr);
  4924. COPY_NEXT_WORD(space, addr);
  4925. UINT16 w = COPY_NEXT_WORD(space, addr);
  4926. UINT16 h = COPY_NEXT_WORD(space, addr);
  4927. COPY_NEXT_WORD(space, addr);
  4928. COPY_NEXT_WORD(space, addr);
  4929.  
  4930.  
  4931. // todo, calcualte clipping.
  4932. cave_blit_delay += w*h;
  4933. }
  4934.  
  4935.  
  4936.  
  4937. INLINE void cavesh_gfx_draw(offs_t *addr)
  4938. {
  4939. int x, y, dimx,dimy, flipx, flipy;
  4940. int trans, blend, s_mode, d_mode;
  4941. clr_t tint_clr;
  4942. int tinted = 0;
  4943.  
  4944. UINT16 attr = READ_NEXT_WORD(addr);
  4945. UINT16 alpha = READ_NEXT_WORD(addr);
  4946. UINT16 src_x = READ_NEXT_WORD(addr);
  4947. UINT16 src_y = READ_NEXT_WORD(addr);
  4948. UINT16 dst_x_start = READ_NEXT_WORD(addr);
  4949. UINT16 dst_y_start = READ_NEXT_WORD(addr);
  4950. UINT16 w = READ_NEXT_WORD(addr);
  4951. UINT16 h = READ_NEXT_WORD(addr);
  4952. UINT16 tint_r = READ_NEXT_WORD(addr);
  4953. UINT16 tint_gb = READ_NEXT_WORD(addr);
  4954.  
  4955. // 0: +alpha
  4956. // 1: +source
  4957. // 2: +dest
  4958. // 3: *
  4959. // 4: -alpha
  4960. // 5: -source
  4961. // 6: -dest
  4962. // 7: *
  4963.  
  4964. d_mode = attr & 0x0007;
  4965. s_mode = (attr & 0x0070) >> 4;
  4966.  
  4967. trans = attr & 0x0100;
  4968. blend = attr & 0x0200;
  4969.  
  4970. flipy = attr & 0x0400;
  4971. flipx = attr & 0x0800;
  4972.  
  4973. const UINT8 d_alpha = ((alpha & 0x00ff))>>3;
  4974. const UINT8 s_alpha = ((alpha & 0xff00)>>8)>>3;
  4975.  
  4976. src_x = src_x & 0x1fff;
  4977. src_y = src_y & 0x0fff;
  4978.  
  4979.  
  4980. x = (dst_x_start & 0x7fff) - (dst_x_start & 0x8000);
  4981. y = (dst_y_start & 0x7fff) - (dst_y_start & 0x8000);
  4982.  
  4983. dimx = (w & 0x1fff) + 1;
  4984. dimy = (h & 0x0fff) + 1;
  4985.  
  4986. // convert parameters to clr
  4987.  
  4988.  
  4989. tint_to_clr(tint_r & 0x00ff, (tint_gb >> 8) & 0xff, tint_gb & 0xff, &tint_clr);
  4990.  
  4991. /* interestingly this gets set to 0x20 for 'normal' not 0x1f */
  4992.  
  4993. if (tint_clr.r!=0x20)
  4994. tinted = 1;
  4995.  
  4996. if (tint_clr.g!=0x20)
  4997. tinted = 1;
  4998.  
  4999. if (tint_clr.b!=0x20)
  5000. tinted = 1;
  5001.  
  5002.  
  5003. // surprisingly frequent, need to verify if it produces a worthwhile speedup tho.
  5004. if ((s_mode==0 && s_alpha==0x1f) && (d_mode==4 && d_alpha==0x1f))
  5005. blend = 0;
  5006.  
  5007. if (tinted)
  5008. {
  5009. if (!flipx)
  5010. {
  5011. if (trans)
  5012. {
  5013. if (!blend)
  5014. draw_sprite_plain(draw_params);
  5015. else
  5016. cave_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5017. }
  5018. else
  5019. {
  5020. if (!blend)
  5021. draw_sprite_opaque_plain(draw_params);
  5022. else
  5023. cave_opaque_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5024. }
  5025. }
  5026. else // flipx
  5027. {
  5028. if (trans)
  5029. {
  5030. if (!blend)
  5031. draw_sprite_flipx_plain(draw_params);
  5032. else
  5033. cave_flipx_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5034. }
  5035. else
  5036. {
  5037. if (!blend)
  5038. draw_sprite_flipx_opaque_plain(draw_params);
  5039. else
  5040. cave_flipx_opaque_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5041. }
  5042. }
  5043. }
  5044. else
  5045. {
  5046.  
  5047. if (blend==0 && tinted==0)
  5048. {
  5049. if (!flipx)
  5050. {
  5051. if (trans)
  5052. draw_sprite_notint_simple(draw_params);
  5053. else
  5054. draw_sprite_notint_opaque_simple(draw_params);
  5055. }
  5056. else
  5057. {
  5058. if (trans)
  5059. draw_sprite_notint_flipx_simple(draw_params);
  5060. else
  5061. draw_sprite_notint_flipx_opaque_simple(draw_params);
  5062.  
  5063. }
  5064.  
  5065. return;
  5066. }
  5067.  
  5068.  
  5069. if (!flipx)
  5070. {
  5071. if (trans)
  5072. {
  5073. if (!blend)
  5074. draw_sprite_notint_plain(draw_params);
  5075. else
  5076. cave_notint_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5077. }
  5078. else
  5079. {
  5080. if (!blend)
  5081. draw_sprite_notint_opaque_plain(draw_params);
  5082. else
  5083. cave_notint_opaque_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5084. }
  5085. }
  5086. else // flipx
  5087. {
  5088. if (trans)
  5089. {
  5090. if (!blend)
  5091. draw_sprite_notint_flipx_plain(draw_params);
  5092. else
  5093. cave_notint_flipx_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5094. }
  5095. else
  5096. {
  5097. if (!blend)
  5098. draw_sprite_notint_flipx_opaque_plain(draw_params);
  5099. else
  5100. cave_notint_flipx_opaque_blit_funcs[s_mode | (d_mode<<3)](draw_params);
  5101. }
  5102. }
  5103. }
  5104. }
  5105.  
  5106.  
  5107. static void cavesh_gfx_create_shadow_copy(address_space &space)
  5108. {
  5109. offs_t addr = cavesh_gfx_addr & 0x1fffffff;
  5110. UINT16 cliptype = 0;
  5111.  
  5112. cavesh_clip.min_x = cavesh_gfx_scroll_1_x_shadowcopy;
  5113. cavesh_clip.min_y = cavesh_gfx_scroll_1_y_shadowcopy;
  5114. cavesh_clip.max_x = cavesh_clip.min_x + 320-1;
  5115. cavesh_clip.max_y = cavesh_clip.min_y + 240-1;
  5116.  
  5117. while (1)
  5118. {
  5119. UINT16 data = COPY_NEXT_WORD(space, &addr);
  5120.  
  5121. switch( data & 0xf000 )
  5122. {
  5123. case 0x0000:
  5124. case 0xf000:
  5125. return;
  5126.  
  5127. case 0xc000:
  5128. data = COPY_NEXT_WORD(space, &addr);
  5129.  
  5130. cliptype = data ? 1 : 0;
  5131.  
  5132. if (cliptype)
  5133. {
  5134. cavesh_clip.min_x = cavesh_gfx_scroll_1_x_shadowcopy;
  5135. cavesh_clip.min_y = cavesh_gfx_scroll_1_y_shadowcopy;
  5136. cavesh_clip.max_x = cavesh_clip.min_x + 320-1;
  5137. cavesh_clip.max_y = cavesh_clip.min_y + 240-1;
  5138. }
  5139. else
  5140. {
  5141. cavesh_clip.min_x = 0;
  5142. cavesh_clip.min_y = 0;
  5143. cavesh_clip.max_x = 0x2000-1;
  5144. cavesh_clip.max_y = 0x1000-1;
  5145. }
  5146.  
  5147. break;
  5148.  
  5149. case 0x2000:
  5150. addr -= 2;
  5151. cavesh_gfx_upload_shadow_copy(space, &addr);
  5152. break;
  5153.  
  5154. case 0x1000:
  5155. addr -= 2;
  5156. cavesh_gfx_draw_shadow_copy(space, &addr, cliptype);
  5157. break;
  5158.  
  5159. default:
  5160. popmessage("GFX op = %04X", data);
  5161. return;
  5162. }
  5163. }
  5164. }
  5165.  
  5166. // Deathsmiles has bad text with wrong clip sizes, must clip to screen size.
  5167. static void cavesh_gfx_exec(void)
  5168. {
  5169. UINT16 cliptype = 0;
  5170.  
  5171. offs_t addr = cavesh_gfx_addr_shadowcopy & 0x1fffffff;
  5172.  
  5173. cavesh_clip.min_x = cavesh_gfx_scroll_1_x_shadowcopy;
  5174. cavesh_clip.min_y = cavesh_gfx_scroll_1_y_shadowcopy;
  5175. cavesh_clip.max_x = cavesh_clip.min_x + 320-1;
  5176. cavesh_clip.max_y = cavesh_clip.min_y + 240-1;
  5177.  
  5178. while (1)
  5179. {
  5180. UINT16 data = READ_NEXT_WORD(&addr);
  5181.  
  5182. switch( data & 0xf000 )
  5183. {
  5184. case 0x0000:
  5185. case 0xf000:
  5186. return;
  5187.  
  5188. case 0xc000:
  5189. data = READ_NEXT_WORD(&addr);
  5190. cliptype = data ? 1 : 0;
  5191.  
  5192. if (cliptype)
  5193. {
  5194. cavesh_clip.min_x = cavesh_gfx_scroll_1_x_shadowcopy;
  5195. cavesh_clip.min_y = cavesh_gfx_scroll_1_y_shadowcopy;
  5196. cavesh_clip.max_x = cavesh_clip.min_x + 320-1;
  5197. cavesh_clip.max_y = cavesh_clip.min_y + 240-1;
  5198. }
  5199. else
  5200. {
  5201. cavesh_clip.min_x = 0;
  5202. cavesh_clip.min_y = 0;
  5203. cavesh_clip.max_x = 0x2000-1;
  5204. cavesh_clip.max_y = 0x1000-1;
  5205. }
  5206. break;
  5207.  
  5208. case 0x2000:
  5209. addr -= 2;
  5210. cavesh_gfx_upload(&addr);
  5211. break;
  5212.  
  5213. case 0x1000:
  5214. addr -= 2;
  5215. cavesh_gfx_draw(&addr);
  5216. break;
  5217.  
  5218. default:
  5219. popmessage("GFX op = %04X", data);
  5220. return;
  5221. }
  5222. }
  5223. }
  5224.  
  5225.  
  5226. static void *blit_request_callback(void *param, int threadid)
  5227. {
  5228. cavesh_gfx_exec();
  5229. return NULL;
  5230. }
  5231.  
  5232.  
  5233.  
  5234. READ32_MEMBER( cavesh3_state::cavesh_gfx_ready_r )
  5235. {
  5236. // ideally we want a recompiler for the CPU before we attempt to do this
  5237. // otherwise the games get stuck in more loops waiting for the blitter and we'd
  5238. // have to add even more idle skips all over the place ;-)
  5239.  
  5240. return 0x00000010;
  5241. }
  5242.  
  5243. WRITE32_MEMBER( cavesh3_state::cavesh_gfx_exec_w )
  5244. {
  5245. if ( ACCESSING_BITS_0_7 )
  5246. {
  5247. if (data & 1)
  5248. {
  5249. if (this->blitter_request)
  5250. {
  5251. int result;
  5252. do
  5253. {
  5254. result = osd_work_item_wait(this->blitter_request, 1000);
  5255. } while (result==0);
  5256. osd_work_item_release(this->blitter_request);
  5257. }
  5258.  
  5259. cave_blit_delay = 0;
  5260. cavesh_gfx_create_shadow_copy(space); // create a copy of the blit list so we can safely thread it.
  5261.  
  5262. if (cave_blit_delay)
  5263. {
  5264. this->blitter_busy = 1;
  5265. this->cavesh3_blitter_delay_timer->adjust(attotime::from_nsec(cave_blit_delay*8)); // NOT accurate timing (currently ignored anyway)
  5266. }
  5267.  
  5268. cavesh_gfx_addr_shadowcopy = cavesh_gfx_addr;
  5269. cavesh_gfx_scroll_0_x_shadowcopy = cavesh_gfx_scroll_0_x;
  5270. cavesh_gfx_scroll_0_y_shadowcopy = cavesh_gfx_scroll_0_y;
  5271. cavesh_gfx_scroll_1_x_shadowcopy = cavesh_gfx_scroll_1_x;
  5272. cavesh_gfx_scroll_1_y_shadowcopy = cavesh_gfx_scroll_1_y;
  5273. this->blitter_request = osd_work_item_queue(this->queue, blit_request_callback, 0, 0);
  5274. }
  5275. }
  5276. }
  5277.  
  5278.  
  5279.  
  5280. static SCREEN_UPDATE_RGB32( cavesh3 )
  5281. {
  5282.  
  5283. cavesh3_state *state = screen.machine().driver_data<cavesh3_state>();
  5284.  
  5285. if (state->blitter_request)
  5286. {
  5287. int result;
  5288. do
  5289. {
  5290. result = osd_work_item_wait(state->blitter_request, 1000);
  5291. } while (result==0);
  5292. osd_work_item_release(state->blitter_request);
  5293. }
  5294.  
  5295.  
  5296. int scroll_0_x, scroll_0_y;
  5297.  
  5298. bitmap.fill(0, cliprect);
  5299.  
  5300. scroll_0_x = -cavesh_gfx_scroll_0_x;
  5301. scroll_0_y = -cavesh_gfx_scroll_0_y;
  5302.  
  5303. copyscrollbitmap(bitmap, *cavesh_bitmaps, 1,&scroll_0_x, 1,&scroll_0_y, cliprect);
  5304.  
  5305. return 0;
  5306. }
  5307.  
  5308.  
  5309. READ32_MEMBER( cavesh3_state::cavesh3_blitter_r )
  5310. {
  5311. switch (offset*4)
  5312. {
  5313. case 0x10:
  5314. return cavesh_gfx_ready_r(space,offset,mem_mask);
  5315.  
  5316. case 0x24:
  5317. return 0xffffffff;
  5318.  
  5319. case 0x28:
  5320. return 0xffffffff;
  5321.  
  5322. case 0x50:
  5323. return ioport("DSW")->read();
  5324.  
  5325. default:
  5326. break;
  5327.  
  5328. }
  5329. return 0;
  5330. }
  5331.  
  5332. WRITE32_MEMBER( cavesh3_state::cavesh3_blitter_w )
  5333. {
  5334. switch (offset*4)
  5335. {
  5336. case 0x04:
  5337. cavesh_gfx_exec_w(space,offset,data,mem_mask);
  5338. break;
  5339.  
  5340. case 0x08:
  5341. COMBINE_DATA(&cavesh_gfx_addr);
  5342. break;
  5343.  
  5344. case 0x14:
  5345. COMBINE_DATA(&cavesh_gfx_scroll_0_x);
  5346. break;
  5347.  
  5348. case 0x18:
  5349. COMBINE_DATA(&cavesh_gfx_scroll_0_y);
  5350. break;
  5351.  
  5352. case 0x40:
  5353. COMBINE_DATA(&cavesh_gfx_scroll_1_x);
  5354. break;
  5355.  
  5356. case 0x44:
  5357. COMBINE_DATA(&cavesh_gfx_scroll_1_y);
  5358. break;
  5359.  
  5360. }
  5361. }
  5362.  
  5363. // FLASH
  5364.  
  5365. #define FLASH_PAGE_SIZE (2048+64)
  5366.  
  5367. UINT8 flash_page_data[FLASH_PAGE_SIZE];
  5368.  
  5369. typedef enum { STATE_IDLE = 0, STATE_READ, STATE_READ_ID, STATE_READ_STATUS, STATE_BLOCK_ERASE, STATE_PAGE_PROGRAM } flash_state_t;
  5370. //static const char *flash_state_name[] = { "IDLE", "READ", "READ_ID", "READ_STATUS", "BLOCK ERASE", "PAGE PROGRAM" };
  5371.  
  5372. static flash_state_t flash_state;
  5373.  
  5374. static UINT8 flash_enab;
  5375.  
  5376. static UINT8 flash_cmd_seq;
  5377. static UINT32 flash_cmd_prev;
  5378.  
  5379. static UINT8 flash_addr_seq;
  5380. static UINT8 flash_read_seq;
  5381.  
  5382. static UINT16 flash_row, flash_col;
  5383. static UINT16 flash_page_addr;
  5384. static UINT16 flash_page_index;
  5385.  
  5386. static void flash_hard_reset(running_machine &machine)
  5387. {
  5388. flash_state = STATE_READ;
  5389.  
  5390. flash_cmd_prev = -1;
  5391. flash_cmd_seq = 0;
  5392.  
  5393. flash_addr_seq = 0;
  5394. flash_read_seq = 0;
  5395.  
  5396. flash_row = 0;
  5397. flash_col = 0;
  5398.  
  5399. memset(flash_page_data, 0, FLASH_PAGE_SIZE);
  5400. flash_page_addr = 0;
  5401. flash_page_index = 0;
  5402. }
  5403.  
  5404. WRITE8_MEMBER( cavesh3_state::flash_enab_w )
  5405. {
  5406. flash_enab = data;
  5407. }
  5408.  
  5409. static void flash_change_state(running_machine &machine, flash_state_t state)
  5410. {
  5411. flash_state = state;
  5412.  
  5413. flash_cmd_prev = -1;
  5414. flash_cmd_seq = 0;
  5415.  
  5416. flash_read_seq = 0;
  5417. flash_addr_seq = 0;
  5418. }
  5419.  
  5420. WRITE8_MEMBER( cavesh3_state::flash_cmd_w )
  5421. {
  5422. cavesh3_state *state = space.machine().driver_data<cavesh3_state>();
  5423.  
  5424. if (!flash_enab)
  5425. return;
  5426.  
  5427. if (flash_cmd_prev == -1)
  5428. {
  5429. flash_cmd_prev = data;
  5430.  
  5431. switch (data)
  5432. {
  5433. case 0x00: // READ
  5434. flash_addr_seq = 0;
  5435. break;
  5436.  
  5437. case 0x60: // BLOCK ERASE
  5438. flash_addr_seq = 0;
  5439. break;
  5440.  
  5441. case 0x70: // READ STATUS
  5442. flash_change_state( space.machine(), STATE_READ_STATUS );
  5443. break;
  5444.  
  5445. case 0x80: // PAGE / CACHE PROGRAM
  5446. flash_addr_seq = 0;
  5447. // this actually seems to be set with the next 2 writes?
  5448. flash_page_addr = 0;
  5449. break;
  5450.  
  5451. case 0x90: // READ ID
  5452. flash_change_state( space.machine(), STATE_READ_ID );
  5453. break;
  5454.  
  5455. case 0xff: // RESET
  5456. flash_change_state( space.machine(), STATE_IDLE );
  5457. break;
  5458.  
  5459. default:
  5460. break;
  5461. }
  5462. }
  5463. else
  5464. {
  5465. switch (flash_cmd_prev)
  5466. {
  5467. case 0x00: // READ
  5468. if (data == 0x30)
  5469. {
  5470. memcpy(flash_page_data, state->flashregion + flash_row * FLASH_PAGE_SIZE, FLASH_PAGE_SIZE);
  5471. flash_page_addr = flash_col;
  5472. flash_page_index = flash_row;
  5473.  
  5474. flash_change_state( space.machine(), STATE_READ );
  5475. }
  5476. break;
  5477.  
  5478. case 0x60: // BLOCK ERASE
  5479. if (data==0xd0)
  5480. {
  5481. flash_change_state( space.machine(), STATE_BLOCK_ERASE );
  5482. state->flashwritemap[flash_col] |= 1;
  5483. memset(state->flashregion + flash_col * FLASH_PAGE_SIZE, 0xff, FLASH_PAGE_SIZE);
  5484. }
  5485. break;
  5486. case 0x80:
  5487. if (data==0x10)
  5488. {
  5489. flash_change_state( space.machine(), STATE_PAGE_PROGRAM );
  5490. state->flashwritemap[flash_row] |= (memcmp(state->flashregion + flash_row * FLASH_PAGE_SIZE, flash_page_data, FLASH_PAGE_SIZE) != 0);
  5491. memcpy(state->flashregion + flash_row * FLASH_PAGE_SIZE, flash_page_data, FLASH_PAGE_SIZE);
  5492.  
  5493. }
  5494. break;
  5495.  
  5496.  
  5497. default:
  5498. break;
  5499. }
  5500. }
  5501. }
  5502.  
  5503. WRITE8_MEMBER( cavesh3_state::flash_data_w ) // Deathsmiles
  5504. {
  5505. if (!flash_enab)
  5506. return;
  5507.  
  5508. flash_page_data[flash_page_addr] = data;
  5509. flash_page_addr++;
  5510. }
  5511.  
  5512. WRITE8_MEMBER( cavesh3_state::flash_addr_w )
  5513. {
  5514. if (!flash_enab)
  5515. return;
  5516.  
  5517. switch( flash_addr_seq++ )
  5518. {
  5519. case 0:
  5520. flash_col = (flash_col & 0xff00) | data;
  5521. break;
  5522.  
  5523. case 1:
  5524. flash_col = (flash_col & 0x00ff) | (data << 8);
  5525. break;
  5526.  
  5527. case 2:
  5528. flash_row = (flash_row & 0xff00) | data;
  5529. break;
  5530.  
  5531. case 3:
  5532. flash_row = (flash_row & 0x00ff) | (data << 8);
  5533. flash_addr_seq = 0;
  5534. break;
  5535.  
  5536. default:
  5537. break;
  5538. }
  5539. }
  5540.  
  5541. READ8_MEMBER( cavesh3_state::flash_io_r )
  5542. {
  5543. UINT8 data = 0x00;
  5544.  
  5545. if (!flash_enab)
  5546. return 0xff;
  5547.  
  5548. switch (flash_state)
  5549. {
  5550. case STATE_READ_ID:
  5551. switch( flash_read_seq++ )
  5552. {
  5553. case 0:
  5554. data = 0xEC; // Manufacturer
  5555. break;
  5556.  
  5557. case 1:
  5558. data = 0xF1; // Device
  5559. break;
  5560.  
  5561. case 2:
  5562. data = 0x00; // XX
  5563. break;
  5564.  
  5565. case 3:
  5566. data = 0x15; // Flags
  5567. flash_read_seq = 0;
  5568. break;
  5569.  
  5570. default:
  5571. break;
  5572. }
  5573. break;
  5574.  
  5575. case STATE_READ:
  5576. if (flash_page_addr > FLASH_PAGE_SIZE-1)
  5577. flash_page_addr = FLASH_PAGE_SIZE-1;
  5578. data = flash_page_data[flash_page_addr++];
  5579. break;
  5580.  
  5581. case STATE_READ_STATUS:
  5582. data = 0xe0;
  5583. break;
  5584.  
  5585. default:
  5586. break;
  5587. }
  5588.  
  5589. return data;
  5590. }
  5591.  
  5592. /*READ8_MEMBER( cavesh3_state::flash_ready_r )
  5593. {
  5594. return 1;
  5595. }*/
  5596.  
  5597. // FLASH interface
  5598.  
  5599. READ64_MEMBER( cavesh3_state::ibara_flash_port_e_r )
  5600. {
  5601. //return ((flash_ready_r(space, offset) ? 0x20 : 0x00)) | 0xdf;
  5602. //return (0x20 | 0xdf);
  5603. return 0xff;
  5604. }
  5605.  
  5606.  
  5607. READ8_MEMBER( cavesh3_state::ibara_flash_io_r )
  5608. {
  5609. switch (offset)
  5610. {
  5611. default:
  5612. case 0x01:
  5613. case 0x02:
  5614. case 0x03:
  5615. case 0x04:
  5616. case 0x05:
  5617. case 0x06:
  5618. case 0x07:
  5619. return 0xff;
  5620. case 0x00:
  5621. return flash_io_r(space,offset);
  5622. }
  5623. }
  5624.  
  5625. WRITE8_MEMBER( cavesh3_state::ibara_flash_io_w )
  5626. {
  5627. switch (offset)
  5628. {
  5629. default:
  5630. case 0x03:
  5631. break;
  5632.  
  5633. case 0x00:
  5634. flash_data_w(space, offset, data);
  5635. break;
  5636.  
  5637. case 0x01:
  5638. flash_cmd_w(space, offset, data);
  5639. break;
  5640.  
  5641. case 0x2:
  5642. flash_addr_w(space, offset, data);
  5643. break;
  5644. }
  5645. }
  5646.  
  5647.  
  5648.  
  5649. // ibarablk uses the rtc to render the clock in the first attract demo
  5650. // if this code returns bad values it has gfx corruption. the ibarablka set doesn't do this?!
  5651. READ8_MEMBER( cavesh3_state::serial_rtc_eeprom_r )
  5652. {
  5653. rtc9701_device* dev = space.machine().device<rtc9701_device>("eeprom");
  5654.  
  5655. switch (offset)
  5656. {
  5657. case 1:
  5658. return 0xfe | dev->read_bit();
  5659.  
  5660. default:
  5661. return 0;
  5662. }
  5663. }
  5664.  
  5665.  
  5666.  
  5667.  
  5668. WRITE8_MEMBER( cavesh3_state::serial_rtc_eeprom_w )
  5669. {
  5670. switch (offset)
  5671. {
  5672. case 0x01:
  5673. ioport("EEPROMOUT")->write(data, 0xff);
  5674. break;
  5675.  
  5676. case 0x03:
  5677. flash_enab_w(space,offset,data);
  5678. return;
  5679.  
  5680. default:
  5681. break;
  5682. }
  5683. }
  5684.  
  5685.  
  5686.  
  5687. /*WRITE64_MEMBER( cavesh3_state::cavesh3_nop_write )
  5688. {
  5689.  
  5690. }*/
  5691.  
  5692.  
  5693. static ADDRESS_MAP_START( cavesh3_map, AS_PROGRAM, 64, cavesh3_state )
  5694. //AM_RANGE(0x00000000, 0x003fffff) AM_ROM AM_REGION("maincpu", 0) AM_WRITE( cavesh3_nop_write ) // mmmbanc writes here on startup for some reason..
  5695. AM_RANGE(0x00000000, 0x003fffff) AM_ROM AM_REGION("maincpu", 0) AM_WRITENOP // mmmbanc writes here on startup for some reason..
  5696.  
  5697.  
  5698. /* 0x04000000, 0x07ffffff SH3 Internal Regs (including ports) */
  5699.  
  5700. AM_RANGE(0x0c000000, 0x0cffffff) AM_RAM AM_SHARE("mainram") //AM_BASE_LEGACY(&cavesh3_ram)// work RAM
  5701.  
  5702. AM_RANGE(0x10000000, 0x10000007) AM_READWRITE8(ibara_flash_io_r, ibara_flash_io_w, U64(0xffffffffffffffff))
  5703. AM_RANGE(0x10400000, 0x10400007) AM_DEVREADWRITE8("ymz770", ymz770_device, read, write, U64(0xffffffffffffffff))
  5704. AM_RANGE(0x10C00000, 0x10C00007) AM_READWRITE8(serial_rtc_eeprom_r, serial_rtc_eeprom_w, U64(0xffffffffffffffff))
  5705. AM_RANGE(0x18000000, 0x18000057) AM_READWRITE32(cavesh3_blitter_r, cavesh3_blitter_w, U64(0xffffffffffffffff))
  5706.  
  5707. AM_RANGE(0xf0000000, 0xf0ffffff) AM_RAM // mem mapped cache (sh3 internal?)
  5708. /* 0xffffe000, 0xffffffff SH3 Internal Regs 2 */
  5709.  
  5710. ADDRESS_MAP_END
  5711.  
  5712. READ64_MEMBER( cavesh3_state::ibara_fpga_r )
  5713. {
  5714. return 0xff;
  5715. }
  5716.  
  5717. /*WRITE64_MEMBER( cavesh3_state::ibara_fpga_w )
  5718. {
  5719. }*/
  5720.  
  5721.  
  5722. static ADDRESS_MAP_START( cavesh3_port, AS_IO, 64, cavesh3_state )
  5723. AM_RANGE(SH3_PORT_C, SH3_PORT_C+7) AM_READ_PORT("PORT_C")
  5724. AM_RANGE(SH3_PORT_D, SH3_PORT_D+7) AM_READ_PORT("PORT_D")
  5725. AM_RANGE(SH3_PORT_E, SH3_PORT_E+7) AM_READ( ibara_flash_port_e_r )
  5726. AM_RANGE(SH3_PORT_F, SH3_PORT_F+7) AM_READ_PORT("PORT_F")
  5727. AM_RANGE(SH3_PORT_L, SH3_PORT_L+7) AM_READ_PORT("PORT_L")
  5728. //AM_RANGE(SH3_PORT_J, SH3_PORT_J+7) AM_READWRITE( ibara_fpga_r, ibara_fpga_w )
  5729. //AM_RANGE(SH3_PORT_J, SH3_PORT_J+7) AM_READWRITE( ibara_fpga_r, AM_WRITENOP )
  5730. AM_RANGE(SH3_PORT_J, SH3_PORT_J+7) AM_READ( ibara_fpga_r )
  5731.  
  5732. ADDRESS_MAP_END
  5733.  
  5734.  
  5735. static INPUT_PORTS_START( cavesh3 )
  5736. PORT_START("DSW") // 18000050.l (18000050.b + 3 i.e. MSB + 3, is shown as DIPSW)
  5737. PORT_DIPNAME( 0x00000002, 0x00000000, DEF_STR( Unknown ) )
  5738. PORT_DIPSETTING( 0x00000000, DEF_STR( Off ) )
  5739. PORT_DIPSETTING( 0x00000002, DEF_STR( On ) )
  5740. PORT_SERVICE( 0x00000001, IP_ACTIVE_HIGH )
  5741.  
  5742. PORT_START("PORT_C")
  5743. PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service coin
  5744. PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) // Test button copied here
  5745. PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) // IMPLEMENT COIN ERROR!
  5746. PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  5747. PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
  5748. PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
  5749. PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
  5750.  
  5751. PORT_START("PORT_D")
  5752. PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
  5753. PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
  5754. PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
  5755. PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
  5756. PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
  5757. PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
  5758. PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
  5759. PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
  5760.  
  5761. PORT_START("PORT_F")
  5762. PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Test Push Button
  5763. PORT_BIT( 0xfd, IP_ACTIVE_LOW, IPT_UNKNOWN )
  5764.  
  5765.  
  5766. PORT_START("PORT_L") // 4000134.b, 4000136.b
  5767. PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
  5768. PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
  5769. PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
  5770. PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
  5771. PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
  5772. PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
  5773. PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
  5774. PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
  5775.  
  5776. PORT_START( "EEPROMOUT" )
  5777. PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", rtc9701_device, write_bit)
  5778. PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", rtc9701_device, set_clock_line)
  5779. PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", rtc9701_device, set_cs_line)
  5780.  
  5781. PORT_START( "EEPROMIN" )
  5782.  
  5783. INPUT_PORTS_END
  5784.  
  5785.  
  5786.  
  5787. #define CAVE_CPU_CLOCK 12800000 * 8
  5788.  
  5789. // none of this is verified for cave sh3
  5790. // (the sh3 is different to the sh4 anyway, should be changed)
  5791. static const struct sh4_config sh4cpu_config = {
  5792. 0, // md2 (clock divders)
  5793. 0, // md1 (clock divders)
  5794. 0, // md0 (clock divders)
  5795. 0,
  5796. 0,
  5797. 0,
  5798. 1,
  5799. 1, // md7 (master?)
  5800. 0,
  5801. CAVE_CPU_CLOCK
  5802. };
  5803.  
  5804. // 1166666 pixels per frame
  5805. // 1 frame is 0.01666666666666666666666666666667 seconds
  5806. // 1 frame is 16.666666666666666666666666666667 milliseconds
  5807. // 1 frame is 16666666.666666666666666666666667 nanoseconds
  5808.  
  5809.  
  5810.  
  5811. INTERRUPT_GEN_MEMBER(cavesh3_state::cavesh3_interrupt)
  5812. {
  5813. device.execute().set_input_line(2, HOLD_LINE);
  5814. }
  5815.  
  5816.  
  5817. static TIMER_CALLBACK( cavesh3_blitter_delay_callback )
  5818. {
  5819. cavesh3_state *state = machine.driver_data<cavesh3_state>();
  5820.  
  5821. state->blitter_busy = 0;
  5822. }
  5823.  
  5824. static MACHINE_START( cavesh3 )
  5825. {
  5826. size_t size = machine.root_device().memregion( "game" )->bytes();
  5827. cavesh3_state *state = machine.driver_data<cavesh3_state>();
  5828. cavesh3_ram = reinterpret_cast<UINT64 *>(machine.root_device().memshare( "mainram" )->ptr());
  5829.  
  5830. state->flashwritemap = auto_alloc_array(machine, UINT8, size / FLASH_PAGE_SIZE);
  5831. memset(state->flashwritemap, 0, size / FLASH_PAGE_SIZE);
  5832.  
  5833. cavesh3_ram16_copy = auto_alloc_array(machine, UINT16, 0x7ffffff);
  5834.  
  5835. state->cavesh3_blitter_delay_timer = machine.scheduler().timer_alloc(FUNC(cavesh3_blitter_delay_callback));
  5836. state->cavesh3_blitter_delay_timer->adjust(attotime::never);
  5837.  
  5838.  
  5839. state->queue = osd_work_queue_alloc(WORK_QUEUE_FLAG_HIGH_FREQ);
  5840. }
  5841.  
  5842. static MACHINE_RESET( cavesh3 )
  5843. {
  5844. cavesh3_state *state = machine.driver_data<cavesh3_state>();
  5845.  
  5846. flash_enab = 0;
  5847. flash_hard_reset(machine);
  5848. cavesh3_ram16 = (UINT16*)cavesh3_ram;
  5849.  
  5850. state->flashregion = machine.root_device().memregion( "game" )->base();
  5851.  
  5852.  
  5853. // cache table to avoid divides in blit code, also pre-clamped
  5854. int x,y;
  5855. for (y=0;y<0x40;y++)
  5856. {
  5857. for (x=0;x<0x20;x++)
  5858. {
  5859. cavesh3_colrtable[x][y] = (x*y) / 0x1f;
  5860. if (cavesh3_colrtable[x][y]>0x1f) cavesh3_colrtable[x][y] = 0x1f;
  5861.  
  5862. cavesh3_colrtable_rev[x^0x1f][y] = (x*y) / 0x1f;
  5863. if (cavesh3_colrtable_rev[x^0x1f][y]>0x1f) cavesh3_colrtable_rev[x^0x1f][y] = 0x1f;
  5864. }
  5865. }
  5866.  
  5867. // preclamped add table
  5868. for (y=0;y<0x20;y++)
  5869. {
  5870. for (x=0;x<0x20;x++)
  5871. {
  5872. cavesh3_colrtable_add[x][y] = (x+y);
  5873. if (cavesh3_colrtable_add[x][y]>0x1f) cavesh3_colrtable_add[x][y] = 0x1f;
  5874. }
  5875. }
  5876.  
  5877. state->blitter_busy = 0;
  5878. }
  5879.  
  5880.  
  5881. static NVRAM_HANDLER( cavesh3 )
  5882. {
  5883. /* Yes we have to crawl through the entire ~128MB flash because some games
  5884. (eg. Deathsmiles) save data there on top of to the actual EEPROM */
  5885. UINT8 *region = machine.root_device().memregion( "game" )->base();
  5886. size_t size = machine.root_device().memregion( "game" )->bytes();
  5887. cavesh3_state *state = machine.driver_data<cavesh3_state>();
  5888. if (size % FLASH_PAGE_SIZE) return; // region size must be multiple of flash page size
  5889. size /= FLASH_PAGE_SIZE;
  5890.  
  5891. if (read_or_write)
  5892. {
  5893. UINT32 page = 0;
  5894. while (page < size)
  5895. {
  5896. if (state->flashwritemap[page])
  5897. {
  5898. file->write(&page, 4);
  5899. file->write(region + page * FLASH_PAGE_SIZE, FLASH_PAGE_SIZE);
  5900. }
  5901. page++;
  5902. }
  5903. file->write(&page, 4);
  5904. }
  5905. else
  5906. {
  5907. if (file)
  5908. {
  5909. UINT32 page;
  5910. file->read(&page, 4);
  5911. while (page < size)
  5912. {
  5913. state->flashwritemap[page] = 1;
  5914. file->read(region + page * FLASH_PAGE_SIZE, FLASH_PAGE_SIZE);
  5915. file->read(&page, 4);
  5916. }
  5917. }
  5918. }
  5919. }
  5920.  
  5921.  
  5922. static MACHINE_CONFIG_START( cavesh3, cavesh3_state )
  5923. /* basic machine hardware */
  5924. MCFG_CPU_ADD("maincpu", SH3BE, CAVE_CPU_CLOCK)
  5925. MCFG_CPU_CONFIG(sh4cpu_config)
  5926. MCFG_CPU_PROGRAM_MAP(cavesh3_map)
  5927. MCFG_CPU_IO_MAP(cavesh3_port)
  5928. MCFG_CPU_VBLANK_INT_DRIVER("screen", cavesh3_state, cavesh3_interrupt)
  5929.  
  5930. MCFG_RTC9701_ADD("eeprom")
  5931. MCFG_NVRAM_HANDLER(cavesh3)
  5932.  
  5933. /* video hardware */
  5934. MCFG_SCREEN_ADD("screen", RASTER)
  5935. MCFG_SCREEN_REFRESH_RATE(60)
  5936. MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
  5937. MCFG_SCREEN_SIZE(0x200, 0x200)
  5938. MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xf0-1)
  5939.  
  5940. MCFG_PALETTE_LENGTH(0x10000)
  5941.  
  5942.  
  5943. MCFG_SCREEN_UPDATE_STATIC(cavesh3)
  5944. MCFG_MACHINE_START(cavesh3)
  5945. MCFG_MACHINE_RESET(cavesh3)
  5946.  
  5947. MCFG_VIDEO_START(cavesh3)
  5948.  
  5949. MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
  5950. MCFG_YMZ770_ADD("ymz770", 16384000)
  5951. MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
  5952. MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
  5953.  
  5954. MACHINE_CONFIG_END
  5955.  
  5956. /**************************************************
  5957.  
  5958. All roms are flash roms with no labels, so keep the
  5959. version numbers attached to the roms that differ
  5960. - roms which differ have also been prefixed with
  5961. the MAME set names to aid readability and prevent
  5962. accidental misloading of sets with the wrong
  5963. CRCs which causes issues with the speedups.
  5964.  
  5965. **************************************************/
  5966.  
  5967. ROM_START( mushisam )
  5968. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  5969. ROM_LOAD16_WORD_SWAP("mushisam_u4", 0x000000, 0x200000, CRC(15321b30) SHA1(d2cd714ff2299eeab6f9a7c219dfb559c8f98b45) ) /* (2004/10/12 MASTER VER.) */
  5970. ROM_RELOAD(0x200000,0x200000)
  5971.  
  5972. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  5973. ROM_LOAD("mushisam_u2", 0x000000, 0x8400000, CRC(4f0a842a) SHA1(33f3550ec676a7088b6348cd72c16cc6594afb84) ) /* (2004/10/12 MASTER VER.) */
  5974.  
  5975. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  5976. ROM_LOAD16_WORD_SWAP("u23", 0x000000, 0x400000, CRC(138e2050) SHA1(9e86489a4e65af5efb5495adf6d4b3e01d5b2816) )
  5977. ROM_LOAD16_WORD_SWAP("u24", 0x400000, 0x400000, CRC(e3d05c9f) SHA1(130c3d62317da1729c85bd178bd51500edd73ada) )
  5978.  
  5979. ROM_END
  5980.  
  5981. ROM_START( mushisama )
  5982. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  5983. ROM_LOAD16_WORD_SWAP("mushisam_u4", 0x000000, 0x200000, CRC(0b5b30b2) SHA1(35fd1bb1561c30b311b4325bc8f4628f2fccd20b) ) /* (2004/10/12 MASTER VER.) */
  5984. ROM_RELOAD(0x200000,0x200000)
  5985.  
  5986. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  5987. ROM_LOAD("mushisam_u2", 0x000000, 0x8400000, CRC(b1f826dc) SHA1(33f3550ec676a7088b6348cd72c16cc6594afb84) ) /* (2004/10/12 MASTER VER.) */
  5988.  
  5989. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  5990. ROM_LOAD16_WORD_SWAP("u23", 0x000000, 0x400000, CRC(138e2050) SHA1(9e86489a4e65af5efb5495adf6d4b3e01d5b2816) )
  5991. ROM_LOAD16_WORD_SWAP("u24", 0x400000, 0x400000, CRC(e3d05c9f) SHA1(130c3d62317da1729c85bd178bd51500edd73ada) )
  5992.  
  5993. ROM_END
  5994.  
  5995. ROM_START( mushisamb )
  5996. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  5997. ROM_LOAD16_WORD_SWAP("mushisamb_u4", 0x000000, 0x200000, CRC(9f1c7f51) SHA1(f82ae72ec03687904ca7516887080be92365a5f3) ) /* (2004/10/12 MASTER VER) */
  5998. ROM_RELOAD(0x200000,0x200000)
  5999.  
  6000. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6001. ROM_LOAD("mushisamb_u2", 0x000000, 0x8400000, CRC(6cc9d1a9) SHA1(17907798dce1defadd10354cec6c8d364e045570) ) /* (2004/10/12 MASTER VER) */
  6002.  
  6003. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6004. ROM_LOAD16_WORD_SWAP("u23", 0x000000, 0x400000, CRC(138e2050) SHA1(9e86489a4e65af5efb5495adf6d4b3e01d5b2816) )
  6005. ROM_LOAD16_WORD_SWAP("u24", 0x400000, 0x400000, CRC(e3d05c9f) SHA1(130c3d62317da1729c85bd178bd51500edd73ada) )
  6006.  
  6007. ROM_END
  6008.  
  6009. ROM_START( espgal2 )
  6010. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6011. ROM_LOAD16_WORD_SWAP("u4", 0x000000, 0x200000, CRC(09c908bb) SHA1(7d6031fd3542b3e1d296ff218feb40502fd78694) ) /* (2005/11/14 MASTER VER) */
  6012. ROM_RELOAD(0x200000,0x200000)
  6013.  
  6014. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6015. ROM_LOAD("u2", 0x000000, 0x8400000, CRC(222f58c7) SHA1(d47a5085a1debd9cb8c61d88cd39e4f5036d1797) ) /* (2005/11/14 MASTER VER) */
  6016.  
  6017. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6018. ROM_LOAD16_WORD_SWAP("u23", 0x000000, 0x400000, CRC(b9a10c22) SHA1(4561f95c6018c9716077224bfe9660e61fb84681) )
  6019. ROM_LOAD16_WORD_SWAP("u24", 0x400000, 0x400000, CRC(c76b1ec4) SHA1(b98a53d41a995d968e0432ed824b0b06d93dcea8) )
  6020.  
  6021. ROM_END
  6022.  
  6023. ROM_START( mushitam )
  6024. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6025. ROM_LOAD16_WORD_SWAP("u4", 0x000000, 0x200000, CRC(4a23e6c8) SHA1(d44c287bb88e6d413a8d35d75bc1b4928ad52cdf) ) /* (2005/09/09 MASTER VER) */
  6026. ROM_RELOAD(0x200000,0x200000)
  6027.  
  6028. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6029. ROM_LOAD("u2", 0x000000, 0x8400000, CRC(3f93ff82) SHA1(6f6c250aa7134016ffb288d056bc937ea311f538) ) /* (2005/09/09 MASTER VER) */
  6030.  
  6031. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6032. ROM_LOAD16_WORD_SWAP("u23", 0x000000, 0x400000, CRC(701a912a) SHA1(85c198946fb693d99928ea2595c84ba4d9dc8157) )
  6033. ROM_LOAD16_WORD_SWAP("u24", 0x400000, 0x400000, CRC(6feeb9a1) SHA1(992711c80e660c32f97b343c2ce8184fddd7364e) )
  6034.  
  6035. ROM_END
  6036.  
  6037. ROM_START( futari15 )
  6038. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6039. ROM_LOAD16_WORD_SWAP("futari15_u4", 0x000000, 0x200000, CRC(e8c5f128) SHA1(45fb8066fdbecb83fdc2e14555c460d0c652cd5f) ) /* (2006/12/8.MAST VER. 1.54.) */
  6040. ROM_RELOAD(0x200000,0x200000)
  6041.  
  6042. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6043. ROM_LOAD("futari15_u2", 0x000000, 0x8400000, CRC(b9eae1fc) SHA1(410f8e7cfcbfd271b41fb4f8d049a13a3191a1f9) ) /* (2006/12/8.MAST VER. 1.54.) */
  6044.  
  6045. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6046. ROM_LOAD16_WORD_SWAP("u23", 0x000000, 0x400000, CRC(39f1e1f4) SHA1(53d12f59a56df35c705408c76e6e02118da656f1) )
  6047. ROM_LOAD16_WORD_SWAP("u24", 0x400000, 0x400000, CRC(c631a766) SHA1(8bb6934a2f5b8a9841c3dcf85192b1743773dd8b) )
  6048.  
  6049. ROM_END
  6050.  
  6051. ROM_START( futari15a )
  6052. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6053. ROM_LOAD16_WORD_SWAP("futari15a_u4", 0x000000, 0x200000, CRC(a609cf89) SHA1(56752fae9f42fa852af8ee2eae79e25ec7f17953) ) /* (2006/12/8 MAST VER 1.54) */
  6054. ROM_RELOAD(0x200000,0x200000)
  6055.  
  6056. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6057. ROM_LOAD("futari15a_u2", 0x000000, 0x8400000, CRC(b9d815f9) SHA1(6b6f668b0bbb087ffac65e4f0d8bd9d5b28eeb28) ) /* (2006/12/8 MAST VER 1.54) */
  6058.  
  6059. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6060. ROM_LOAD16_WORD_SWAP("u23", 0x000000, 0x400000, CRC(39f1e1f4) SHA1(53d12f59a56df35c705408c76e6e02118da656f1) )
  6061. ROM_LOAD16_WORD_SWAP("u24", 0x400000, 0x400000, CRC(c631a766) SHA1(8bb6934a2f5b8a9841c3dcf85192b1743773dd8b) )
  6062.  
  6063. ROM_END
  6064.  
  6065. ROM_START( futari10 )
  6066. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6067. ROM_LOAD16_WORD_SWAP( "futari10_u4", 0x000000, 0x200000, CRC(b127dca7) SHA1(e1f518bc72fc1cdf69aefa89eafa4edaf4e84778) ) /* (2006/10/23 MASTER VER.) */
  6068. ROM_RELOAD(0x200000,0x200000)
  6069.  
  6070. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6071. ROM_LOAD( "futari10_u2", 0x000000, 0x8400000, CRC(78ffcd0c) SHA1(0e2937edec15ce3f5741b72ebd3bbaaefffb556e) ) /* (2006/10/23 MASTER VER.) */
  6072.  
  6073. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6074. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(39f1e1f4) SHA1(53d12f59a56df35c705408c76e6e02118da656f1) )
  6075. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(c631a766) SHA1(8bb6934a2f5b8a9841c3dcf85192b1743773dd8b) )
  6076.  
  6077. ROM_END
  6078.  
  6079. ROM_START( futariblk )
  6080. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6081. ROM_LOAD16_WORD_SWAP( "futariblk_u4", 0x000000, 0x200000, CRC(6db13c62) SHA1(6a53ce7f70b754936ccbb3a4674d4b2f03979644) ) /* (2007/12/11 BLACK LABEL VER) */
  6082. ROM_RELOAD(0x200000,0x200000)
  6083.  
  6084. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6085. ROM_LOAD( "futariblk_u2", 0x000000, 0x8400000, CRC(08c6fd62) SHA1(e1fc386b2b0e41906c724287cbf82304297e0150) ) /* (2007/12/11 BLACK LABEL VER) */
  6086.  
  6087. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6088. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(39f1e1f4) SHA1(53d12f59a56df35c705408c76e6e02118da656f1) )
  6089. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(c631a766) SHA1(8bb6934a2f5b8a9841c3dcf85192b1743773dd8b) )
  6090.  
  6091. ROM_END
  6092.  
  6093. ROM_START( ibara )
  6094. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6095. ROM_LOAD16_WORD_SWAP( "u4", 0x000000, 0x200000, CRC(8e6c155d) SHA1(38ac2107dc7824836e2b4e04c7180d5ae43c9b79) ) /* (2005/03/22 MASTER VER..) */
  6096. ROM_RELOAD(0x200000,0x200000)
  6097.  
  6098. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6099. ROM_LOAD( "u2", 0x000000, 0x8400000, CRC(55840976) SHA1(4982bdce84f9603adfed7a618f18bc80359ab81e) ) /* (2005/03/22 MASTER VER..) */
  6100.  
  6101. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6102. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(ee5e585d) SHA1(7eeba4ee693060e927f8c46b16e39227c6a62392) )
  6103. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(f0aa3cb6) SHA1(f9d137cd879e718811b2d21a0af2a9c6b7dca2f9) )
  6104.  
  6105. ROM_END
  6106.  
  6107. ROM_START( ibarablk ) /* Title screen shows (c) 2005 despite the 2006 "master" date */
  6108. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6109. ROM_LOAD16_WORD_SWAP( "ibarablk_u4", 0x000000, 0x200000, CRC(ee1f1f77) SHA1(ac276f3955aa4dde2544af4912819a7ae6bcf8dd) ) /* (2006/02/06. MASTER VER.) */
  6110. ROM_RELOAD(0x200000,0x200000)
  6111.  
  6112. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6113. ROM_LOAD( "ibarablk_u2", 0x000000, 0x8400000, CRC(5e46be44) SHA1(bed5f1bf452f2cac58747ecabec3c4392566a3a7) ) /* (2006/02/06. MASTER VER.) */
  6114.  
  6115. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6116. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(a436bb22) SHA1(0556e771cc02638bf8814315ba671c2d442594f1) ) /* (2006/02/06 MASTER VER.) */
  6117. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(d11ab6b6) SHA1(2132191cbe847e2560423e4545c969f21f8ff825) ) /* (2006/02/06 MASTER VER.) */
  6118.  
  6119. ROM_END
  6120.  
  6121. ROM_START( ibarablka ) /* Title screen shows (c) 2005 despite the 2006 "master" date */
  6122. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6123. ROM_LOAD16_WORD_SWAP( "ibarablka_u4", 0x000000, 0x200000, CRC(a9d43839) SHA1(507696e616608c05893c7ac2814b3365e9cb0720) ) /* (2006/02/06 MASTER VER.) */
  6124. ROM_RELOAD(0x200000,0x200000)
  6125.  
  6126. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6127. ROM_LOAD( "ibarablka_u2", 0x000000, 0x8400000, CRC(33400d96) SHA1(09c22b5431ac3726bf88c56efd970f56793f825a) ) /* (2006/02/06 MASTER VER.) */
  6128.  
  6129. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6130. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(a436bb22) SHA1(0556e771cc02638bf8814315ba671c2d442594f1) ) /* (2006/02/06 MASTER VER.) */
  6131. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(d11ab6b6) SHA1(2132191cbe847e2560423e4545c969f21f8ff825) ) /* (2006/02/06 MASTER VER.) */
  6132.  
  6133. ROM_END
  6134.  
  6135. ROM_START( deathsml )
  6136. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6137. ROM_LOAD16_WORD_SWAP( "u4", 0x000000, 0x200000, CRC(1a7b98bf) SHA1(07798a4a846e5802756396b34df47d106895c1f1) ) /* (2007/10/09 MASTER VER) */
  6138. ROM_RELOAD(0x200000,0x200000)
  6139.  
  6140. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6141. ROM_LOAD( "u2", 0x000000, 0x8400000, CRC(d45b0698) SHA1(7077b9445f5ed4749c7f683191ccd312180fac38) ) /* (2007/10/09 MASTER VER) */
  6142.  
  6143. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6144. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(aab718c8) SHA1(0e636c46d06151abd6f73232bc479dafcafe5327) )
  6145. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(83881d84) SHA1(6e2294b247dfcbf0ced155dc45c706f29052775d) )
  6146.  
  6147. ROM_END
  6148.  
  6149. ROM_START( mmpork )
  6150. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6151. ROM_LOAD16_WORD_SWAP( "u4", 0x000000, 0x200000, CRC(d06cfa42) SHA1(5707feb4b3e5265daf5926f38c38612b24106f1f) ) /* (2007/ 4/17 MASTER VER.) */
  6152. ROM_RELOAD(0x200000,0x200000)
  6153.  
  6154. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6155. ROM_LOAD( "u2", 0x000000, 0x8400000, CRC(1ee961b8) SHA1(81a2eba704ac1cf7fc44fa7c6a3f50e3570c104f) ) /* (2007/ 4/17 MASTER VER.) */
  6156.  
  6157. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6158. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(4a4b36df) SHA1(5db5ce6fa47e5ca3263d4bd19315890c6d29df66) )
  6159. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(ce83d07b) SHA1(a5947467c8f5b7c4b0ad8e32df2ee29b787e355f) )
  6160.  
  6161. ROM_END
  6162.  
  6163. ROM_START( mmmbanc )
  6164. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6165. ROM_LOAD16_WORD_SWAP( "u4", 0x0000, 0x200000, CRC(5589d8c6) SHA1(43fbdb0effe2bc0e7135698757b6ee50200aecde) ) /* (2007/06/05 MASTER VER.) */
  6166. ROM_RELOAD(0x200000,0x200000)
  6167.  
  6168. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6169. ROM_LOAD( "u2", 0x000000, 0x8400000, CRC(f3b50c30) SHA1(962327798081b292b2d3fd3b7845c0197f9f2d8a) ) /* (2007/06/05 MASTER VER.) */
  6170.  
  6171. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6172. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(4caaa1bf) SHA1(9b92c13eac05601da4d9bb3eb727c156974e9f0c) )
  6173. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(8e3a51ba) SHA1(e34cf9acb13c3d8ca6cd1306b060b1d429872abd) )
  6174.  
  6175. ROM_END
  6176.  
  6177. ROM_START( pinkswts )
  6178. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6179. ROM_LOAD16_WORD_SWAP( "pinkswts_u4", 0x0000, 0x200000, CRC(5d812c9e) SHA1(db821ec3892fd150513749d64a8b60bf147f3275) ) /* (2006/04/06 MASTER VER....) */
  6180. ROM_RELOAD(0x200000,0x200000)
  6181.  
  6182. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6183. ROM_LOAD( "pinkswts_u2", 0x000000, 0x8400000, CRC(92d3243a) SHA1(e9d20c62f642fb2f62ef83ed5caeee6b3f67fef9) ) /* (2006/04/06 MASTER VER....) */
  6184.  
  6185. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6186. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(4b82d250) SHA1(ee98dbc3f791efb6d58f3945bcb2044667ae7978) )
  6187. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(e93f0627) SHA1(6f5ec0ade87f7fc42a58a8f125557a4d1f3f187d) )
  6188.  
  6189. ROM_END
  6190.  
  6191. ROM_START( pinkswtsa )
  6192. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6193. ROM_LOAD16_WORD_SWAP( "pnkswtsa_u4", 0x0000, 0x200000, CRC(ee3339b2) SHA1(995988d370731a7074b49ce8752525dadf06a954) ) /* (2006/04/06 MASTER VER...) */
  6194. ROM_RELOAD(0x200000,0x200000)
  6195.  
  6196. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6197. ROM_LOAD( "pnkswtsa_u2", 0x000000, 0x8400000, CRC(829a862e) SHA1(8c0ee2a0eb33b68869252fd68aed74820a904287) ) /* (2006/04/06 MASTER VER...) */
  6198.  
  6199. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6200. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(4b82d250) SHA1(ee98dbc3f791efb6d58f3945bcb2044667ae7978) )
  6201. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(e93f0627) SHA1(6f5ec0ade87f7fc42a58a8f125557a4d1f3f187d) )
  6202.  
  6203. ROM_END
  6204.  
  6205. ROM_START( pinkswtsb )
  6206. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6207. ROM_LOAD16_WORD_SWAP( "pnkswtsb_u4", 0x0000, 0x200000, CRC(68bcc009) SHA1(2fef544b93c61161a37365f868b431d8262e4b21) ) /* (2006/04/06 MASTER VER.) */
  6208. ROM_RELOAD(0x200000,0x200000)
  6209.  
  6210. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6211. ROM_LOAD( "pnkswtsb_u2", 0x000000, 0x8400000, CRC(a5666ed9) SHA1(682e06c84990225bc6bb0c9f38b5f46c4e36b430) ) /* (2006/04/06 MASTER VER.) */
  6212.  
  6213. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6214. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(4b82d250) SHA1(ee98dbc3f791efb6d58f3945bcb2044667ae7978) )
  6215. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(e93f0627) SHA1(6f5ec0ade87f7fc42a58a8f125557a4d1f3f187d) )
  6216.  
  6217. ROM_END
  6218.  
  6219. ROM_START( pinkswtsx )
  6220. ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
  6221. ROM_LOAD16_WORD_SWAP( "pnkswtsx_u4", 0x0000, 0x200000, CRC(8fe05bf0) SHA1(5cd45ac0e74690787c83d3fb383a65ed7cd47104) ) /* (2006/04/06 MASTER VER.) */
  6222. ROM_RELOAD(0x200000,0x200000)
  6223.  
  6224. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6225. ROM_LOAD( "pnkswtsx_u2", 0x000000, 0x8400000, CRC(91e4deb2) SHA1(893cb10d6f805df7cb4a1bb709a3ea6de147b7e9) ) /* (2006/04/06 MASTER VER.) */
  6226.  
  6227. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6228. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(4b82d250) SHA1(ee98dbc3f791efb6d58f3945bcb2044667ae7978) )
  6229. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(e93f0627) SHA1(6f5ec0ade87f7fc42a58a8f125557a4d1f3f187d) )
  6230.  
  6231. ROM_END
  6232.  
  6233. ROM_START( dsmbl )
  6234. ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF)
  6235. ROM_LOAD16_WORD_SWAP( "(__dsmbl)u4", 0x000000, 0x400000, CRC(77fc5ad1) SHA1(afe044fc16e9494143c876879b033caccd08cf22) )
  6236. ROM_RELOAD(0x400000,0x400000)
  6237.  
  6238. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6239. ROM_LOAD( "(__dsmbl)u2", 0x000000, 0x8400000, CRC(d6b85b7a) SHA1(4674f6ad07f6a03904ca3d05060816b8fe061add) ) /* (2007/10/09 MASTER VER) */
  6240.  
  6241. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6242. ROM_LOAD16_WORD_SWAP( "(__dsmbl)u23", 0x000000, 0x400000, CRC(a9536a6a) SHA1(4b9dcaf6803b1fcfdf73ae9daabc4508fec71631) )
  6243. ROM_LOAD16_WORD_SWAP( "(__dsmbl)u24", 0x400000, 0x400000, CRC(3b673326) SHA1(1ae847eb4e752fef1d72081d82344f0ad0537c31) )
  6244.  
  6245. ROM_END
  6246.  
  6247. ROM_START( ddpdfk )
  6248. ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF)
  6249. ROM_LOAD16_WORD_SWAP( "(__ddpdfk)u4", 0x000000, 0x400000, CRC(9976d699) SHA1(9dfe9d1daf6f638cafce8cdc5230209e2bcb7522) )
  6250. ROM_RELOAD(0x400000,0x400000)
  6251.  
  6252. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6253. ROM_LOAD( "(__ddpdfk)u2", 0x000000, 0x8400000, CRC(84a51a4f) SHA1(291a6279c0746d2eb8630e7d6d886043f0cfdd94) ) /* (2007/10/09 MASTER VER) */
  6254.  
  6255. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6256. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(27032cde) SHA1(5b58d0140d72b91db4e763ca4af93060d36ac74d) )
  6257. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(a6178c2c) SHA1(7742ad1de2e4b0d0206ad11d467ea35da36352df) )
  6258.  
  6259. ROM_END
  6260.  
  6261. ROM_START( ddpdfk10 )
  6262. ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF)
  6263. ROM_LOAD16_WORD_SWAP( "(__ddpdfk10)u4", 0x000000, 0x400000, CRC(a3d650b2) SHA1(46a7551760e18c2cecd372c3f4be16f6600efc2c) )
  6264. ROM_RELOAD(0x400000,0x400000)
  6265.  
  6266. ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
  6267. ROM_LOAD( "(__ddpdfk10)u2", 0x000000, 0x8400000, CRC(d349cb2a) SHA1(c364c36b69b93f8f62390f185d044f51056669ff) ) /* (2007/10/09 MASTER VER) */
  6268.  
  6269. ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
  6270. ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(27032cde) SHA1(5b58d0140d72b91db4e763ca4af93060d36ac74d) )
  6271. ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(a6178c2c) SHA1(7742ad1de2e4b0d0206ad11d467ea35da36352df) )
  6272.  
  6273. ROM_END
  6274.  
  6275. static READ64_HANDLER( mushisam_speedup_r )
  6276. {
  6277. int pc = space.device().safe_pc();
  6278. if ( pc == 0xc04a0aa ) space.device().execute().spin_until_time(attotime::from_usec(10)); // mushisam
  6279. else if (pc == 0xc04a0da) space.device().execute().spin_until_time(attotime::from_usec(10)); // mushitam
  6280. return cavesh3_ram[0x0022f0/8];
  6281. }
  6282.  
  6283. DRIVER_INIT_MEMBER( cavesh3_state,mushisam )
  6284. {
  6285. machine().device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0xc0022f0, 0xc0022f7, FUNC(mushisam_speedup_r));
  6286. }
  6287.  
  6288. static READ64_HANDLER( mushisama_speedup_r )
  6289. {
  6290. if ( space.device().safe_pc()== 0xc04a2aa ) space.device().execute().spin_until_time(attotime::from_usec(10)); // mushisam
  6291. return cavesh3_ram[0x00024d8/8];
  6292. }
  6293.  
  6294. DRIVER_INIT_MEMBER( cavesh3_state,mushisama )
  6295. {
  6296. machine().device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0xc0024d8, 0xc0024df, FUNC(mushisama_speedup_r));
  6297. }
  6298.  
  6299. static READ64_HANDLER( espgal2_speedup_r )
  6300. {
  6301. int pc = space.device().safe_pc();
  6302. if ( pc == 0xc1d1346 ) space.device().execute().spin_until_time(attotime::from_usec(10)); // dsmbl
  6303. if ( pc == 0xc05177a ) space.device().execute().spin_until_time(attotime::from_usec(10)); // espgal2
  6304. if ( pc == 0xc05176a ) space.device().execute().spin_until_time(attotime::from_usec(10)); // futari15 / futari15a / futari10 / futariblk / ibarablk / ibarablka / mmpork / mmmbanc
  6305. if ( pc == 0xc0519a2 ) space.device().execute().spin_until_time(attotime::from_usec(10)); // deathsml
  6306. return cavesh3_ram[0x002310/8];
  6307. }
  6308.  
  6309. DRIVER_INIT_MEMBER( cavesh3_state,espgal2 )
  6310. {
  6311. machine().device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0xc002310, 0xc002317, FUNC(espgal2_speedup_r) );
  6312. }
  6313.  
  6314.  
  6315. GAME( 2004, mushisam, 0, cavesh3, cavesh3, cavesh3_state, mushisam, ROT270, "Cave", "Mushihime-Sama (2004/10/12.MASTER VER.)", 0 )
  6316. GAME( 2004, mushisama, mushisam, cavesh3, cavesh3, cavesh3_state, mushisama, ROT270, "Cave", "Mushihime-Sama (2004/10/12 MASTER VER.)", 0 )
  6317. GAME( 2004, mushisamb, mushisam, cavesh3, cavesh3, cavesh3_state, mushisama, ROT270, "Cave", "Mushihime-Sama (2004/10/12 MASTER VER)", 0 )
  6318. GAME( 2005, espgal2, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Espgaluda II (2005/11/14 MASTER VER)", 0 )
  6319. GAME( 2005, ibara, 0, cavesh3, cavesh3, cavesh3_state, mushisam, ROT270, "Cave", "Ibara (2005/03/22 MASTER VER..)", 0 )
  6320. GAME( 2006, ibarablk, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Ibara Kuro Black Label (2006/02/06. MASTER VER.)", 0 )
  6321. GAME( 2006, ibarablka, ibarablk, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Ibara Kuro Black Label (2006/02/06 MASTER VER.)", 0 )
  6322. GAME( 2005, mushitam, 0, cavesh3, cavesh3, cavesh3_state, mushisam, ROT0, "Cave", "Puzzle! Mushihime-Tama (2005/09/09 MASTER VER)", 0 )
  6323. GAME( 2006, futari15, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Mushihime-Sama Futari Ver 1.5 (2006/12/8.MASTER VER. 1.54.)", 0 )
  6324. GAME( 2006, futari15a, futari15, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Mushihime-Sama Futari Ver 1.5 (2006/12/8 MASTER VER 1.54)", 0 )
  6325. GAME( 2006, futari10, futari15, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Mushihime-Sama Futari Ver 1.0 (2006/10/23 MASTER VER.)", 0 )
  6326. GAME( 2007, futariblk, futari15, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Mushihime-Sama Futari Black Label (2007/12/11 BLACK LABEL VER)", 0 )
  6327. GAME( 2006, pinkswts, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Pink Sweets: Ibara Sorekara (2006/04/06 MASTER VER....)", 0 )
  6328. GAME( 2006, pinkswtsa, pinkswts, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Pink Sweets: Ibara Sorekara (2006/04/06 MASTER VER...)", 0 )
  6329. GAME( 2006, pinkswtsb, pinkswts, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Pink Sweets: Ibara Sorekara (2006/04/06 MASTER VER.)", 0 )
  6330. GAME( 2006, pinkswtsx, pinkswts, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Pink Sweets: Ibara Sorekara (2006/xx/xx MASTER VER.)", 0 )
  6331. GAME( 2007, deathsml, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT0, "Cave", "Deathsmiles (2007/10/09 MASTER VER)", 0 )
  6332. GAME( 2008, dsmbl, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT0, "Cave", "Deathsmiles Mega Black Label (2008/10/06 MEGABLACK LABEL VER)", 0 )
  6333. GAME( 2007, mmpork, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Muchi Muchi Pork! (2007/ 4/17 MASTER VER.)", 0 )
  6334. GAME( 2007, mmmbanc, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT0, "Cave", "Medal Mahjong Moukari Bancho (2007/06/05 MASTER VER.)", GAME_NOT_WORKING )
  6335. GAME( 2008, ddpdfk, 0, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Do-Don-Pachi Dai-Fukkatsu (2008/06/23 MASTER VER 1.5)", 0 )
  6336. GAME( 2008, ddpdfk10, ddpdfk, cavesh3, cavesh3, cavesh3_state, espgal2, ROT270, "Cave", "Do-Don-Pachi Dai-Fukkatsu (2008/05/16 MASTER VER)", 0 )
  6337.  
  6338.  
  6339. /*
  6340.  
  6341. Known versions of games on this hardware (* denotes undumped):
  6342.  
  6343. Mushihime-Sama
  6344. "2004/10/12 MASTER VER" - broken
  6345. "2004/10/12 MASTER VER." - fixed 1
  6346. * "2004/10/12.MASTER VER." - fixed 2
  6347.  
  6348. Puzzle! Mushihime-Tama
  6349. "2005/09/09 MASTER VER"
  6350.  
  6351. Espgaluda II
  6352. "2005/11/14 MASTER VER"
  6353.  
  6354. Ibara
  6355. "2005/03/22 MASTER VER.."
  6356.  
  6357. Ibara Kuro Black Label
  6358. "2006/02/06 MASTER VER."
  6359. "2006/02/06. MASTER VER."
  6360.  
  6361. Pink Sweets: Ibara Sorekara
  6362. "2006/04/06 MASTER VER."
  6363. "2006/04/06 MASTER VER..."
  6364. "2006/04/06 MASTER VER...."
  6365. * "2006/05/18 MASTER VER." - Removes infinite lives trick, fixes some bugs
  6366. * "2006/xx/xx MASTER VER"
  6367. "2006/xx/xx MASTER VER."
  6368.  
  6369. Mushihime-Sama Futari Ver 1.0
  6370. * "2006/10/23 MASTER VER" - Ultra unlockable
  6371. "2006/10/23 MASTER VER." - Ultra unlockable
  6372. * "2006/10/23.MASTER VER." - Cannot unlock ultra
  6373.  
  6374. Mushihime-Sama Futari Ver 1.5
  6375. "2006/12/8 MASTER VER 1.54"
  6376. "2006/12/8.MASTER VER.1.54."
  6377.  
  6378. Mushihime-Sama Futari Black Label
  6379. "2007/12/11 BLACK LABEL VER"
  6380. * "2009/11/17 INTERNATIONAL BL" ("Another Ver" on title screen)
  6381.  
  6382. Muchi Muchi Pork!
  6383. "2007/ 4/17 MASTER VER."
  6384. * "2007/ 4/17 MASTER VER.."
  6385.  
  6386. Medal Mahjong Moukari Bancho
  6387. "2007/06/05 MASTER VER."
  6388.  
  6389. Deathsmiles
  6390. "2007/10/09 MASTER VER"
  6391.  
  6392. Deathsmiles Mega Black Label
  6393. * "2008/10/06 MEGABLACK LABEL VER"
  6394.  
  6395. Do-Don-Pachi Dai-Fukkatsu Ver 1.0
  6396. * "2008/05/16 MASTER VER"
  6397.  
  6398. Do-Don-Pachi Dai-Fukkatsu Ver 1.5
  6399. * "2008/06/23 MASTER VER 1.5"
  6400.  
  6401. Do-Don-Pachi Dai-Fukkatsu Black Label
  6402. * "2010/1/18 BLACK LABEL"
  6403.  
  6404. Akai Katana
  6405. * "2010/ 8/13 MASTER VER."
  6406. * Home/Limited version, unknown date line, different gameplay from regular version, doesn't accept coins - permanent freeplay
  6407.  
  6408. Mushihime-Sama Ver 1.5 Matsuri Version
  6409. * 2011/5/23 CAVEMATSURI VER 1.5
  6410.  
  6411.  
  6412. --- Titles below are known versions from Cave's fan festivals and are likely in house only versions. Dates are the Cave festival shown ---
  6413.  
  6414. Shown Title Notes
  6415. -----------------------------------------------------------------------------------------------------------------------
  6416. 12/28/06 Mushihime-Sama Ver 1.5 ~Blue Label~ No Maniac mode.
  6417. 12/28/06 Mushihime-Sama Futari Ver 1.5 ~Red Label~ 3 PCBs were given away to top scorers.
  6418. 12/28/06 Mushihime-Sama Futari Ver 1.01
  6419. 12/30/07 Muchi Muchi Pork! Dai Cave Festival ~Special Version~ Includes Pink Sweets bosses at the end of each stage.
  6420. 12/30/07 Deathsmiles: Dai Cave Festival ~Special Version~ Inclueds a rank 99 difficulty. Prototype for DSMBL.
  6421. 08/15/08 Do-Don-Pachi Dai-Fukkatsu Ver 1.5 ~Special~ Power-style only.
  6422. 10/20/10 Do-Don-Pachi Dai-Fukkatsu Ver 1.51
  6423.  
  6424. */
Advertisement
Add Comment
Please, Sign In to add comment