Added several small upstream patches for CPU module.
Added the D2D rendering module from 86Box, and updated it. Fixed the Slovenian translation. Added Norwegian (Bokmal) translation. Several small fixes here and there.
This commit is contained in:
@@ -8,36 +8,13 @@
|
|||||||
*
|
*
|
||||||
* Define all known processor types.
|
* Define all known processor types.
|
||||||
*
|
*
|
||||||
* Available cpuspeeds:
|
* Version: @(#)cpu_table.c 1.0.3 2018/07/28
|
||||||
*
|
|
||||||
* 0 = 16 MHz
|
|
||||||
* 1 = 20 MHz
|
|
||||||
* 2 = 25 MHz
|
|
||||||
* 3 = 33 MHz
|
|
||||||
* 4 = 40 MHz
|
|
||||||
* 5 = 50 MHz
|
|
||||||
* 6 = 66 MHz
|
|
||||||
* 7 = 75 MHz
|
|
||||||
* 8 = 80 MHz
|
|
||||||
* 9 = 90 MHz
|
|
||||||
* 10 = 100 MHz
|
|
||||||
* 11 = 120 MHz
|
|
||||||
* 12 = 133 MHz
|
|
||||||
* 13 = 150 MHz
|
|
||||||
* 14 = 160 MHz
|
|
||||||
* 15 = 166 MHz
|
|
||||||
* 16 = 180 MHz
|
|
||||||
* 17 = 200 MHz
|
|
||||||
*
|
|
||||||
* Version: @(#)cpu_table.c 1.0.2 2018/05/06
|
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
|
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||||
* leilei,
|
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
*
|
*
|
||||||
* Copyright 2008-2018 Sarah Walker.
|
* Copyright 2008-2018 Sarah Walker.
|
||||||
* Copyright 2016-2018 leilei.
|
|
||||||
* Copyright 2016-2018 Miran Grca.
|
* Copyright 2016-2018 Miran Grca.
|
||||||
* Copyright 2017,2018 Fred N. van Kempen.
|
* Copyright 2017,2018 Fred N. van Kempen.
|
||||||
*
|
*
|
||||||
@@ -231,14 +208,25 @@ CPU cpus_i486[] = {
|
|||||||
{"i486SX/20", CPU_i486SX, 1, 20000000, 1, 20000000, 0x42a, 0, 0, CPU_SUPPORTS_DYNAREC, 4,4,3,3, 3},
|
{"i486SX/20", CPU_i486SX, 1, 20000000, 1, 20000000, 0x42a, 0, 0, CPU_SUPPORTS_DYNAREC, 4,4,3,3, 3},
|
||||||
{"i486SX/25", CPU_i486SX, 2, 25000000, 1, 25000000, 0x42a, 0, 0, CPU_SUPPORTS_DYNAREC, 4,4,3,3, 3},
|
{"i486SX/25", CPU_i486SX, 2, 25000000, 1, 25000000, 0x42a, 0, 0, CPU_SUPPORTS_DYNAREC, 4,4,3,3, 3},
|
||||||
{"i486SX/33", CPU_i486SX, 3, 33333333, 1, 33333333, 0x42a, 0, 0, CPU_SUPPORTS_DYNAREC, 6,6,3,3, 4},
|
{"i486SX/33", CPU_i486SX, 3, 33333333, 1, 33333333, 0x42a, 0, 0, CPU_SUPPORTS_DYNAREC, 6,6,3,3, 4},
|
||||||
|
#if 0
|
||||||
{"i486SX2/50", CPU_i486SX, 5, 50000000, 2, 25000000, 0x45b, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
{"i486SX2/50", CPU_i486SX, 5, 50000000, 2, 25000000, 0x45b, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
||||||
{"i486SX2/66 (Q0569)", CPU_i486SX, 6, 66666666, 2, 33333333, 0x45b, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 8},
|
{"i486SX2/66 (Q0569)", CPU_i486SX, 6, 66666666, 2, 33333333, 0x45b, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 8},
|
||||||
|
#else
|
||||||
|
{"i486SX2/50", CPU_i486SX, 5, 50000000, 2, 25000000, 0x45b, 0x45b, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
||||||
|
{"i486SX2/66 (Q0569)", CPU_i486SX, 6, 66666666, 2, 33333333, 0x45b, 0x45b, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 8},
|
||||||
|
#endif
|
||||||
{"i486DX/25", CPU_i486DX, 2, 25000000, 1, 25000000, 0x404, 0, 0, CPU_SUPPORTS_DYNAREC, 4,4,3,3, 3},
|
{"i486DX/25", CPU_i486DX, 2, 25000000, 1, 25000000, 0x404, 0, 0, CPU_SUPPORTS_DYNAREC, 4,4,3,3, 3},
|
||||||
{"i486DX/33", CPU_i486DX, 3, 33333333, 1, 33333333, 0x404, 0, 0, CPU_SUPPORTS_DYNAREC, 6,6,3,3, 4},
|
{"i486DX/33", CPU_i486DX, 3, 33333333, 1, 33333333, 0x404, 0, 0, CPU_SUPPORTS_DYNAREC, 6,6,3,3, 4},
|
||||||
{"i486DX/50", CPU_i486DX, 5, 50000000, 1, 25000000, 0x404, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,4,4, 6},
|
{"i486DX/50", CPU_i486DX, 5, 50000000, 1, 25000000, 0x404, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,4,4, 6},
|
||||||
|
#if 0
|
||||||
{"i486DX2/40", CPU_i486DX, 4, 40000000, 2, 20000000, 0x430, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
{"i486DX2/40", CPU_i486DX, 4, 40000000, 2, 20000000, 0x430, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
||||||
{"i486DX2/50", CPU_i486DX, 5, 50000000, 2, 25000000, 0x430, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
{"i486DX2/50", CPU_i486DX, 5, 50000000, 2, 25000000, 0x430, 0, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
||||||
{"i486DX2/66", CPU_i486DX, 6, 66666666, 2, 33333333, 0x430, 0, 0, CPU_SUPPORTS_DYNAREC, 12,12,6,6, 8},
|
{"i486DX2/66", CPU_i486DX, 6, 66666666, 2, 33333333, 0x430, 0, 0, CPU_SUPPORTS_DYNAREC, 12,12,6,6, 8},
|
||||||
|
#else
|
||||||
|
{"i486DX2/40", CPU_i486DX, 4, 40000000, 2, 20000000, 0x430, 0x430, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
||||||
|
{"i486DX2/50", CPU_i486DX, 5, 50000000, 2, 25000000, 0x430, 0x430, 0, CPU_SUPPORTS_DYNAREC, 8,8,6,6, 6},
|
||||||
|
{"i486DX2/66", CPU_i486DX, 6, 66666666, 2, 33333333, 0x430, 0x430, 0, CPU_SUPPORTS_DYNAREC, 12,12,6,6, 8},
|
||||||
|
#endif
|
||||||
{"iDX4/75", CPU_iDX4, 7, 75000000, 3, 25000000, 0x481, 0x481, 0, CPU_SUPPORTS_DYNAREC, 12,12,9,9, 9}, /*CPUID available on DX4, >= 75 MHz*/
|
{"iDX4/75", CPU_iDX4, 7, 75000000, 3, 25000000, 0x481, 0x481, 0, CPU_SUPPORTS_DYNAREC, 12,12,9,9, 9}, /*CPUID available on DX4, >= 75 MHz*/
|
||||||
{"iDX4/100", CPU_iDX4, 10, 100000000, 3, 33333333, 0x481, 0x481, 0, CPU_SUPPORTS_DYNAREC, 18,18,9,9, 12}, /*Is on some real Intel DX2s, limit here is pretty arbitary*/
|
{"iDX4/100", CPU_iDX4, 10, 100000000, 3, 33333333, 0x481, 0x481, 0, CPU_SUPPORTS_DYNAREC, 18,18,9,9, 12}, /*Is on some real Intel DX2s, limit here is pretty arbitary*/
|
||||||
{"Pentium OverDrive/63", CPU_PENTIUM, 6, 62500000, 3, 25000000, 0x1531, 0x1531, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 10,10,7,7, 15/2},
|
{"Pentium OverDrive/63", CPU_PENTIUM, 6, 62500000, 3, 25000000, 0x1531, 0x1531, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 10,10,7,7, 15/2},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Miscellaneous x86 CPU Instructions.
|
* Miscellaneous x86 CPU Instructions.
|
||||||
*
|
*
|
||||||
* Version: @(#)x86_ops_mov.h 1.0.2 2018/05/09
|
* Version: @(#)x86_ops_mov.h 1.0.3 2018/07/28
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
|
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -232,6 +232,7 @@ static int opMOV_b_imm_a32(uint32_t fetchdat)
|
|||||||
fetch_ea_32(fetchdat);
|
fetch_ea_32(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getbyte(); if (cpu_state.abrt) return 1;
|
temp = getbyte(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr);
|
||||||
seteab(temp);
|
seteab(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 3, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
PREFETCH_RUN(timing_rr, 3, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
||||||
@@ -244,6 +245,7 @@ static int opMOV_w_imm_a16(uint32_t fetchdat)
|
|||||||
fetch_ea_16(fetchdat);
|
fetch_ea_16(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getword(); if (cpu_state.abrt) return 1;
|
temp = getword(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 1);
|
||||||
seteaw(temp);
|
seteaw(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 0);
|
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 0);
|
||||||
@@ -255,6 +257,7 @@ static int opMOV_w_imm_a32(uint32_t fetchdat)
|
|||||||
fetch_ea_32(fetchdat);
|
fetch_ea_32(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getword(); if (cpu_state.abrt) return 1;
|
temp = getword(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 1);
|
||||||
seteaw(temp);
|
seteaw(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
||||||
@@ -266,6 +269,7 @@ static int opMOV_l_imm_a16(uint32_t fetchdat)
|
|||||||
fetch_ea_16(fetchdat);
|
fetch_ea_16(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getlong(); if (cpu_state.abrt) return 1;
|
temp = getlong(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 3);
|
||||||
seteal(temp);
|
seteal(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 0);
|
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 0);
|
||||||
@@ -277,6 +281,7 @@ static int opMOV_l_imm_a32(uint32_t fetchdat)
|
|||||||
fetch_ea_32(fetchdat);
|
fetch_ea_32(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getlong(); if (cpu_state.abrt) return 1;
|
temp = getlong(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 3);
|
||||||
seteal(temp);
|
seteal(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 1);
|
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 1);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Example implementation of a PCI device.
|
* Example implementation of a PCI device.
|
||||||
*
|
*
|
||||||
* Version: @(#)pci_dummy.c 1.0.3 2018/05/06
|
* Version: @(#)pci_dummy.c 1.0.4 2018/07/26
|
||||||
*
|
*
|
||||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||||
*
|
*
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include "../../emu.h
|
#include "../../emu.h"
|
||||||
#include "../../io.h"
|
#include "../../io.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "pci_dummy.h"
|
#include "pci_dummy.h"
|
||||||
|
|||||||
4
src/pc.c
4
src/pc.c
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Main emulator module where most things are controlled.
|
* Main emulator module where most things are controlled.
|
||||||
*
|
*
|
||||||
* Version: @(#)pc.c 1.0.48 2018/06/26
|
* Version: @(#)pc.c 1.0.49 2018/07/28
|
||||||
*
|
*
|
||||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -301,7 +301,7 @@ pclog_dump(int num)
|
|||||||
while (i < num) {
|
while (i < num) {
|
||||||
if (sp == NULL) {
|
if (sp == NULL) {
|
||||||
sp = buff;
|
sp = buff;
|
||||||
sprintf(sp, "%08lx:", cpu_state.pc + i);
|
sprintf(sp, "%08lx:", (unsigned long)cpu_state.pc + i);
|
||||||
sp += strlen(sp);
|
sp += strlen(sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
85
src/ui/lang/Extra-NO.txt
Normal file
85
src/ui/lang/Extra-NO.txt
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
**** Additional strings for the Installer itself ****
|
||||||
|
**** (keep the > lines, add translation after : ****
|
||||||
|
|
||||||
|
|
||||||
|
> Select the setup language:
|
||||||
|
: Velg installasjonsspr<70>k:
|
||||||
|
|
||||||
|
> Desktop (as in "Desktop icons")
|
||||||
|
: Skrivebord
|
||||||
|
|
||||||
|
|
||||||
|
> Executing file removal operations
|
||||||
|
: Sletter filer
|
||||||
|
|
||||||
|
> Preparing files for removal
|
||||||
|
: Forbereder sletting av filer
|
||||||
|
|
||||||
|
> Restoring removed files
|
||||||
|
: Gjenoppretter slettede filer
|
||||||
|
|
||||||
|
> Extracting files from archive
|
||||||
|
: Pakker ut filer fra arkiv
|
||||||
|
|
||||||
|
> Executing file removal
|
||||||
|
: Sletter filer
|
||||||
|
|
||||||
|
> Preparing file
|
||||||
|
: Forbereder fil
|
||||||
|
|
||||||
|
> Restoring file
|
||||||
|
: Gjenoppretter fil
|
||||||
|
|
||||||
|
> This package can only be run from a bootstrapper.
|
||||||
|
: Denne pakken kan kun kj<6B>res fra en boostrapper.
|
||||||
|
|
||||||
|
|
||||||
|
> Several commandline tools
|
||||||
|
: Flere kommandolinjeverkt<6B>y
|
||||||
|
|
||||||
|
> A set of example configurations to get you started.
|
||||||
|
: Et sett med eksempelkonfigurasjoner <20> starte med
|
||||||
|
|
||||||
|
> Generic Turbo-XT Clone.
|
||||||
|
: Generisk Turbo-XT-klone.
|
||||||
|
|
||||||
|
> The original IBM-PC model.
|
||||||
|
: Den originale IBM-PC-modellen.
|
||||||
|
|
||||||
|
> The new model of the IBM-PC
|
||||||
|
: Den nye modellen av IBM-PC.
|
||||||
|
|
||||||
|
> Segoe UI Fonts for Windows XP
|
||||||
|
: Segoe typesnitt for brukergrensesnitt i Windows XP
|
||||||
|
|
||||||
|
|
||||||
|
> Additional Languages support files.
|
||||||
|
: Ytterligere filer for spr<70>kst<73>tte.
|
||||||
|
|
||||||
|
> Your virtual machines.
|
||||||
|
: Dine virtuelle maskiner.
|
||||||
|
|
||||||
|
> Runtime files for the FluidSynth MIDI synthesizer
|
||||||
|
: Kj<4B>retidsbiblioteker for FluidSynths MIDI-synthesizer
|
||||||
|
|
||||||
|
> Various runtime files needed by the application.
|
||||||
|
: Diverse kj<6B>retidsfiler brukt av applikasjonen.
|
||||||
|
|
||||||
|
> ROM BIOS image files of emulated machines and devices.
|
||||||
|
: ROM BIOS-avtrykksfiler for emulerte maskiner og enheter.
|
||||||
|
|
||||||
|
> Runtime files needed for the SDL2 renderer.
|
||||||
|
: Kj<4B>retidsfiler brukt av SDL2-rendereren.
|
||||||
|
|
||||||
|
> The VARCem Application
|
||||||
|
: VARCem-applikasjonen
|
||||||
|
|
||||||
|
> License Agreement
|
||||||
|
: Lisensavtale
|
||||||
|
|
||||||
|
> Installer for the [ProductName] application.
|
||||||
|
: Installer for [ProductName]-applikasjonen.
|
||||||
|
|
||||||
|
> The VARCem Team
|
||||||
|
: VARCem-teamet
|
||||||
|
|
||||||
403
src/ui/lang/VARCem-NO.str
Normal file
403
src/ui/lang/VARCem-NO.str
Normal file
@@ -0,0 +1,403 @@
|
|||||||
|
/*
|
||||||
|
* VARCem Virtual ARchaeological Computer EMulator.
|
||||||
|
* An emulator of (mostly) x86-based PC systems and devices,
|
||||||
|
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||||
|
* spanning the era between 1981 and 1995.
|
||||||
|
*
|
||||||
|
* This file is part of the VARCem Project.
|
||||||
|
*
|
||||||
|
* String definitions for "English (United States) language.
|
||||||
|
*
|
||||||
|
* TRANSLATION: The application uses English as its primary language, and
|
||||||
|
* this file is the "Master" for all translations. Please use
|
||||||
|
* it as the line-by-line base for the translated version, and
|
||||||
|
* update fields as needed.
|
||||||
|
*
|
||||||
|
* Version: @(#)VARCem-EN.str 1.0.1 2018/07/11
|
||||||
|
*
|
||||||
|
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
|
* Tore Sinding Bekkedal, <toresbe@gmail.com<
|
||||||
|
*
|
||||||
|
* Copyright 2017,2018 Fred N. van Kempen.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with
|
||||||
|
* or without modification, are permitted provided that the
|
||||||
|
* following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the entire
|
||||||
|
* above notice, this list of conditions and the following
|
||||||
|
* disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above
|
||||||
|
* copyright notice, this list of conditions and the
|
||||||
|
* following disclaimer in the documentation and/or other
|
||||||
|
* materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* 3. Neither the name of the copyright holder nor the names
|
||||||
|
* of its contributors may be used to endorse or promote
|
||||||
|
* products derived from this software without specific
|
||||||
|
* prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Do not translate! */
|
||||||
|
#define TAG_VERSION 1,0,1
|
||||||
|
#define TAG_AUTHOR "Tore Sinding Bekkedal"
|
||||||
|
#define TAG_EMAIL "toresbe@gmail.com"
|
||||||
|
|
||||||
|
/* Messagebox classes (2100.) */
|
||||||
|
#define STR_2100 "Feil"
|
||||||
|
#define STR_2101 "Kritisk feil"
|
||||||
|
#define STR_2102 "Konfigurasjonsfeil"
|
||||||
|
#define STR_2103 "Advarsel"
|
||||||
|
|
||||||
|
|
||||||
|
/* System errors (2200.) */
|
||||||
|
#define STR_2200 "Kunne ikke laste inn hurtigtaster!"
|
||||||
|
#define STR_2201 "Tilgang til rå tastaturdata mislyktes!"
|
||||||
|
#define STR_2202 "PCap kunne ikke tas i bruk, kanskje det ikke kjører?"
|
||||||
|
#define STR_2203 "Ingen PCap-enheter funnet"
|
||||||
|
#define STR_2204 "Ugyldig PCap-enhet"
|
||||||
|
#define STR_2205 "Kunne ikke ta i bruk OpenAL, bekreft at du har følgende bibliotek\ni din programkatalog:\n\nlibopenal-1.dll"
|
||||||
|
#define STR_2206 "Kunne ikke ta i bruk FluidSynth, bekreft at du har følgende bibliotek\ni din programkatalog:\n\nlibfluidsynth.dll"
|
||||||
|
|
||||||
|
|
||||||
|
/* Application error messages (2300.) */
|
||||||
|
#define STR_2300 "Kunne ikke generere diskavtrykkfil: %s"
|
||||||
|
#define STR_2301 "Ingen brukbare ROM-avtrykk funnet!"
|
||||||
|
#define STR_2302 "Ingen gyldig konfigurasjon funnet.\n\nVil du opprette en ved å se dialogvinduet for innstillinger?"
|
||||||
|
#define STR_2303 "Den konfigurerte maskinen:\n\n %ls\n\ner ikke tilgjengelig.\n\nVil du se dialogvinduet for innstillinger?"
|
||||||
|
#define STR_2304 "Det konfigurerte skjermkortet:\n\n %ls\n\ner ikke tilgjengelig.\n\nVil du se dialogvinduet for innstillinger?"
|
||||||
|
#define STR_2305 "Valgte rendermotor '%S' ikke tilgjengelig. Tilbakestille til forvalgt?"
|
||||||
|
#define STR_2306 "Hverken ST506 eller ESDI CD-ROM-enheter har noensinne eksistert"
|
||||||
|
#define STR_2307 "USB er ikke støttet enda."
|
||||||
|
|
||||||
|
|
||||||
|
/* Application messages (2400.) */
|
||||||
|
#define STR_2400 "Er du sikker på at du vil lagre disse innstillingene?\n\n(En omstart kan kreves for at de skal tre i kraft...)"
|
||||||
|
#define STR_2401 "Endringer lagret; omstart emulatoren."
|
||||||
|
#define STR_2402 "Den forespurte enheten '%ls' er for tiden merket `under utvikling` og kan lage trøbbel.\n\nEr du sikker på at du vil skru den på?"
|
||||||
|
#define STR_2403 "Trykk for å fange musen"
|
||||||
|
#define STR_2404 "Trykk F8+F12 for å frigjøre musen"
|
||||||
|
#define STR_2405 "Trykk F8+F12 eller midtre museknapp for å frigjøre musen"
|
||||||
|
#define STR_2406 "Trykk Kontroll+Alt+Side Ned for å returnere til vindumodus"
|
||||||
|
|
||||||
|
|
||||||
|
/* Misc application strings (2500.) */
|
||||||
|
#define STR_2500 "Konfigurasjonsfiler\0*.varc\0Alle filer\0*.*\0"
|
||||||
|
|
||||||
|
|
||||||
|
/* UI: common elements (3000.) */
|
||||||
|
#define STR_OK "OK"
|
||||||
|
#define STR_CANCEL "Avbryt"
|
||||||
|
#define STR_CONFIGURE "Konfigurer"
|
||||||
|
#define STR_BROWSE "Bla igjennom"
|
||||||
|
|
||||||
|
/* UI: dialog shared strings (3100.) */
|
||||||
|
#define STR_NONE "Ingen"
|
||||||
|
#define STR_DISABLED "Deaktivert"
|
||||||
|
#define STR_ENABLED "Aktivert"
|
||||||
|
#define STR_OFF "Av"
|
||||||
|
#define STR_ON "På"
|
||||||
|
#define STR_TYPE "Type"
|
||||||
|
#define STR_FILENAME "Filnavn:"
|
||||||
|
#define STR_PROGRESS "Framdrift:"
|
||||||
|
#define STR_BUS "Buss:"
|
||||||
|
#define STR_CHANNEL "Kanal:"
|
||||||
|
#define STR_ID "ID:"
|
||||||
|
#define STR_LUN "LUN:"
|
||||||
|
#define STR_INV_NAME "Vennligst oppgi et gyldig filnavn"
|
||||||
|
#define STR_IMG_EXIST "Dette filnavnet eksisterer allerede og vil bli overskrevet.\nEr du sikker på at du vil bruke det filnavnet?"
|
||||||
|
#define STR_OPEN_READ "Kunne ikke åpne fil for lesning"
|
||||||
|
#define STR_OPEN_WRITE "Kunne ikke åpne fil for skrivning"
|
||||||
|
#define STR_DEVCONF_1 "Konfigurasjon"
|
||||||
|
#define STR_DEVCONF_2 "Enhet:"
|
||||||
|
|
||||||
|
|
||||||
|
/* UI: dialog: About (3200.) */
|
||||||
|
#define STR_ABOUT "Om VARCem..."
|
||||||
|
#define STR_3201 "Forfattere:"
|
||||||
|
#define STR_3202 "Fred N. van Kempen, Miran Grca, Sarah Walker m. fl.\nBasert på tidligere arbeider som 86Box, PCem, MAME, DOSbox og Qemu."
|
||||||
|
#define STR_3203 "Offentliggjort under BSDs treklausulers lisens, og GNUs General Public License (versjon 2 eller høyere) for eksisterende kode importert fra andre prosjekter."
|
||||||
|
#define STR_3204 "Se LICENSE.txt for mer informasjon."
|
||||||
|
|
||||||
|
/* UI: dialog: Localization (3210.) */
|
||||||
|
#define STR_LOCALIZE "Lokalisering"
|
||||||
|
#define STR_3211 "Oversettelser fra engelsk til mindreverdige språk bidratt av disse ekte heltefigurene:"
|
||||||
|
|
||||||
|
/* UI dialog: Status (3225.) */
|
||||||
|
#define STR_STATUS "Status"
|
||||||
|
|
||||||
|
/* UI dialog: Sound Gain (3250.) */
|
||||||
|
#define STR_SNDGAIN "Lydgain"
|
||||||
|
#define STR_3251 "Gain"
|
||||||
|
|
||||||
|
/* UI dialog: New Image (3275.) */
|
||||||
|
#define STR_NEWIMG "Nytt diskettavtrykk"
|
||||||
|
#define STR_3276 "Diskstørrelse:"
|
||||||
|
#define STR_3277 "Omdreiningsmodus:"
|
||||||
|
#define STR_3278 "Perfekt RPM"
|
||||||
|
#define STR_3279 "1% under perfekt RPM"
|
||||||
|
#define STR_3280 "1.5% under perfekt RPM"
|
||||||
|
#define STR_3281 "2% under perfekt RPM"
|
||||||
|
#define STR_3282 "160 KB"
|
||||||
|
#define STR_3283 "180 KB"
|
||||||
|
#define STR_3284 "320 KB"
|
||||||
|
#define STR_3285 "360 KB"
|
||||||
|
#define STR_3286 "640 KB"
|
||||||
|
#define STR_3287 "720 KB"
|
||||||
|
#define STR_3288 "1.2 MB"
|
||||||
|
#define STR_3289 "1.25 MB"
|
||||||
|
#define STR_3290 "1.44 MB"
|
||||||
|
#define STR_3291 "DMF (cluster 1024)"
|
||||||
|
#define STR_3292 "DMF (cluster 2048)"
|
||||||
|
#define STR_3293 "2.88 MB"
|
||||||
|
#define STR_3294 "ZIP 100"
|
||||||
|
#define STR_3295 "ZIP 250"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (3300.) */
|
||||||
|
#define STR_SETTINGS "Innstillinger"
|
||||||
|
#define STR_3310 "Maskin"
|
||||||
|
#define STR_3311 "Skjerm"
|
||||||
|
#define STR_3312 "Innenheter"
|
||||||
|
#define STR_3313 "Lyd"
|
||||||
|
#define STR_3314 "Nettverk"
|
||||||
|
#define STR_3315 "Porter (COM & LPT)"
|
||||||
|
#define STR_3316 "Andre periferalenheter"
|
||||||
|
#define STR_3317 "Harddisker"
|
||||||
|
#define STR_3318 "Diskettstasjoner"
|
||||||
|
#define STR_3319 "Andre flyttbare enheter"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Machine, 3325.) */
|
||||||
|
#define STR_3325 "Maskin:"
|
||||||
|
#define STR_3326 "CPU-type:"
|
||||||
|
#define STR_3327 "CPU:"
|
||||||
|
#define STR_3328 "Wait states:"
|
||||||
|
#define STR_3329 "Minne:"
|
||||||
|
#define STR_3330 "MB"
|
||||||
|
#define STR_3331 "Hent klokkeslett og dato fra vertssystem"
|
||||||
|
#define STR_3332 "Aktiver flytpunktenhet (FPU)"
|
||||||
|
#define STR_3333 "Dynamisk rekompilering"
|
||||||
|
#define STR_3334 "KB"
|
||||||
|
#define STR_3335 "Forvalgt"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Video, 3350.) */
|
||||||
|
#define STR_3350 "Video:"
|
||||||
|
#define STR_3351 "Video speed:"
|
||||||
|
#define STR_3352 "Voodoo-grafikk"
|
||||||
|
#define STR_3353 "Forvalgt"
|
||||||
|
#define STR_3354 "8-biters"
|
||||||
|
#define STR_3355 "Treg 16-biters"
|
||||||
|
#define STR_3356 "Rask 16-biters"
|
||||||
|
#define STR_3357 "Treg VLB/PCI"
|
||||||
|
#define STR_3358 "Mid. VLB/PCI"
|
||||||
|
#define STR_3359 "Rask VLB/PCI"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Input, 3375.) */
|
||||||
|
#define STR_3375 "Mus:"
|
||||||
|
#define STR_3376 "Joystick:"
|
||||||
|
#define STR_3377 "Joystick 1"
|
||||||
|
#define STR_3378 "Joystick 2"
|
||||||
|
#define STR_3379 "Joystick 3"
|
||||||
|
#define STR_3380 "Joystick 4"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Sound, 3400.) */
|
||||||
|
#define STR_3400 "Lydkort:"
|
||||||
|
#define STR_3401 "MIDI utenhet:"
|
||||||
|
#define STR_3402 "Enkeltstående MPU-401"
|
||||||
|
#define STR_3403 "Bruk Nuked OPL"
|
||||||
|
#define STR_3404 "Bruk FLOAT32-lyd"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Network, 3425.) */
|
||||||
|
#define STR_3425 "Nettverkstype:"
|
||||||
|
#define STR_3426 "PCap-enhet:"
|
||||||
|
#define STR_3427 "Nettverkskort:"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Ports, 3450.) */
|
||||||
|
#define STR_3450 "Spillport"
|
||||||
|
#define STR_3451 "Parallellport 1"
|
||||||
|
#define STR_3452 "Parallellport 2"
|
||||||
|
#define STR_3453 "Parallellport 3"
|
||||||
|
#define STR_3454 "Seriellport 1"
|
||||||
|
#define STR_3455 "Seriellport 2"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Other Devices, 3475.) */
|
||||||
|
#define STR_3475 "SCSI-kontroller:"
|
||||||
|
#define STR_3476 "HD-kontroller:"
|
||||||
|
#define STR_3477 "Tredje IDE:"
|
||||||
|
#define STR_3478 "Fjerde IDE:"
|
||||||
|
#define STR_3479 "ISABugger-enhet:"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Hard Disks, 3500.) */
|
||||||
|
#define STR_3500 "Platelager:"
|
||||||
|
#define STR_3501 "&Nytt.."
|
||||||
|
#define STR_3502 "&Eksisterende.."
|
||||||
|
#define STR_3503 "Fje&rn"
|
||||||
|
#define STR_3504 "Buss"
|
||||||
|
#define STR_3505 "Fil"
|
||||||
|
#define STR_3506 "C"
|
||||||
|
#define STR_3507 "H"
|
||||||
|
#define STR_3508 "S"
|
||||||
|
#define STR_3509 "MB"
|
||||||
|
#define STR_3510 "MB (CHS: %u, %u, %u)"
|
||||||
|
#define STR_3511 "Selvvalgt..."
|
||||||
|
#define STR_3512 "Selvvalgt (stor)..."
|
||||||
|
#define STR_3515 "ST506"
|
||||||
|
#define STR_3516 "ESDI"
|
||||||
|
#define STR_3517 "IDE (kun PIO)"
|
||||||
|
#define STR_3518 "IDE (PIO+DMA)"
|
||||||
|
#define STR_3519 "SCSI"
|
||||||
|
#define STR_3520 "SCSI (flyttbar)"
|
||||||
|
#define STR_3521 "USB"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Add Hard Disk, 3525.) */
|
||||||
|
#define STR_3525 "Legg til platelager"
|
||||||
|
#define STR_3526 "Opprett platelager"
|
||||||
|
#define STR_3527 "Legg til eksisterende platelager"
|
||||||
|
#define STR_3528 "Sylindre:"
|
||||||
|
#define STR_3529 "Hoder:"
|
||||||
|
#define STR_3530 "Sektorer:"
|
||||||
|
#define STR_3531 "Størrelse (MB):"
|
||||||
|
#define STR_3532 "Type:"
|
||||||
|
#define STR_3533 "Forsøker å opprette et HDI-avtrykk større enn 4 GB"
|
||||||
|
#define STR_3534 "Forsøker å opprette et sprøtt overdimensjonert platelageravtrykk"
|
||||||
|
#define STR_3535 "HDI- eller HDX-avtrykk med sektorstørrelse annet enn 512 er ikke støttet"
|
||||||
|
#define STR_3536 "Platelageravtrykk\0*.hd?;*.im?;*.vhd\0Alle filer\0*.*\0"
|
||||||
|
#define STR_3537 "Husk å partisjonere og formattere det nye lageret"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Floppy Drives, 3550.) */
|
||||||
|
#define STR_3550 "Diskettstasjoner:"
|
||||||
|
#define STR_3551 "Type:"
|
||||||
|
#define STR_3552 "Turbo-timing"
|
||||||
|
#define STR_3553 "Sjekk BPB"
|
||||||
|
#define STR_3554 "Turbo"
|
||||||
|
#define STR_3555 "Sjekk BPB"
|
||||||
|
|
||||||
|
/* UI dialog: Settings (Removable Devices, 3575.) */
|
||||||
|
#define STR_3575 "CD-ROM-enheter:"
|
||||||
|
#define STR_3576 "Hastighet:"
|
||||||
|
#define STR_3577 "ZIP-diskstasjoner:"
|
||||||
|
#define STR_3578 "ZIP 250"
|
||||||
|
#define STR_3579 "Hastighet"
|
||||||
|
#define STR_3580 "<Reserved>"
|
||||||
|
#define STR_3581 "<Reserved>"
|
||||||
|
#define STR_3582 "ATAPI (kun PIO)"
|
||||||
|
#define STR_3583 "ATAPI (PIO+DMA)"
|
||||||
|
#define STR_3584 "SCSI"
|
||||||
|
#define STR_3585 "USB"
|
||||||
|
|
||||||
|
/* UI dialog: status bar (3900.) */
|
||||||
|
#define STR_3900 "(tom)"
|
||||||
|
#define STR_3901 "(vertsdisk %c:)"
|
||||||
|
#define STR_3902 " [Skrivebeskyttet]"
|
||||||
|
#define STR_3903 "&Nytt avtrykk.."
|
||||||
|
#define STR_3904 "&Last inn avtrykk.."
|
||||||
|
#define STR_3905 "Oppdate&re avtrykk"
|
||||||
|
#define STR_3906 "Løs &ut"
|
||||||
|
|
||||||
|
#define STR_3910 "Diskett %i (%s): %ls"
|
||||||
|
#define STR_3911 "Alle avtrykk\0*.0??;*.1??;*.360;*.720;*.86f;*.bin;*.cq?;*.dsk;*.flp;*.hdm;*.im?;*.json;*.td0;*.*fd?;*.xdf\0Avanserte sektoravtrykk\0*.imd;*.json;*.td0\0Enkle sektoravtrykk\0*.0??;*.1??;*.360;*.720;*.bin;*.cq?;*.dsk;*.flp;*.hdm;*.im?;*.xdf;*.*fd?\0Flux-avtrykk\0*.fdi\0Overflateavtrykk\0*.86f\0Alle filer\0*.*\0"
|
||||||
|
#define STR_3912 "Alle avtrykk\0*.86f;*.dsk;*.flp;*.im?;*.*fd?\0Enkle sektoravtrykk\0*.dsk;*.flp;*.im?;*.img;*.*fd?\0Overflateavtrykk\0*.86f\0"
|
||||||
|
#define STR_3913 "Overflateavtrykk\0*.86f\0"
|
||||||
|
#define STR_3914 "(&x) Eksporter til 86F..."
|
||||||
|
|
||||||
|
#define STR_3920 "CD-ROM %i (%s): %s"
|
||||||
|
#define STR_3921 "Vertens CD/DVD-enhet (%c:)"
|
||||||
|
#define STR_3922 "CD-ROM-avtrykk\0*.iso;*.cue\0Alle filer (*.*)\0*.*\0"
|
||||||
|
#define STR_3923 "&Mute"
|
||||||
|
|
||||||
|
#define STR_3930 "Platelager (%s)"
|
||||||
|
|
||||||
|
#define STR_3940 "Flyttbar disk %i: %ls"
|
||||||
|
#define STR_3941 "(&N) Varsle diskbytte"
|
||||||
|
|
||||||
|
#define STR_3950 "ZIP %i (%03i): %ls"
|
||||||
|
#define STR_3951 "ZIP-avtrykk\0*.im?;*.zdi\0Alle filer\0*.*\0"
|
||||||
|
#define STR_3952 "ZIP-avtrykk\0*.im?;*.zdi\0"
|
||||||
|
#define STR_3960 "Nettverk"
|
||||||
|
#define STR_3970 "Lyd"
|
||||||
|
|
||||||
|
|
||||||
|
/* Menu: Action (4000.) */
|
||||||
|
#define STR_ACTION "H&andlinger"
|
||||||
|
#define STR_4001 "&Hard omstart"
|
||||||
|
#define STR_4002 "&Kontroll+Alt+Del"
|
||||||
|
#define STR_4003 "Send Kontroll+Alt+&Esc"
|
||||||
|
#define STR_4004 "Send Kontroll+Alt+&Break"
|
||||||
|
#define STR_4005 "&Pause"
|
||||||
|
#define STR_4006 "(&x) Avslutt"
|
||||||
|
|
||||||
|
/* Menu: View (4010.) */
|
||||||
|
#define STR_VIEW "&Vis"
|
||||||
|
#define STR_4011 "Skale&rbart vindu"
|
||||||
|
#define STR_4012 "Lagr&e størrelse && posisjon"
|
||||||
|
#define STR_4013 "&Fullskjerm\tKontroll+Alt+PageUP"
|
||||||
|
#define STR_4014 "Høyre Kontroll g&ir venstre Alt"
|
||||||
|
#define STR_4015 "Oppdater stat&uslinjeikoner"
|
||||||
|
|
||||||
|
/* Menu: View > Renderer */
|
||||||
|
#define STR_4020 "Re&nderer"
|
||||||
|
|
||||||
|
/* Menu: View > Window Scale Factor */
|
||||||
|
#define STR_4030 "(&w) Vinduskala"
|
||||||
|
#define STR_4031 "&0.5x"
|
||||||
|
#define STR_4032 "&1x"
|
||||||
|
#define STR_4033 "1.&5x"
|
||||||
|
#define STR_4034 "&2x"
|
||||||
|
|
||||||
|
/* Menu: View > Fullscreen Stretch Mode */
|
||||||
|
#define STR_4040 "Fullskjerm &strukket modus"
|
||||||
|
#define STR_4041 "&Fullskjerm strukket"
|
||||||
|
#define STR_4042 "&4:3"
|
||||||
|
#define STR_4043 "Kvadrati&ske piksler"
|
||||||
|
#define STR_4044 "Heltallskaler&ing"
|
||||||
|
#define STR_4045 "Faktis&k størrelse"
|
||||||
|
|
||||||
|
/* Menu: Display (4050.) */
|
||||||
|
#define STR_DISPLAY "(&d) Skjerm"
|
||||||
|
#define STR_4051 "&Omvendt video"
|
||||||
|
#define STR_4052 "Bruk &overskanning"
|
||||||
|
#define STR_4053 "Tving 4:3 bildeforh&old"
|
||||||
|
#define STR_4054 "(&c) Endre kontrast for monokrom skjerm"
|
||||||
|
|
||||||
|
/* Menu: Display > Display Type */
|
||||||
|
#define STR_DISPTYPE "Skjerm&type"
|
||||||
|
#define STR_4061 "(&c) RGB fargeskjerm"
|
||||||
|
#define STR_4062 "&Gråskalaskjerm"
|
||||||
|
#define STR_4063 "R&avfarget skjerm"
|
||||||
|
#define STR_4064 "&Grønn skjerm"
|
||||||
|
#define STR_4065 "(&w) Hvit skjerm"
|
||||||
|
|
||||||
|
/* Menu: Display > Grayscale Conversion Type */
|
||||||
|
#define STR_GRAYSCALE "&Gråskala konverteringsmetode"
|
||||||
|
#define STR_4071 "BT&601 (NTSC/PAL)"
|
||||||
|
#define STR_4072 "BT&709 (HDTV)"
|
||||||
|
#define STR_4073 "f&argesnitt"
|
||||||
|
|
||||||
|
/* Menu: Tools (4080.) */
|
||||||
|
#define STR_TOOLS "Verk&tøy"
|
||||||
|
#define STR_4081 "Inn&stillinger"
|
||||||
|
#define STR_4082 "Språkva&lg"
|
||||||
|
#define STR_4083 "L&ogging"
|
||||||
|
#define STR_4084 "(&c) Last inn konfigurasjon"
|
||||||
|
#define STR_4085 "L&agre konfigurasjon"
|
||||||
|
#define STR_4086 "Stat&us"
|
||||||
|
#define STR_4087 "&Ta skjermbilde\tKontroll+Hjem"
|
||||||
|
|
||||||
|
/* Menu: Help (4090.) */
|
||||||
|
#define STR_HELP "&Hjelp"
|
||||||
|
#define STR_4091 "Om V&ARCem"
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file. */
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* VARCem Virtual ARchaeological Computer EMulator.
|
* VARCem Virtual ARchaeological Computer EMulator.
|
||||||
* An emulator of (mostly) x86-based PC systems and devices,
|
* An emulator of (mostly) x86-based PC systems and devices,
|
||||||
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* it as the line-by-line base for the translated version, and
|
* it as the line-by-line base for the translated version, and
|
||||||
* update fields as needed.
|
* update fields as needed.
|
||||||
*
|
*
|
||||||
* Version: @(#)VARCem-SL.str 1.0.3 2018/06/02
|
* Version: @(#)VARCem-SL.str 1.0.4 2018/06/27
|
||||||
*
|
*
|
||||||
* Authors: David Simunic, <simunic.david@outlook.com>
|
* Authors: David Simunic, <simunic.david@outlook.com>
|
||||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Do not translate! */
|
/* Do not translate! */
|
||||||
#define TAG_VERSION 1,0,3
|
#define TAG_VERSION 1,0,4
|
||||||
#define TAG_AUTHOR "David Simunic"
|
#define TAG_AUTHOR "David Simunic"
|
||||||
#define TAG_EMAIL "simunic.david@outlook.com"
|
#define TAG_EMAIL "simunic.david@outlook.com"
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@
|
|||||||
#define STR_3579 "Histrost"
|
#define STR_3579 "Histrost"
|
||||||
#define STR_3580 "<Rezervirano>"
|
#define STR_3580 "<Rezervirano>"
|
||||||
#define STR_3581 "<Rezervirano>"
|
#define STR_3581 "<Rezervirano>"
|
||||||
#define STR_3582 "ATAPI (samo only)"
|
#define STR_3582 "ATAPI (samo PIO)"
|
||||||
#define STR_3583 "ATAPI (PIO+DMA)"
|
#define STR_3583 "ATAPI (PIO+DMA)"
|
||||||
#define STR_3584 "SCSI"
|
#define STR_3584 "SCSI"
|
||||||
#define STR_3585 "USB"
|
#define STR_3585 "USB"
|
||||||
@@ -389,7 +389,7 @@
|
|||||||
/* Menu: Tools (4080.) */
|
/* Menu: Tools (4080.) */
|
||||||
#define STR_TOOLS "&Orodja"
|
#define STR_TOOLS "&Orodja"
|
||||||
#define STR_4081 "&Nastavitve"
|
#define STR_4081 "&Nastavitve"
|
||||||
#define STR_4082 "&Jazyk"
|
#define STR_4082 "&Jezik"
|
||||||
#define STR_4083 "&Beleženje"
|
#define STR_4083 "&Beleženje"
|
||||||
#define STR_4084 "N&aloži konfiguracijo"
|
#define STR_4084 "N&aloži konfiguracijo"
|
||||||
#define STR_4085 "&Shrani konfiguracijo"
|
#define STR_4085 "&Shrani konfiguracijo"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# Supported Languages database.
|
# Supported Languages database.
|
||||||
#
|
#
|
||||||
# Version: @(#)VARCem.lang 1.0.2 2018/06/19
|
# Version: @(#)VARCem.lang 1.0.3 2018/07/11
|
||||||
#
|
#
|
||||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
#
|
#
|
||||||
@@ -56,6 +56,7 @@ JP,0411,LANG_JAPANESE,SUBLANG_JAPANESE_JAPAN
|
|||||||
KR,0412,LANG_KOREAN,SUBLANG_KOREAN
|
KR,0412,LANG_KOREAN,SUBLANG_KOREAN
|
||||||
KZ,043f,LANG_KAZAK,SUBLANG_KAZAK_KAZAKHSTAN
|
KZ,043f,LANG_KAZAK,SUBLANG_KAZAK_KAZAKHSTAN
|
||||||
LT,0427,LANG_LITHUANIAN,SUBLANG_LITHUANIAN_LITHUANIA
|
LT,0427,LANG_LITHUANIAN,SUBLANG_LITHUANIAN_LITHUANIA
|
||||||
|
NO,0414,LANG_NORWEGIAN,SUBLANG_NORWEGIAN_BOKMAL
|
||||||
RU,0419,LANG_RUSSIAN,SUBLANG_RUSSIAN_RUSSIA
|
RU,0419,LANG_RUSSIAN,SUBLANG_RUSSIAN_RUSSIA
|
||||||
SL,0424,LANG_SLOVENIAN,SUBLANG_SLOVENIAN_SLOVENIA
|
SL,0424,LANG_SLOVENIAN,SUBLANG_SLOVENIAN_SLOVENIA
|
||||||
UA,0422,LANG_UKRAINIAN,SUBLANG_UKRAINIAN_UKRAINE
|
UA,0422,LANG_UKRAINIAN,SUBLANG_UKRAINIAN_UKRAINE
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Define application version and build info.
|
* Define application version and build info.
|
||||||
*
|
*
|
||||||
* Version: @(#)version.h 1.0.16 2018/06/25
|
* Version: @(#)version.h 1.0.17 2018/07/28
|
||||||
*
|
*
|
||||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
*
|
*
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
#define EMU_VER_MAJOR 0
|
#define EMU_VER_MAJOR 0
|
||||||
#define EMU_VER_MINOR 1
|
#define EMU_VER_MINOR 1
|
||||||
#define EMU_VER_REV 6
|
#define EMU_VER_REV 6
|
||||||
#define EMU_VER_PATCH 1
|
#define EMU_VER_PATCH 2
|
||||||
|
|
||||||
|
|
||||||
/* Standard C preprocessor macros. */
|
/* Standard C preprocessor macros. */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# Makefile for Windows systems using the MinGW32 environment.
|
# Makefile for Windows systems using the MinGW32 environment.
|
||||||
#
|
#
|
||||||
# Version: @(#)Makefile.mingw 1.0.49 2018/06/16
|
# Version: @(#)Makefile.mingw 1.0.50 2018/07/28
|
||||||
#
|
#
|
||||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
#
|
#
|
||||||
@@ -92,6 +92,9 @@ endif
|
|||||||
ifndef SDL
|
ifndef SDL
|
||||||
SDL := n
|
SDL := n
|
||||||
endif
|
endif
|
||||||
|
ifndef D2D
|
||||||
|
D2D := n
|
||||||
|
endif
|
||||||
ifndef VNC
|
ifndef VNC
|
||||||
VNC := n
|
VNC := n
|
||||||
endif
|
endif
|
||||||
@@ -404,6 +407,28 @@ ifneq ($(SDL), n)
|
|||||||
SDLOBJ := win_sdl.o
|
SDLOBJ := win_sdl.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# N=no, Y=yes,linked, D=yes,dynamic, S=yes,static
|
||||||
|
ifneq ($(D2D), n)
|
||||||
|
ifeq ($(D2D), d)
|
||||||
|
OPTS += -DUSE_D2D=2
|
||||||
|
else
|
||||||
|
OPTS += -DUSE_D2D=1
|
||||||
|
endif
|
||||||
|
RFLAGS += -DUSE_D2D
|
||||||
|
ifneq ($(D2D_PATH), )
|
||||||
|
OPTS += -I$(D2D_PATH)/include/mingw -I$(D2D_PATH)/include
|
||||||
|
ifeq ($(X64), y)
|
||||||
|
LOPTS += -L$(D2D_PATH)/lib/mingw/x64
|
||||||
|
else
|
||||||
|
LOPTS += -L$(D2D_PATH)/lib/mingw/x86
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(D2D), y)
|
||||||
|
LIBS += -ld2d1
|
||||||
|
endif
|
||||||
|
D2DOBJ := win_d2d.o
|
||||||
|
endif
|
||||||
|
|
||||||
# N=no, Y=yes,linked, D=yes,dynamic, S=yes,static
|
# N=no, Y=yes,linked, D=yes,dynamic, S=yes,static
|
||||||
ifneq ($(VNC), n)
|
ifneq ($(VNC), n)
|
||||||
OPTS += -DUSE_VNC
|
OPTS += -DUSE_VNC
|
||||||
@@ -468,7 +493,7 @@ ifneq ($(WX), n)
|
|||||||
UIOBJ := wx_main.o wx_ui.o wx_stbar.o wx_render.o
|
UIOBJ := wx_main.o wx_ui.o wx_stbar.o wx_render.o
|
||||||
else
|
else
|
||||||
UIOBJ := win_ui.o \
|
UIOBJ := win_ui.o \
|
||||||
win_ddraw.o win_d3d.o $(SDLOBJ) \
|
win_ddraw.o win_d3d.o $(SDLOBJ) $(D2DOBJ) \
|
||||||
win_dialog.o win_about.o win_status.o \
|
win_dialog.o win_about.o win_status.o \
|
||||||
win_settings.o win_devconf.o win_snd_gain.o \
|
win_settings.o win_devconf.o win_snd_gain.o \
|
||||||
win_new_image.o
|
win_new_image.o
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# Makefile for Windows using Visual Studio 2015.
|
# Makefile for Windows using Visual Studio 2015.
|
||||||
#
|
#
|
||||||
# Version: @(#)Makefile.VC 1.0.36 2018/06/19
|
# Version: @(#)Makefile.VC 1.0.37 2018/07/28
|
||||||
#
|
#
|
||||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
#
|
#
|
||||||
@@ -93,6 +93,9 @@ endif
|
|||||||
ifndef SDL
|
ifndef SDL
|
||||||
SDL := n
|
SDL := n
|
||||||
endif
|
endif
|
||||||
|
ifndef D2D
|
||||||
|
D2D := n
|
||||||
|
endif
|
||||||
ifndef VNC
|
ifndef VNC
|
||||||
VNC := n
|
VNC := n
|
||||||
endif
|
endif
|
||||||
@@ -378,6 +381,28 @@ ifneq ($(SDL), n)
|
|||||||
SDLOBJ := win_sdl.obj
|
SDLOBJ := win_sdl.obj
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# N=no, Y=yes,linked, D=yes,dynamic, S=yes,static
|
||||||
|
ifneq ($(D2D), n)
|
||||||
|
ifeq ($(D2D), d)
|
||||||
|
OPTS += -DUSE_D2D=2
|
||||||
|
else
|
||||||
|
OPTS += -DUSE_D2D=1
|
||||||
|
endif
|
||||||
|
RFLAGS += -DUSE_D2D
|
||||||
|
ifneq ($(D2D_PATH), )
|
||||||
|
OPTS += -I$(D2D_PATH)/include/msvc -I$(D2D_PATH)/include
|
||||||
|
ifeq ($(X64), y)
|
||||||
|
LOPTS += -LIBPATH:$(D2D_PATH)\lib\msvc\x64
|
||||||
|
else
|
||||||
|
LOPTS += -LIBPATH:$(D2D_PATH)\lib\msvc\x86
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(D2D), y)
|
||||||
|
LIBS += d2d1.lib
|
||||||
|
endif
|
||||||
|
D2DOBJ := win_d2d.obj
|
||||||
|
endif
|
||||||
|
|
||||||
# N=no, Y=yes,linked, D=yes,dynamic, S=yes,static
|
# N=no, Y=yes,linked, D=yes,dynamic, S=yes,static
|
||||||
ifneq ($(VNC), n)
|
ifneq ($(VNC), n)
|
||||||
OPTS += -DUSE_VNC
|
OPTS += -DUSE_VNC
|
||||||
@@ -442,7 +467,7 @@ ifneq ($(WX), n)
|
|||||||
UIOBJ := wx_main.obj wx_ui.obj wx_stbar.obj wx_render.obj
|
UIOBJ := wx_main.obj wx_ui.obj wx_stbar.obj wx_render.obj
|
||||||
else
|
else
|
||||||
UIOBJ := win_ui.obj \
|
UIOBJ := win_ui.obj \
|
||||||
win_ddraw.obj win_d3d.obj $(SDLOBJ) \
|
win_ddraw.obj win_d3d.obj $(SDLOBJ) $(D2DOBJ) \
|
||||||
win_dialog.obj win_about.obj win_status.obj \
|
win_dialog.obj win_about.obj win_status.obj \
|
||||||
win_settings.obj win_devconf.obj win_snd_gain.obj \
|
win_settings.obj win_devconf.obj win_snd_gain.obj \
|
||||||
win_new_image.obj
|
win_new_image.obj
|
||||||
@@ -711,7 +736,7 @@ win/Mklang.cmd: win/msvc/Makefile.VC
|
|||||||
@echo @IF NOT "%%LANG%%"=="none" @$(MAKE) -fwin/msvc/Makefile.VC "RFLAGS=$(RFLAGS) $(EXTRAS)" LANG=%%LANG%% VARCem-%%1.dll >>win\Mklang.cmd
|
@echo @IF NOT "%%LANG%%"=="none" @$(MAKE) -fwin/msvc/Makefile.VC "RFLAGS=$(RFLAGS) $(EXTRAS)" LANG=%%LANG%% VARCem-%%1.dll >>win\Mklang.cmd
|
||||||
|
|
||||||
|
|
||||||
lang: win/Mklang.cmd
|
langs: win/Mklang.cmd
|
||||||
ifdef LANG
|
ifdef LANG
|
||||||
@echo Generating localization $(LANG) ..
|
@echo Generating localization $(LANG) ..
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Platform main support module for Windows.
|
* Platform main support module for Windows.
|
||||||
*
|
*
|
||||||
* Version: @(#)win.c 1.0.16 2018/05/20
|
* Version: @(#)win.c 1.0.17 2018/07/28
|
||||||
*
|
*
|
||||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -58,6 +58,9 @@
|
|||||||
#ifdef USE_SDL
|
#ifdef USE_SDL
|
||||||
# include "win_sdl.h"
|
# include "win_sdl.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_D2D
|
||||||
|
# include "win_d2d.h"
|
||||||
|
#endif
|
||||||
#ifdef USE_VNC
|
#ifdef USE_VNC
|
||||||
# include "../vnc.h"
|
# include "../vnc.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -89,6 +92,9 @@ const vidapi_t *plat_vidapis[] = {
|
|||||||
&ddraw_vidapi,
|
&ddraw_vidapi,
|
||||||
&d3d_vidapi,
|
&d3d_vidapi,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_D2D
|
||||||
|
&d2d_vidapi,
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SDL
|
#ifdef USE_SDL
|
||||||
&sdl_vidapi,
|
&sdl_vidapi,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Platform support defintions for Win32.
|
* Platform support defintions for Win32.
|
||||||
*
|
*
|
||||||
* Version: @(#)win.h 1.0.17 2018/05/28
|
* Version: @(#)win.h 1.0.18 2018/07/28
|
||||||
*
|
*
|
||||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
|
|||||||
450
src/win/win_d2d.cpp
Normal file
450
src/win/win_d2d.cpp
Normal file
@@ -0,0 +1,450 @@
|
|||||||
|
/*
|
||||||
|
* VARCem Virtual ARchaeological Computer EMulator.
|
||||||
|
* An emulator of (mostly) x86-based PC systems and devices,
|
||||||
|
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||||
|
* spanning the era between 1981 and 1995.
|
||||||
|
*
|
||||||
|
* This file is part of the VARCem Project.
|
||||||
|
*
|
||||||
|
* Rendering module for Microsoft Direct2D.
|
||||||
|
*
|
||||||
|
* Version: @(#)win_d2d.cpp 1.0.1 2018/07/28
|
||||||
|
*
|
||||||
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
|
* David Hrdlicka, <hrdlickadavid@outlook.com>
|
||||||
|
*
|
||||||
|
* Copyright 2018 Fred N. van Kempen.
|
||||||
|
* Copyright 2018 David Hrdlicka.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* 59 Temple Place - Suite 330
|
||||||
|
* Boston, MA 02111-1307
|
||||||
|
* USA.
|
||||||
|
*/
|
||||||
|
#define UNICODE
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
#include <d2d1.h>
|
||||||
|
#include <d2d1helper.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#define PNG_DEBUG 0
|
||||||
|
#include <png.h>
|
||||||
|
#include "../emu.h"
|
||||||
|
#include "../version.h"
|
||||||
|
#include "../device.h"
|
||||||
|
#include "../plat.h"
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(disable: 4200)
|
||||||
|
#endif
|
||||||
|
#include "../devices/video/video.h"
|
||||||
|
#include "win.h"
|
||||||
|
#include "win_d2d.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_D2D
|
||||||
|
|
||||||
|
# if USE_D2D == 2
|
||||||
|
# define PATH_D2D_DLL "d2d1.dll"
|
||||||
|
# define DLLFUNC(x) D2D1_ ## x
|
||||||
|
|
||||||
|
|
||||||
|
/* Pointers to the real functions. */
|
||||||
|
static bool (*D2D1_CreateFactory)(
|
||||||
|
D2D1_FACTORY_TYPE factoryType,
|
||||||
|
REFIID riid,
|
||||||
|
CONST D2D1_FACTORY_OPTIONS *pFactoryOptions,
|
||||||
|
void **ppIFactory);
|
||||||
|
|
||||||
|
static const dllimp_t d2d_imports[] = {
|
||||||
|
{ "D2D1CreateFactory", &D2D1_CreateFactory },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
static void *d2d_handle = NULL;
|
||||||
|
# else
|
||||||
|
# define DLLFUNC(x) D2D1 ## x
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static HWND d2d_hwnd, old_hwndMain;
|
||||||
|
static ID2D1Factory *d2d_factory;
|
||||||
|
static ID2D1HwndRenderTarget *d2d_hwndRT;
|
||||||
|
static ID2D1BitmapRenderTarget *d2d_btmpRT;
|
||||||
|
static ID2D1Bitmap *d2d_bitmap;
|
||||||
|
static int d2d_width, d2d_height,
|
||||||
|
d2d_screen_width, d2d_screen_height,
|
||||||
|
d2d_fs;
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
d2d_stretch(float *w, float *h, float *x, float *y)
|
||||||
|
{
|
||||||
|
double dw, dh, dx, dy, temp, temp2, ratio_w, ratio_h, gsr, hsr;
|
||||||
|
|
||||||
|
switch (vid_fullscreen_scale) {
|
||||||
|
case FULLSCR_SCALE_FULL:
|
||||||
|
*w = (float)d2d_screen_width;
|
||||||
|
*h = (float)d2d_screen_height;
|
||||||
|
*x = 0;
|
||||||
|
*y = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FULLSCR_SCALE_43:
|
||||||
|
dw = (double)d2d_screen_width;
|
||||||
|
dh = (double)d2d_screen_height;
|
||||||
|
temp = (dh / 3.0) * 4.0;
|
||||||
|
dx = (dw - temp) / 2.0;
|
||||||
|
dw = temp;
|
||||||
|
*w = (float)dw;
|
||||||
|
*h = (float)dh;
|
||||||
|
*x = (float)dx;
|
||||||
|
*y = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FULLSCR_SCALE_SQ:
|
||||||
|
dw = (double)d2d_screen_width;
|
||||||
|
dh = (double)d2d_screen_height;
|
||||||
|
temp = ((double) *w);
|
||||||
|
temp2 = ((double) *h);
|
||||||
|
dx = (dw / 2.0) - ((dh * temp) / (temp2 * 2.0));
|
||||||
|
dy = 0.0;
|
||||||
|
if (dx < 0.0) {
|
||||||
|
dx = 0.0;
|
||||||
|
dy = (dw / 2.0) - ((dh * temp2) / (temp * 2.0));
|
||||||
|
}
|
||||||
|
dw -= (dx * 2.0);
|
||||||
|
dh -= (dy * 2.0);
|
||||||
|
*w = (float)dw;
|
||||||
|
*h = (float)dh;
|
||||||
|
*x = (float)dx;
|
||||||
|
*y = (float)dy;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FULLSCR_SCALE_INT:
|
||||||
|
dw = (double)d2d_screen_width;
|
||||||
|
dh = (double)d2d_screen_height;
|
||||||
|
temp = ((double) *w);
|
||||||
|
temp2 = ((double) *h);
|
||||||
|
ratio_w = dw / ((double) *w);
|
||||||
|
ratio_h = dh / ((double) *h);
|
||||||
|
if (ratio_h < ratio_w)
|
||||||
|
ratio_w = ratio_h;
|
||||||
|
dx = (dw / 2.0) - ((temp * ratio_w) / 2.0);
|
||||||
|
dy = (dh / 2.0) - ((temp2 * ratio_h) / 2.0);
|
||||||
|
dw -= (dx * 2.0);
|
||||||
|
dh -= (dy * 2.0);
|
||||||
|
*w = (float)dw;
|
||||||
|
*h = (float)dh;
|
||||||
|
*x = (float)dx;
|
||||||
|
*y = (float)dy;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FULLSCR_SCALE_KEEPRATIO:
|
||||||
|
dw = (double)d2d_screen_width;
|
||||||
|
dh = (double)d2d_screen_height;
|
||||||
|
hsr = dw / dh;
|
||||||
|
gsr = ((double) *w) / ((double) *h);
|
||||||
|
if (gsr <= hsr) {
|
||||||
|
temp = dh * gsr;
|
||||||
|
dx = (dw - temp) / 2.0;
|
||||||
|
dw = temp;
|
||||||
|
*w = (float)dw;
|
||||||
|
*h = (float)dh;
|
||||||
|
*x = (float)dx;
|
||||||
|
*y = 0;
|
||||||
|
} else {
|
||||||
|
temp = dw / gsr;
|
||||||
|
dy = (dh - temp) / 2.0;
|
||||||
|
dh = temp;
|
||||||
|
*w = (float)dw;
|
||||||
|
*h = (float)dh;
|
||||||
|
*x = 0;
|
||||||
|
*y = (float)dy;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
d2d_blit(int x, int y, int y1, int y2, int w, int h)
|
||||||
|
{
|
||||||
|
ID2D1Bitmap *fs_bitmap;
|
||||||
|
ID2D1RenderTarget *RT;
|
||||||
|
D2D1_RECT_U rectU;
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
void *srcdata;
|
||||||
|
int yy;
|
||||||
|
float fs_x, fs_y;
|
||||||
|
float fs_w = (float)w;
|
||||||
|
float fs_h = (float)h;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
pclog("D2D: blit(x=%d, y=%d, y1=%d, y2=%d, w=%d, h=%d)\n", x,y, y1,y2, w,h);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// TODO: Detect double scanned mode and resize render target
|
||||||
|
// appropriately for more clear picture
|
||||||
|
if (w != d2d_width || h != d2d_height) {
|
||||||
|
if (d2d_fs) {
|
||||||
|
if (d2d_btmpRT) {
|
||||||
|
d2d_btmpRT->Release();
|
||||||
|
d2d_btmpRT = NULL;
|
||||||
|
}
|
||||||
|
hr = d2d_hwndRT->CreateCompatibleRenderTarget(
|
||||||
|
D2D1::SizeF((float)w, (float)h),
|
||||||
|
&d2d_btmpRT);
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
d2d_width = w;
|
||||||
|
d2d_height = h;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hr = d2d_hwndRT->Resize(D2D1::SizeU(w, h));
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
d2d_width = w;
|
||||||
|
d2d_height = h;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((y1 == y2) || (buffer32 == NULL)) {
|
||||||
|
video_blit_complete();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Copy data directly from buffer32 to d2d_bitmap
|
||||||
|
srcdata = malloc(h * w * 4);
|
||||||
|
for (yy = y1; yy < y2; yy++) {
|
||||||
|
if ((y + yy) >= 0 && (y + yy) < buffer32->h) {
|
||||||
|
#if 0
|
||||||
|
if (vid_grayscale || invert_display)
|
||||||
|
video_transform_copy(
|
||||||
|
(uint32_t *) &(((uint8_t *)srcdata)[yy * w * 4]),
|
||||||
|
&(((uint32_t *)buffer32->line[y + yy])[x]),
|
||||||
|
w);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
memcpy(
|
||||||
|
(uint32_t *) &(((uint8_t *)srcdata)[yy * w * 4]),
|
||||||
|
&(((uint32_t *)buffer32->line[y + yy])[x]),
|
||||||
|
w * 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
video_blit_complete();
|
||||||
|
|
||||||
|
rectU = D2D1::RectU(0, 0, w, h);
|
||||||
|
hr = d2d_bitmap->CopyFromMemory(&rectU, srcdata, w * 4);
|
||||||
|
// In fullscreen mode we first draw offscreen to an intermediate
|
||||||
|
// BitmapRenderTarget, which then gets rendered to the actual
|
||||||
|
// HwndRenderTarget in order to implement different scaling modes
|
||||||
|
// In windowed mode we draw directly to the HwndRenderTarget
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
RT = d2d_fs ? (ID2D1RenderTarget *) d2d_btmpRT : (ID2D1RenderTarget *) d2d_hwndRT;
|
||||||
|
RT->BeginDraw();
|
||||||
|
RT->DrawBitmap(d2d_bitmap,
|
||||||
|
D2D1::RectF(0, (float)y1, (float)w, (float)y2),
|
||||||
|
1.0f,
|
||||||
|
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR,
|
||||||
|
D2D1::RectF(0, (float)y1, (float)w, (float)y2));
|
||||||
|
hr = RT->EndDraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d2d_fs) {
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
hr = d2d_btmpRT->GetBitmap(&fs_bitmap);
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
d2d_stretch(&fs_w, &fs_h, &fs_x, &fs_y);
|
||||||
|
d2d_hwndRT->BeginDraw();
|
||||||
|
d2d_hwndRT->Clear(D2D1::ColorF(D2D1::ColorF::Black));
|
||||||
|
d2d_hwndRT->DrawBitmap(fs_bitmap,
|
||||||
|
D2D1::RectF(fs_x, fs_y, fs_x + fs_w, fs_y + fs_h),
|
||||||
|
1.0f,
|
||||||
|
D2D1_BITMAP_INTERPOLATION_MODE_LINEAR,
|
||||||
|
D2D1::RectF(0, 0, (float)w, (float)h));
|
||||||
|
hr = d2d_hwndRT->EndDraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(hr))
|
||||||
|
pclog("D2D: blit: error 0x%08lx\n", hr);
|
||||||
|
|
||||||
|
/* Clean up. */
|
||||||
|
free(srcdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
d2d_close(void)
|
||||||
|
{
|
||||||
|
pclog("D2D: close()\n");
|
||||||
|
|
||||||
|
video_setblit(NULL);
|
||||||
|
|
||||||
|
if (d2d_bitmap) {
|
||||||
|
d2d_bitmap->Release();
|
||||||
|
d2d_bitmap = NULL;
|
||||||
|
}
|
||||||
|
if (d2d_btmpRT) {
|
||||||
|
d2d_btmpRT->Release();
|
||||||
|
d2d_btmpRT = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d2d_hwndRT) {
|
||||||
|
d2d_hwndRT->Release();
|
||||||
|
d2d_hwndRT = NULL;
|
||||||
|
}
|
||||||
|
if (d2d_factory) {
|
||||||
|
d2d_factory->Release();
|
||||||
|
d2d_factory = NULL;
|
||||||
|
}
|
||||||
|
if (d2d_hwnd) {
|
||||||
|
hwndMain = old_hwndMain;
|
||||||
|
plat_set_input(hwndMain);
|
||||||
|
DestroyWindow(d2d_hwnd);
|
||||||
|
d2d_hwnd = NULL;
|
||||||
|
old_hwndMain = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(USE_D2D) && USE_D2D == 2
|
||||||
|
/* Quit and unload the DLL if possible. */
|
||||||
|
if (d2d_handle != NULL) {
|
||||||
|
dynld_close(d2d_handle);
|
||||||
|
d2d_handle = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
d2d_init(int fs)
|
||||||
|
{
|
||||||
|
WCHAR title[200];
|
||||||
|
D2D1_HWND_RENDER_TARGET_PROPERTIES props;
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
|
pclog("D2D: init(fs=%d)\n", fs);
|
||||||
|
|
||||||
|
cgapal_rebuild();
|
||||||
|
|
||||||
|
#if defined(USE_D2D) && USE_D2D == 2
|
||||||
|
/* Try loading the DLL. */
|
||||||
|
d2d_handle = dynld_module(PATH_D2D_DLL, d2d_imports);
|
||||||
|
if (d2d_handle == NULL) {
|
||||||
|
pclog("D2D: unable to load '%s', D2D not available.\n", PATH_D2D_DLL);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Get and log the version of the DLL we are using. */
|
||||||
|
if (fs) {
|
||||||
|
/*
|
||||||
|
* Direct2D seems to lack any proper fullscreen mode,
|
||||||
|
* therefore we just create a full screen window and
|
||||||
|
* pass its handle to a HwndRenderTarget.
|
||||||
|
*/
|
||||||
|
d2d_screen_width = GetSystemMetrics(SM_CXSCREEN);
|
||||||
|
d2d_screen_height = GetSystemMetrics(SM_CYSCREEN);
|
||||||
|
|
||||||
|
mbstowcs(title, emu_version, sizeof_w(title));
|
||||||
|
d2d_hwnd = CreateWindow(FS_CLASS_NAME,
|
||||||
|
title,
|
||||||
|
WS_POPUP,
|
||||||
|
0, 0, d2d_screen_width, d2d_screen_height,
|
||||||
|
HWND_DESKTOP,
|
||||||
|
NULL,
|
||||||
|
hInstance,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
old_hwndMain = hwndMain;
|
||||||
|
hwndMain = d2d_hwnd;
|
||||||
|
|
||||||
|
plat_set_input(d2d_hwnd);
|
||||||
|
SetFocus(d2d_hwnd);
|
||||||
|
SetWindowPos(d2d_hwnd, HWND_TOPMOST,
|
||||||
|
0,0, d2d_screen_width,d2d_screen_height, SWP_SHOWWINDOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
hr = DLLFUNC(CreateFactory)(D2D1_FACTORY_TYPE_MULTI_THREADED,
|
||||||
|
__uuidof(ID2D1Factory),
|
||||||
|
NULL,
|
||||||
|
reinterpret_cast <void **>(&d2d_factory));
|
||||||
|
|
||||||
|
if (fs) {
|
||||||
|
props = D2D1::HwndRenderTargetProperties(d2d_hwnd,
|
||||||
|
D2D1::SizeU(d2d_screen_width, d2d_screen_height));
|
||||||
|
} else {
|
||||||
|
// HwndRenderTarget will get resized appropriately by d2d_blit,
|
||||||
|
// so it's fine to let D2D imply size of 0x0 for now
|
||||||
|
props = D2D1::HwndRenderTargetProperties(hwndRender);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
hr = d2d_factory->CreateHwndRenderTarget(D2D1::RenderTargetProperties(),
|
||||||
|
props,
|
||||||
|
&d2d_hwndRT);
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
// Create a bitmap for storing intermediate data
|
||||||
|
hr = d2d_hwndRT->CreateBitmap(D2D1::SizeU(2048, 2048),
|
||||||
|
D2D1::BitmapProperties(D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE)),
|
||||||
|
&d2d_bitmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
pclog("D2D: init: error 0x%08lx\n", hr);
|
||||||
|
d2d_close();
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
d2d_fs = fs;
|
||||||
|
d2d_width = 0;
|
||||||
|
d2d_height = 0;
|
||||||
|
|
||||||
|
/* Make sure we get a clean exit. */
|
||||||
|
atexit(d2d_close);
|
||||||
|
|
||||||
|
/* Register our renderer! */
|
||||||
|
video_setblit(d2d_blit);
|
||||||
|
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
d2d_screenshot(const wchar_t *fn)
|
||||||
|
{
|
||||||
|
// Saving a screenshot of a Direct2D render target is harder than
|
||||||
|
// one would think. Keeping this stubbed for the moment
|
||||||
|
// -ryu
|
||||||
|
pclog("D2D: screenshot(%ls)\n", fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const vidapi_t d2d_vidapi = {
|
||||||
|
"D2D",
|
||||||
|
1,
|
||||||
|
d2d_init,
|
||||||
|
d2d_close,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
d2d_screenshot,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
62
src/win/win_d2d.h
Normal file
62
src/win/win_d2d.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* VARCem Virtual ARchaeological Computer EMulator.
|
||||||
|
* An emulator of (mostly) x86-based PC systems and devices,
|
||||||
|
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||||
|
* spanning the era between 1981 and 1995.
|
||||||
|
*
|
||||||
|
* This file is part of the VARCem Project.
|
||||||
|
*
|
||||||
|
* Definitions for the Direct2D rendering module.
|
||||||
|
*
|
||||||
|
* Version: @(#)win_d2d.h 1.0.1 2018/07/28
|
||||||
|
*
|
||||||
|
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
|
*
|
||||||
|
* Copyright 2018 Fred N. van Kempen.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with
|
||||||
|
* or without modification, are permitted provided that the
|
||||||
|
* following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the entire
|
||||||
|
* above notice, this list of conditions and the following
|
||||||
|
* disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above
|
||||||
|
* copyright notice, this list of conditions and the
|
||||||
|
* following disclaimer in the documentation and/or other
|
||||||
|
* materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* 3. Neither the name of the copyright holder nor the names
|
||||||
|
* of its contributors may be used to endorse or promote
|
||||||
|
* products derived from this software without specific
|
||||||
|
* prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
#ifndef WIN_D2D_H
|
||||||
|
# define WIN_D2D_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const vidapi_t d2d_vidapi;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /*WIN_D2D_H*/
|
||||||
Reference in New Issue
Block a user