[a06aa8b] | 1 | /*
|
---|
| 2 | * Copyright (C) 2017 The Contributors
|
---|
| 3 | *
|
---|
| 4 | * This program is free software: you can redistribute it and/or modify
|
---|
| 5 | * it under the terms of the GNU General Public License as published by
|
---|
| 6 | * the Free Software Foundation, either version 3 of the License, or (at
|
---|
| 7 | * your option) any later version.
|
---|
| 8 | *
|
---|
| 9 | * This program is distributed in the hope that it will be useful, but
|
---|
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 12 | * General Public License for more details.
|
---|
| 13 | *
|
---|
| 14 | * A copy of the GNU General Public License can be found in the file
|
---|
[2147e53] | 15 | * "gpl.txt" in the top directory of this repository.
|
---|
[a06aa8b] | 16 | */
|
---|
| 17 |
|
---|
| 18 | #include <all.h>
|
---|
| 19 |
|
---|
[4c71d39] | 20 | #define ver(...) _ver(vid_verbose, 0, __VA_ARGS__)
|
---|
| 21 | #define ver2(...) _ver(vid_verbose, 1, __VA_ARGS__)
|
---|
| 22 | #define ver3(...) _ver(vid_verbose, 2, __VA_ARGS__)
|
---|
[a06aa8b] | 23 |
|
---|
[4c71d39] | 24 | int32_t vid_verbose = 0;
|
---|
[a06aa8b] | 25 |
|
---|
[ac4e192] | 26 | #define SCR_W 512
|
---|
| 27 | #define SCR_H 350
|
---|
| 28 | #define VBL_H 50
|
---|
| 29 |
|
---|
| 30 | #define REG_VCR0 0
|
---|
| 31 | #define REG_VCR1 1
|
---|
| 32 | #define REG_RWBA 2
|
---|
| 33 | #define REG_DSBA 5
|
---|
| 34 | #define REG_ODTBA 7
|
---|
| 35 | #define REG_ATBA 8
|
---|
[b6f5f64] | 36 | #define REG_CGBA 10
|
---|
[ac4e192] | 37 | #define REG_ATBAC 11
|
---|
| 38 |
|
---|
| 39 | #define VCR0_UCF 0x0001
|
---|
| 40 | #define VCR0_DEN 0x0008
|
---|
| 41 |
|
---|
| 42 | #define DSBA_BS1 0x0080
|
---|
| 43 | #define DSBA_BS0 0x0100
|
---|
| 44 |
|
---|
| 45 | #define REG_OFF 0x200
|
---|
| 46 | #define PAL_OFF 0x40000
|
---|
| 47 |
|
---|
[f285858] | 48 | #define OD0_TDE 0x0004
|
---|
[ac4e192] | 49 | #define OD0_BLA 0x0010
|
---|
[f285858] | 50 | #define OD0_CB 0x0800
|
---|
[ac4e192] | 51 |
|
---|
[b6f5f64] | 52 | #define AT_CG 0x8000
|
---|
| 53 |
|
---|
[ac4e192] | 54 | #define WIN_SZ_W 0x10000
|
---|
| 55 | #define MEM_SZ_W 0x20000
|
---|
| 56 |
|
---|
| 57 | #define N_BANKS 2
|
---|
| 58 |
|
---|
[f285858] | 59 | #define SCALE(_x) (_x * 2)
|
---|
| 60 |
|
---|
| 61 | #define WIN_W SCALE(SCR_W)
|
---|
| 62 | #define WIN_H SCALE(SCR_H)
|
---|
| 63 |
|
---|
| 64 | typedef struct {
|
---|
| 65 | int32_t x, y, w, h;
|
---|
| 66 | uint16_t *mem;
|
---|
| 67 | bool tran;
|
---|
[b6f5f64] | 68 | int32_t fon_h;
|
---|
| 69 | } obj_t;
|
---|
[f285858] | 70 |
|
---|
[ac4e192] | 71 | static int32_t reg_off = REG_OFF;
|
---|
| 72 |
|
---|
| 73 | static uint16_t mem[MEM_SZ_W];
|
---|
| 74 | static int32_t bank = 0;
|
---|
| 75 |
|
---|
[f285858] | 76 | static uint32_t pal[16];
|
---|
| 77 |
|
---|
[b6f5f64] | 78 | static obj_t objs[16];
|
---|
| 79 | static int32_t n_objs = 0;
|
---|
[f285858] | 80 |
|
---|
| 81 | static SDL_Window *win;
|
---|
[4ed9bfe] | 82 | uint32_t vid_win;
|
---|
| 83 |
|
---|
[f285858] | 84 | static SDL_Renderer *ren;
|
---|
| 85 | static SDL_Texture *tex;
|
---|
| 86 | static SDL_atomic_t frame;
|
---|
| 87 |
|
---|
[b6f5f64] | 88 | static void rend_bm(uint16_t *vid, int32_t w, int32_t h, uint32_t *pix, int32_t pitch)
|
---|
| 89 | {
|
---|
| 90 | for (int32_t y = 0; y < h; ++y) {
|
---|
| 91 | for (int32_t x = 0; x < w / 4; ++x) {
|
---|
| 92 | uint16_t v4 = *vid++;
|
---|
| 93 |
|
---|
| 94 | *pix++ = pal[(v4 & 0x000f) >> 0];
|
---|
| 95 | *pix++ = pal[(v4 & 0x00f0) >> 4];
|
---|
| 96 | *pix++ = pal[(v4 & 0x0f00) >> 8];
|
---|
| 97 | *pix++ = pal[(v4 & 0xf000) >> 12];
|
---|
| 98 | }
|
---|
| 99 |
|
---|
| 100 | pix += pitch / 4 - w;
|
---|
| 101 | }
|
---|
| 102 | }
|
---|
| 103 |
|
---|
| 104 | static void rend_tx(uint16_t *vid, int32_t w, int32_t h, int32_t fon_h,
|
---|
| 105 | uint32_t *pix, int32_t pitch)
|
---|
| 106 | {
|
---|
| 107 | int32_t cgba = mem[REG_CGBA];
|
---|
| 108 |
|
---|
| 109 | uint16_t *cg0 = mem + ((cgba & 0x00f0) << 8);
|
---|
| 110 | uint16_t *cg1 = mem + ((cgba & 0x000f) << 12);
|
---|
| 111 |
|
---|
| 112 | int32_t line = fon_h - 1;
|
---|
| 113 |
|
---|
| 114 | for (int32_t y = 0; y < h; ++y) {
|
---|
| 115 | uint16_t *walk = vid;
|
---|
| 116 |
|
---|
| 117 | for (int32_t col2 = 0; col2 < w / 16; ++col2) {
|
---|
| 118 | uint16_t ch2 = *walk++;
|
---|
| 119 |
|
---|
| 120 | for (int32_t i = 0; i < 2; ++i) {
|
---|
| 121 | int32_t ch = (uint8_t)ch2;
|
---|
| 122 | int32_t at = *walk++;
|
---|
| 123 |
|
---|
| 124 | int32_t bg = at & 0x000f;
|
---|
| 125 | int32_t fg = (at & 0x00f0) >> 4;
|
---|
| 126 |
|
---|
| 127 | uint16_t *cg = (at & AT_CG) != 0 ? cg0 : cg1;
|
---|
| 128 | int32_t bits = cg[256 * line + ch];
|
---|
| 129 | int32_t mask = 0x01;
|
---|
| 130 |
|
---|
| 131 | for (int32_t k = 0; k < 8; ++k) {
|
---|
| 132 | *pix++ = (bits & mask) != 0 ? pal[fg] : pal[bg];
|
---|
| 133 | mask <<= 1;
|
---|
| 134 | }
|
---|
| 135 |
|
---|
| 136 | ch2 >>= 8;
|
---|
| 137 | }
|
---|
| 138 | }
|
---|
| 139 |
|
---|
| 140 | if (--line < 0) {
|
---|
| 141 | line = fon_h - 1;
|
---|
| 142 | vid = walk;
|
---|
| 143 | }
|
---|
| 144 |
|
---|
| 145 | pix += pitch / 4 - w;
|
---|
| 146 | }
|
---|
| 147 | }
|
---|
| 148 |
|
---|
[f285858] | 149 | void vid_sdl(void)
|
---|
| 150 | {
|
---|
| 151 | ver3("vid_sdl()");
|
---|
| 152 |
|
---|
| 153 | static int32_t last = 0;
|
---|
| 154 | int32_t now = SDL_AtomicGet(&frame);
|
---|
| 155 |
|
---|
| 156 | if (last == now) {
|
---|
| 157 | ver3("no update");
|
---|
| 158 | return;
|
---|
| 159 | }
|
---|
| 160 |
|
---|
| 161 | last = now;
|
---|
| 162 |
|
---|
| 163 | if (SDL_RenderFillRect(ren, NULL) < 0) {
|
---|
| 164 | fail("SDL_RenderFillRect() failed: %s", SDL_GetError());
|
---|
| 165 | }
|
---|
| 166 |
|
---|
| 167 | if (SDL_LockMutex(cpu_mutex) < 0) {
|
---|
| 168 | fail("SDL_LockMutex() failed: %s", SDL_GetError());
|
---|
| 169 | }
|
---|
| 170 |
|
---|
[b6f5f64] | 171 | for (int32_t i = 0; i < n_objs; ++i) {
|
---|
| 172 | obj_t *obj = objs + i;
|
---|
[f285858] | 173 |
|
---|
[b6f5f64] | 174 | pal[0] = obj->tran ? pal[0] & 0xffffff00 : pal[0] | 0x000000ff;
|
---|
[f285858] | 175 |
|
---|
| 176 | SDL_Rect src = {
|
---|
[b6f5f64] | 177 | .x = 0, .y = 0, .w = obj->w, .h = obj->h
|
---|
[f285858] | 178 | };
|
---|
| 179 |
|
---|
[b6f5f64] | 180 | void *buf;
|
---|
| 181 | int32_t pitch;
|
---|
| 182 |
|
---|
[f285858] | 183 | if (SDL_LockTexture(tex, &src, &buf, &pitch) < 0) {
|
---|
| 184 | fail("SDL_LockTexture() failed: %s", SDL_GetError());
|
---|
| 185 | }
|
---|
| 186 |
|
---|
[b6f5f64] | 187 | if (obj->fon_h < 0) {
|
---|
| 188 | rend_bm(obj->mem, obj->w, obj->h, buf, pitch);
|
---|
| 189 | }
|
---|
| 190 | else {
|
---|
| 191 | rend_tx(obj->mem, obj->w, obj->h, obj->fon_h, buf, pitch);
|
---|
[f285858] | 192 | }
|
---|
| 193 |
|
---|
| 194 | SDL_UnlockTexture(tex);
|
---|
| 195 |
|
---|
| 196 | SDL_Rect dst = {
|
---|
[b6f5f64] | 197 | .x = SCALE(obj->x), .y = SCALE(obj->y),
|
---|
| 198 | .w = SCALE(obj->w), .h = SCALE(obj->h)
|
---|
[f285858] | 199 | };
|
---|
| 200 |
|
---|
| 201 | ver2("vid rend %d %dx%d -> (%d, %d) (%d, %d) %dx%d",
|
---|
| 202 | i,
|
---|
[b6f5f64] | 203 | obj->w, obj->h,
|
---|
| 204 | obj->x, obj->y,
|
---|
| 205 | SCALE(obj->x), SCALE(obj->y),
|
---|
| 206 | SCALE(obj->w), SCALE(obj->h));
|
---|
[f285858] | 207 |
|
---|
| 208 | if (SDL_RenderCopy(ren, tex, &src, &dst) < 0) {
|
---|
| 209 | fail("SDL_RenderCopy() failed: %s", SDL_GetError());
|
---|
| 210 | }
|
---|
| 211 | }
|
---|
| 212 |
|
---|
| 213 | if (SDL_UnlockMutex(cpu_mutex) < 0) {
|
---|
| 214 | fail("SDL_UnlockMutex() failed: %s", SDL_GetError());
|
---|
| 215 | }
|
---|
| 216 |
|
---|
| 217 | SDL_RenderPresent(ren);
|
---|
| 218 | }
|
---|
[ac4e192] | 219 |
|
---|
[a06aa8b] | 220 | void vid_init(void)
|
---|
| 221 | {
|
---|
| 222 | ver("vid init");
|
---|
[f285858] | 223 |
|
---|
| 224 | win = SDL_CreateWindow("Display", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
---|
| 225 | WIN_W, WIN_H, 0);
|
---|
| 226 |
|
---|
| 227 | if (win == NULL) {
|
---|
| 228 | fail("SDL_CreateWindow() failed: %s", SDL_GetError());
|
---|
| 229 | }
|
---|
[4ed9bfe] | 230 |
|
---|
| 231 | vid_win = SDL_GetWindowID(win);
|
---|
| 232 |
|
---|
| 233 | if (vid_win == 0) {
|
---|
| 234 | fail("SDL_GetWindowID() failed: %s", SDL_GetError());
|
---|
| 235 | }
|
---|
[f285858] | 236 |
|
---|
| 237 | ren = SDL_CreateRenderer(win, -1, 0);
|
---|
| 238 |
|
---|
| 239 | if (ren == NULL) {
|
---|
| 240 | fail("SDL_CreateRenderer() failed: %s", SDL_GetError());
|
---|
| 241 | }
|
---|
| 242 |
|
---|
| 243 | if (SDL_SetRenderDrawColor(ren, 0x00, 0x00, 0x00, 0xff) < 0) {
|
---|
| 244 | fail("SDL_SetRenderDrawColor() failed: %s", SDL_GetError());
|
---|
| 245 | }
|
---|
| 246 |
|
---|
| 247 | tex = SDL_CreateTexture(ren, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING,
|
---|
| 248 | SCR_W, SCR_H);
|
---|
| 249 |
|
---|
| 250 | if (tex == NULL) {
|
---|
| 251 | fail("SDL_CreateTexture() failed: %s", SDL_GetError());
|
---|
| 252 | }
|
---|
| 253 |
|
---|
| 254 | if (SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND) < 0) {
|
---|
| 255 | fail("SDL_SetTextureBlendMode() failed: %s", SDL_GetError());
|
---|
| 256 | }
|
---|
| 257 |
|
---|
| 258 | SDL_AtomicSet(&frame, 1);
|
---|
[a06aa8b] | 259 | }
|
---|
| 260 |
|
---|
| 261 | void vid_quit(void)
|
---|
| 262 | {
|
---|
| 263 | ver("vid quit");
|
---|
[f285858] | 264 |
|
---|
| 265 | SDL_DestroyTexture(tex);
|
---|
| 266 | SDL_DestroyRenderer(ren);
|
---|
| 267 | SDL_DestroyWindow(win);
|
---|
[a06aa8b] | 268 | }
|
---|
| 269 |
|
---|
[3c30832] | 270 | bool vid_exec(void)
|
---|
[a06aa8b] | 271 | {
|
---|
[4c71d39] | 272 | ver3("vid exec");
|
---|
[ac4e192] | 273 |
|
---|
| 274 | static int32_t skip = 99999;
|
---|
| 275 | static int32_t line = 99999;
|
---|
| 276 |
|
---|
| 277 | if (++skip < 10) {
|
---|
| 278 | ver3("vid skip %d", skip);
|
---|
| 279 | return false;
|
---|
| 280 | }
|
---|
| 281 |
|
---|
| 282 | skip = 0;
|
---|
| 283 | int32_t vcr0 = mem[REG_VCR0];
|
---|
| 284 |
|
---|
| 285 | if ((vcr0 & VCR0_DEN) == 0) {
|
---|
| 286 | ver3("vid dis");
|
---|
| 287 | return false;
|
---|
| 288 | }
|
---|
| 289 |
|
---|
| 290 | if (++line < SCR_H + VBL_H) {
|
---|
| 291 | ver3("vid line %d", line);
|
---|
| 292 |
|
---|
| 293 | if (line < SCR_H) {
|
---|
| 294 | ++mem[REG_ATBAC];
|
---|
| 295 | }
|
---|
| 296 |
|
---|
| 297 | return line == SCR_H;
|
---|
| 298 | }
|
---|
| 299 |
|
---|
| 300 | // We get here every 4,000 invocations -> 25 fps.
|
---|
| 301 |
|
---|
| 302 | ver2("vid frame");
|
---|
| 303 | line = 0;
|
---|
| 304 |
|
---|
| 305 | int32_t dsba = mem[REG_DSBA];
|
---|
| 306 | bank = ((dsba & DSBA_BS0) != 0 ? 1 : 0) + ((dsba & DSBA_BS1) != 0 ? 2 : 0);
|
---|
| 307 |
|
---|
| 308 | int32_t rwba = mem[REG_RWBA];
|
---|
| 309 | reg_off = (rwba & 0xfff0) << 1;
|
---|
| 310 |
|
---|
| 311 | int32_t atba = mem[REG_ATBA];
|
---|
| 312 | mem[REG_ATBAC] = (uint16_t)atba;
|
---|
| 313 |
|
---|
| 314 | int32_t odtba = mem[REG_ODTBA] & 0xffc0;
|
---|
[f285858] | 315 |
|
---|
[b6f5f64] | 316 | n_objs = 0;
|
---|
[ac4e192] | 317 |
|
---|
| 318 | for (int32_t i = 0; i < 16; ++i) {
|
---|
[f285858] | 319 | int32_t flips[SCR_H];
|
---|
| 320 | int32_t n_flips = 0;
|
---|
[ac4e192] | 321 |
|
---|
| 322 | uint16_t *od = mem + odtba + 4 * i;
|
---|
| 323 |
|
---|
| 324 | if ((od[0] & OD0_BLA) != 0) {
|
---|
[f285858] | 325 | ver3("vid obj %d blanked", i);
|
---|
[ac4e192] | 326 | continue;
|
---|
| 327 | }
|
---|
| 328 |
|
---|
[4f967e8] | 329 | int32_t w64 = (od[1] & 0xfc00) >> 10;
|
---|
[ac4e192] | 330 |
|
---|
[4f967e8] | 331 | if (w64 == 0) {
|
---|
[f285858] | 332 | ver3("vid obj %d empty", i);
|
---|
[ac4e192] | 333 | continue;
|
---|
| 334 | }
|
---|
| 335 |
|
---|
| 336 | int32_t mask = 1 << i;
|
---|
| 337 |
|
---|
| 338 | for (int32_t k = 0; k < SCR_H; ++k) {
|
---|
| 339 | if ((mem[atba + k] & mask) == 0) {
|
---|
[f285858] | 340 | flips[n_flips] = k;
|
---|
| 341 | ++n_flips;
|
---|
[ac4e192] | 342 | }
|
---|
| 343 | }
|
---|
| 344 |
|
---|
[f285858] | 345 | if (n_flips == 0) {
|
---|
| 346 | ver3("vid obj %d unused", i);
|
---|
[ac4e192] | 347 | continue;
|
---|
| 348 | }
|
---|
| 349 |
|
---|
[f285858] | 350 | if (n_flips == 1) {
|
---|
| 351 | flips[n_flips] = SCR_H;
|
---|
| 352 | ++n_flips;
|
---|
| 353 | }
|
---|
| 354 |
|
---|
| 355 | bool cb = (od[0] & OD0_CB) != 0;
|
---|
| 356 | bool tde = (od[0] & OD0_TDE) != 0;
|
---|
| 357 |
|
---|
| 358 | int32_t x = (od[1] & 0x03ff) * 2;
|
---|
[4f967e8] | 359 | int32_t off, fon_h, w;
|
---|
[f285858] | 360 |
|
---|
[b6f5f64] | 361 | if (cb) {
|
---|
[4f967e8] | 362 | off = od[2];
|
---|
[b6f5f64] | 363 | int32_t vcr1 = mem[REG_VCR1];
|
---|
[4f967e8] | 364 | fon_h = (vcr1 & 0xf000) >> 12;
|
---|
| 365 | w = w64 * 4 / 3 * 2 * 8;
|
---|
[f285858] | 366 | }
|
---|
| 367 | else {
|
---|
[4f967e8] | 368 | off = ((od[0] & 0x00c0) << 10) | od[2];
|
---|
| 369 | fon_h = -1;
|
---|
| 370 | w = w64 * 16;
|
---|
[f285858] | 371 | }
|
---|
[b6f5f64] | 372 |
|
---|
[4f967e8] | 373 | obj_t *obj = objs + n_objs;
|
---|
| 374 |
|
---|
[b6f5f64] | 375 | obj->x = x;
|
---|
| 376 | obj->y = flips[0];
|
---|
| 377 | obj->w = w;
|
---|
| 378 | obj->h = flips[1] - flips[0];
|
---|
| 379 | obj->mem = mem + off;
|
---|
| 380 | obj->tran = tde;
|
---|
[4f967e8] | 381 | obj->fon_h = fon_h;
|
---|
[b6f5f64] | 382 |
|
---|
| 383 | ver2("vid obj %d %c %c %d:%d %d+%d 0x%05x",
|
---|
| 384 | i, cb ? 'c' : 'b', tde ? 't' : '-', flips[0], flips[1], x, w, off);
|
---|
| 385 |
|
---|
| 386 | ++n_objs;
|
---|
[ac4e192] | 387 | }
|
---|
| 388 |
|
---|
[f285858] | 389 | SDL_AtomicAdd(&frame, 1);
|
---|
[3c30832] | 390 | return false;
|
---|
[a06aa8b] | 391 | }
|
---|
| 392 |
|
---|
| 393 | uint32_t vid_read(uint32_t off, int32_t sz)
|
---|
| 394 | {
|
---|
[ac4e192] | 395 | ver2("vid rd %d 0x%05x:%d", bank, off, sz * 8);
|
---|
| 396 |
|
---|
| 397 | int32_t off16 = (int32_t)(off / 2);
|
---|
| 398 |
|
---|
| 399 | if (sz != 2 || bank >= N_BANKS || off % 2 != 0 || off16 >= WIN_SZ_W) {
|
---|
| 400 | fail("invalid vid rd %d %u:%d", bank, off, sz * 8);
|
---|
| 401 | }
|
---|
| 402 |
|
---|
| 403 | if (off16 >= reg_off && off16 < reg_off + 16) {
|
---|
[a9861f3] | 404 | return mem[off16 - reg_off];
|
---|
[f285858] | 405 | }
|
---|
| 406 |
|
---|
[a9861f3] | 407 | return mem[bank * WIN_SZ_W + off16];
|
---|
[a06aa8b] | 408 | }
|
---|
| 409 |
|
---|
| 410 | void vid_write(uint32_t off, int32_t sz, uint32_t val)
|
---|
| 411 | {
|
---|
[ac4e192] | 412 | ver2("vid wr %d 0x%05x:%d 0x%0*x", bank, off, sz * 8, sz * 2, val);
|
---|
| 413 |
|
---|
| 414 | int32_t off16 = (int32_t)(off / 2);
|
---|
| 415 |
|
---|
| 416 | if (sz != 2 || bank >= N_BANKS || off % 2 != 0 || (off16 >= WIN_SZ_W && off16 != PAL_OFF)) {
|
---|
| 417 | fail("invalid vid wr %d %u:%d", bank, off, sz * 8);
|
---|
| 418 | }
|
---|
| 419 |
|
---|
[f285858] | 420 | if (off16 == PAL_OFF) {
|
---|
| 421 | int32_t i_pal = ((int32_t)val & 0x03c0) >> 6;
|
---|
| 422 |
|
---|
| 423 | uint32_t r = ((val & 0x0004) >> 1) | ((val & 0x0020) >> 5);
|
---|
| 424 | uint32_t g = ((val & 0x0002) >> 0) | ((val & 0x0010) >> 4);
|
---|
| 425 | uint32_t b = ((val & 0x0001) << 1) | ((val & 0x0008) >> 3);
|
---|
| 426 |
|
---|
| 427 | r = (r ^ 3) * 85;
|
---|
| 428 | g = (g ^ 3) * 85;
|
---|
| 429 | b = (b ^ 3) * 85;
|
---|
| 430 |
|
---|
| 431 | pal[i_pal] = (r << 24) | (g << 16) | (b << 8) | 0xff;
|
---|
[a9861f3] | 432 | return;
|
---|
[f285858] | 433 | }
|
---|
[a9861f3] | 434 |
|
---|
| 435 | if (off16 >= reg_off && off16 < reg_off + 16) {
|
---|
[ac4e192] | 436 | mem[off16 - reg_off] = (uint16_t)val;
|
---|
[a9861f3] | 437 | return;
|
---|
[ac4e192] | 438 | }
|
---|
| 439 |
|
---|
[a9861f3] | 440 | mem[bank * WIN_SZ_W + off16] = (uint16_t)val;
|
---|
[a06aa8b] | 441 | }
|
---|