comparison tools/lib64fmts.c @ 2173:a5c4eb5c7309

Add read support for unknown PETSCII PRG export format (could be earlier version from Marq's editor or such.)
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Jun 2019 21:14:49 +0300
parents de88333acc44
children 5b22533cb07d
comparison
equal deleted inserted replaced
2172:de88333acc44 2173:a5c4eb5c7309
178 // in the PRG and there is no direct indication whether it is 178 // in the PRG and there is no direct indication whether it is
179 // a customized one or copy of C64 ROM charset .. we could 179 // a customized one or copy of C64 ROM charset .. we could
180 // implement a hash-based detection at some point. 180 // implement a hash-based detection at some point.
181 img->extraInfo[D64_EI_CHAR_CASE] = 0; 181 img->extraInfo[D64_EI_CHAR_CASE] = 0;
182 img->extraInfo[D64_EI_CHAR_CUSTOM] = 1; 182 img->extraInfo[D64_EI_CHAR_CUSTOM] = 1;
183
184 return DMERR_OK;
185 }
186
187
188 static int fmtSetSPETSCIIData(const DMC64EncDecOp *op, DMC64Image *img,
189 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt)
190 {
191 (void) op;
192 (void) buf;
193 (void) fmt;
194
195 img->extraInfo[D64_EI_CHAR_MODE] = D64_FMT_HIRES;
196 img->extraInfo[D64_EI_CHAR_CUSTOM] = 0;
183 197
184 return DMERR_OK; 198 return DMERR_OK;
185 } 199 }
186 200
187 201
2395 }, 2409 },
2396 NULL 2410 NULL
2397 }, 2411 },
2398 2412
2399 { 2413 {
2414 "upet", "Unknown PETSCII (unpacked)", 0x0801, 2499, DM_FMT_RD,
2415 NULL,
2416 NULL, NULL,
2417 {
2418 D64_FMT_HIRES | D64_FMT_CHAR,
2419 D64_SCR_WIDTH , D64_SCR_HEIGHT,
2420 D64_SCR_CH_WIDTH, D64_SCR_CH_HEIGHT,
2421 1, 1,
2422 NULL, NULL,
2423 NULL,
2424 {
2425 { DO_COPY , DS_SCREEN_RAM , 0x01ab, 0, 0, 0, NULL, NULL },
2426 { DO_COPY , DS_COLOR_RAM , 0x01ab + 1000, 0, 0, 0, NULL, NULL },
2427
2428 // For offset values see petscii/m_c64.pde :: save_prg()
2429 { DO_SET_MEM_LO , DS_D020 , 0x01a7, 0, 0, 0, NULL, NULL },
2430 { DO_SET_MEM_LO , DS_BGCOL , 0x01a8, 0, 0, 0, NULL, NULL },
2431 { DO_FUNC , 0 , 0 , 0, 0, 0, fmtSetSPETSCIIData, NULL },
2432
2433 { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL },
2434 }
2435 },
2436 NULL
2437 },
2438
2439 {
2400 "pkhu", "petscii.krissz.hu editor (unpacked)", 0x0801, 0, DM_FMT_RD, 2440 "pkhu", "petscii.krissz.hu editor (unpacked)", 0x0801, 0, DM_FMT_RD,
2401 fmtProbePetsciiKrisszHu, 2441 fmtProbePetsciiKrisszHu,
2402 NULL, NULL, 2442 NULL, NULL,
2403 { 2443 {
2404 D64_FMT_CHAR, 2444 D64_FMT_CHAR,