Compare commits

...

54 commits

Author SHA1 Message Date
Fabio Cavallo (FHorse)
f3432e1f51
New Crowdin updates (#412)
* New translations en_en.ts (Polish)

* New translations en_en.ts (Polish)
2024-12-14 20:48:12 +01:00
Fabio Cavallo (FHorse)
8623f8d7a7
Update build.yml 2024-12-14 20:00:17 +01:00
Fabio Cavallo (FHorse)
3bfb2bdff7
Update build.yml 2024-12-14 19:55:57 +01:00
Fabio Cavallo (FHorse)
cff046dce6
Update build.yml
Fixed Windows artifact compilation.
2024-12-14 15:51:21 +01:00
Fabio Cavallo (FHorse)
7148e0f338
Update build.yml
Fixed Windows artifact compilation.
2024-12-14 15:44:50 +01:00
Fabio Cavallo (FHorse)
315c6d3fc4
New Crowdin updates (#408)
* New translations en_en.ts (Portuguese, Brazilian)

* New translations en_en.ts (Portuguese, Brazilian)

* New translations en_en.ts (Portuguese, Brazilian)
2024-09-01 10:23:42 +02:00
Fabio Cavallo
49f86fcf0f
Fixed a compilation warning with FFmpeg 7.0. 2024-08-25 10:22:42 +02:00
Fabio Cavallo
7fcc0d3efd
Typo. 2024-08-19 18:15:15 +02:00
Fabio Cavallo
3a49198356
Fixed tab orders. 2024-08-19 18:14:49 +02:00
Fabio Cavallo
25b0fcfd61
Typos. 2024-08-18 10:42:20 +02:00
zvova7890
7ee4b5a5f4
[Linux] Use the udev "uniq" attribute when generating the device GUID (#407) (thanks zvova7890).
It helps to avoid duplicate GUIDs when connecting two similar joysticks.
2024-08-02 09:21:06 +02:00
Fabio Cavallo (FHorse)
c6b0dcee89
New Crowdin updates (#405)
* New translations en_en.ts (Portuguese, Brazilian)

* New translations en_en.ts (Portuguese, Brazilian)

* New translations en_en.ts (Portuguese, Brazilian)

* New translations en_en.ts (Portuguese, Brazilian)
2024-08-01 16:08:11 +02:00
Fabio Cavallo
8a6b82d946
Fixed cross compilation. 2024-07-15 10:56:24 +02:00
Fabio Cavallo
d69537672f
Fixed a calloc-transposed-args warning. 2024-07-15 10:54:31 +02:00
Cosima Neidahl
6e51b1a610
Fix compatibility with Qt 6.7.1 (#403)
Upstream QTBUG-105023 fix made it mandatory that arguments to QObject::findChild[ren] calls must be Q_OBJECTs.
2024-05-31 14:48:50 +02:00
Fabio Cavallo
61406ec4f0
In the MMC5 mapper fixed the WRAM assignment for roms with the iNES 1.0 header (#402). 2024-05-25 10:40:32 +02:00
Fabio Cavallo
f540b5ba5a
[FDS] Fixed saving of the diff file if the inserted disk has a different format from the previous one. 2024-05-12 11:29:48 +02:00
Fabio Cavallo
e0074b265d
Added cpu.jammed to the save slot. 2024-05-11 15:17:40 +02:00
ChessMan14
eab01be977
Implement HLT/KIL Opcodes (#399) 2024-05-11 15:08:16 +02:00
Fabio Cavallo
5448b1515d
[FDS] Fixed initialization of fds.info structure on disk change (#396).
Thanks to TakuikaNinja for his help and support.
2024-05-11 13:08:36 +02:00
Fabio Cavallo
4bed752d5c
[FDS] Fixed IRQ Timer.
Discovered thanks to test number 15 of "fdsirqtests.fds".
2024-05-09 12:39:26 +02:00
Fabio Cavallo
ebc8f54aa8
Fixed the handling of emphasis in case background and sprite are not visible (#396). 2024-05-08 10:48:38 +02:00
Fabio Cavallo
21b02588af
[FDS] Fixed support for "Kosodate Gokko" (#396).
- Added a menu item to create empty floppy images.
- Added a visual indicator that shows when the FDS drive motor is active and whether it is reading or writing to disk:
  * green: reading data from disk
  * red: writing data to disk
  * yellow: disk head moving
  * off: drive motor off
2024-05-06 22:46:53 +02:00
Fabio Cavallo (FHorse)
6d40da439d
New translations en_en.ts (Chinese Simplified) (#395) 2024-04-12 18:31:58 +02:00
Fabio Cavallo
1936e13e17
Fixed mapper 176 (#394).
I also improved the recognition of submapper 1 for roms with INES 1.0 header.
2024-04-11 17:00:09 +02:00
Fabio Cavallo
90ec4a9500
Fixed mapper 342 (#391). 2024-04-11 09:29:39 +02:00
WolvenArch
bcb4e47a20
Update README.md (#392)
List of UNIF boards was arranged alphabetically and numbered.
2024-04-07 19:29:22 +02:00
Fabio Cavallo
e1516fcefe
Fixed compilation with FULLSCREEN_RESFREQ disabled (#388). 2024-03-23 10:34:34 +01:00
Fabio Cavallo
6ce2ceeaba
[FDS] Fixed initialization of fds.drive.mirroring (#387). 2024-03-21 12:26:02 +01:00
Fabio Cavallo
b6dc62f1e5
[NSF] Refined NMI interception (#386). 2024-03-19 01:13:11 +01:00
Fabio Cavallo
a51c9f4e0c
[NSF] "Kirby's Adventure.nsfe" tries to read the memory areas $FFFA and $FFFB even though it shouldn't since they are reserved for the NSF Player ("The vector table at $FFFA-FFFF should not be filled with code or data by the NSF. These can be overridden by hardware NSF players."). I have added the management of this eventuality (#386). 2024-03-18 15:41:49 +01:00
Fabio Cavallo (FHorse)
1c9567a245
New translations en_en.ts (Arabic (General)) (#382) 2024-03-10 12:46:48 +01:00
Fabio Cavallo
74252dea3b
[NSF Player] Fixed the status of the "Fadeout" checkbox. 2024-03-10 09:49:36 +01:00
Fabio Cavallo
80af01cfac
Typo. 2024-03-10 01:50:20 +01:00
Fabio Cavallo
c986045183
[NSF] Fixed nsf2 structure initialization when loading a file in NSFe format. 2024-03-10 01:27:37 +01:00
Fabio Cavallo
f7f4e8b7c0
[NSF Player] Improved display of author notes. 2024-03-10 01:22:38 +01:00
Fabio Cavallo
dc7c5a7392
Added support to mapper 562. 2024-03-09 21:13:51 +01:00
Fabio Cavallo
e190af6e1c
Fixed mapper 561. 2024-03-09 21:11:40 +01:00
Fabio Cavallo
cc0032d737
[NSF] Fixed display of timers when resetting the emulator (#380). 2024-03-09 12:50:44 +01:00
Fabio Cavallo
001403aa49
[NSF] Fixed Fixed RAM and WRAM initialization when changing songs (#380 and #384).
Also added the resetting of the Carry Flag without which "Layla - The Iris Missions.nsfe" does not work correctly.
2024-03-09 11:39:44 +01:00
Fabio Cavallo
8bf7379378
[NSF][FDS] Fixed wram destination pointer initialization (#383). 2024-03-07 22:46:54 +01:00
Fabio Cavallo
169e9e608e
Fixed memmap region mask initialization (#379 mapper 12). 2024-03-07 10:54:07 +01:00
Fabio Cavallo
4df298dd07
[NSF] Fixed region selection (#380). 2024-03-06 09:17:04 +01:00
Fabio Cavallo
55f6086c6e
[NSF] Fixed RAM initialization (#380). 2024-03-06 08:31:17 +01:00
Fabio Cavallo
b854e22725
Fixed mapper 17 (#379). 2024-03-05 19:22:20 +01:00
Fabio Cavallo
f69283d212
[NSF Player] Fixed a bug that prevented the display of some song titles (#377). 2024-03-04 18:06:14 +01:00
Fabio Cavallo
f6ab45b78d
[NSF Player] Some NSFe have text encoded in ISO-8859-1 instead of UTF8, improved string encoding recognition (#377). 2024-03-04 18:04:50 +01:00
Fabio Cavallo
a5ee8c5a74
[NSF Player] Fixed wrong playlist count (#377). 2024-03-04 18:03:47 +01:00
Fabio Cavallo
1395af9e50
Disabled portable mode for the AppImage (#378). 2024-03-04 08:55:58 +01:00
Fabio Cavallo
49586cd33c
[NSFe] Fixed initialization of scroll->x variable. 2024-03-03 18:11:31 +01:00
Fabio Cavallo
71a91a9314
Fixed mapper 561 (#375). 2024-03-03 14:15:14 +01:00
Fabio Cavallo
794c350852
[NSFe] Fixed song title scroll (#376). 2024-03-03 14:13:06 +01:00
Fabio Cavallo
1a2a19352b
Update io.github.punesemu.puNES.metainfo.xml. 2024-03-03 14:06:35 +01:00
Fabio Cavallo
7a20eea7eb
Update version.h. 2024-03-03 14:05:59 +01:00
62 changed files with 2258 additions and 1097 deletions

View file

@ -112,7 +112,9 @@ jobs:
- name: 'Install FFmpeg libraries'
shell: msys2 {0}
run: |
pacman --noconfirm -U http://repo.msys2.org/mingw/${{ matrix.env }}/mingw-w64-${{ matrix.env }}-ffmpeg-4.4.3-6-any.pkg.tar.zst
pacman --noconfirm -U http://repo.msys2.org/mingw/${{ matrix.env }}/mingw-w64-${{ matrix.env }}-ffmpeg4.4-4.4.4-8-any.pkg.tar.zst
sed -i -e 's,=/${{ matrix.msystem }}/..,=${prefix},' /${{ matrix.msystem }}/lib/ffmpeg4.4/pkgconfig/*.pc
cp /${{ matrix.msystem }}/lib/ffmpeg4.4/pkgconfig/*.pc /${{ matrix.msystem }}/lib/pkgconfig/.
- name: 'Environment configuration'
shell: msys2 {0}
@ -187,7 +189,7 @@ jobs:
fail-fast: false
matrix:
config:
- { os: ubuntu-20.04, cc: "gcc", cxx: "g++", env: x86_64, opts: "-DENABLE_RELEASE:BOOL=ON -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL_CG:BOOL=ON" }
- { os: ubuntu-20.04, cc: "gcc", cxx: "g++", env: x86_64, opts: "-DENABLE_RELEASE:BOOL=ON -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL_CG:BOOL=ON -DDISABLE_PORTABLE_MODE:BOOL=ON" }
steps:
- name: 'Checkout'

View file

@ -1,4 +1,19 @@
Changelog:
0.112
- Added support to mapper : 562.
- Disabled portable mode for the AppImage (#378).
- Fixed mapper : 12, 17, 561.
- [NSF] Fixed display of timers when resetting the emulator (#380).
- [NSF] Fixed Fixed RAM and WRAM initialization when changing songs (#380 and #384).
- [NSF] Fixed wram destination pointer initialization (#383).
- [NSF] Fixed region selection (#380).
- [NSF] Fixed RAM initialization (#380).
- [NSF] Fixed nsf2 structure initialization when loading a file in NSFe format.
- [NSF Player] Fixed a bug that prevented the display of some song titles (#377).
- [NSF Player] Some NSFe have text encoded in ISO-8859-1 instead of UTF8, improved string encoding recognition (#377).
- [NSF Player] Fixed wrong playlist count (#377).
- [NSF Player] Improved display of author notes.
0.111
- Rewritten mappers : All.
- Rewritten WRAM, VRAM, PRGROM, CHROM and Nametebles management.

444
README.md
View file

@ -29,46 +29,49 @@
</a>
</p>
:floppy_disk: Work in Progress (WIP) Builds [![Build status](https://github.com/punesemu/puNES/actions/workflows/build.yml/badge.svg)](https://github.com/punesemu/puNES/actions)
-----------
These executables are always updated to the latest commit:
* Linux AppImage : :link:[`x86_64`](https://nightly.link/punesemu/puNES/workflows/build/master/puNES-x86_64.AppImage.zip)
* Windows 32 bit : :link:[`OpenGL`](https://nightly.link/punesemu/puNES/workflows/build/master/punes32.wip.opengl.zip) - :link:[`D3D9`](https://nightly.link/punesemu/puNES/workflows/build/master/punes32.wip.d3d9.zip)
* Windows 64 bit : :link:[`OpenGL`](https://nightly.link/punesemu/puNES/workflows/build/master/punes64.wip.opengl.zip) - :link:[`D3D9`](https://nightly.link/punesemu/puNES/workflows/build/master/punes64.wip.d3d9.zip)
## :floppy_disk: Work in Progress (WIP) Builds [![Build status](https://github.com/punesemu/puNES/actions/workflows/build.yml/badge.svg)](https://github.com/punesemu/puNES/actions)
These executables are always updated to the latest commit:
- Linux AppImage : :link:[`x86_64`](https://nightly.link/punesemu/puNES/workflows/build/master/puNES-x86_64.AppImage.zip)
- Windows 32 bit : :link:[`OpenGL`](https://nightly.link/punesemu/puNES/workflows/build/master/punes32.wip.opengl.zip) - :link:[`D3D9`](https://nightly.link/punesemu/puNES/workflows/build/master/punes32.wip.d3d9.zip)
- Windows 64 bit : :link:[`OpenGL`](https://nightly.link/punesemu/puNES/workflows/build/master/punes64.wip.opengl.zip) - :link:[`D3D9`](https://nightly.link/punesemu/puNES/workflows/build/master/punes64.wip.d3d9.zip)
Notes:
Notes:
- WARNING save states of version 0.110 or earlier are no longer compatible.
- Due to the many changes I'm making to the core of the emulator, new bugs may have been introduced, if you find that the roms no longer work properly compared to version 0.110, please let me know.
- 32 bit versions are Windows XP compatible.
:beer: Support
-----------
## :beer: Support
If you want buy me a beer :
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Donate-EA4AAA?style=for-the-badge&logo=githubsponsors)](https://github.com/sponsors/punesemu)
[![PayPal](https://img.shields.io/badge/PayPal-Donate-blue?style=for-the-badge&logo=paypal)](https://paypal.me/punesemu)
[![kofi](https://img.shields.io/badge/Ko--Fi-Donate-orange?style=for-the-badge&logo=ko-fi)](https://ko-fi.com/punesemu)
Multilingual Support
-----------
## Multilingual Support
A big thank you to everyone who contributed to the translations:
* Arabic
* Chinese
* English
* French
* German
* Hungarian
* Italian
* Polish
* Portuguese
* Russian
* Spanish
* Turkish
- Arabic
- Chinese
- English
- French
- German
- Hungarian
- Italian
- Polish
- Portuguese
- Russian
- Spanish
- Turkish
### Help with Translations [here](https://crowdin.com/project/punes)
:camera: Screenshots
-----------
## :camera: Screenshots
<p align="center">
<img src="https://github.com/punesemu/puNES/assets/14859058/435ad06b-ec4d-4601-84d1-bf444281afe2" width="400" alt="puNES main window"/>
<img src="https://github.com/punesemu/puNES/assets/14859058/1651ed42-fc22-4d9f-945d-7869c66fb1dd" width="400" alt="puNES NSF2 Player"/>
@ -82,20 +85,21 @@ A big thank you to everyone who contributed to the translations:
<img src="https://github.com/punesemu/puNES/assets/14859058/1347fde5-bcc5-46d2-8e68-1e4875759a6e" width="800" alt="puNES Subor Virtual Keyboard"/>
</p>
:keyboard: Configuration
-----------
## :keyboard: Configuration
To run in portable mode there is 3 distinct ways:
1) If the executable is in a folder containing the puNES.cfg file.
2) Rename the executable by adding the suffix `_p`.
1. If the executable is in a folder containing the puNES.cfg file.
2. Rename the executable by adding the suffix `_p`.
- Examples: `punes.exe -> punes_p.exe` or `punes64.exe -> punes64_p.exe`
3) Run the emulator with the "--portable" option.
3. Run the emulator with the "--portable" option.
To see a list of available command-line options, start puNES with the `-h` argument.
:electric_plug: Supported Mappers
-----------
## :electric_plug: Supported Mappers
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
| 33 | 34 | 35 | 36 | 37 | 38 | | 40 | 41 | 42 | 43 |
@ -146,27 +150,191 @@ To see a list of available command-line options, start puNES with the `-h` argum
| 528 | 529 | 530 | | 532 | | 534 | | 536 | 537 | 538 |
| 539 | 540 | 541 | | 543 | | | | 547 | | |
| 550 | 551 | 552 | | 554 | 555 | 556 | 557 | 558 | 559 | 560 |
| 561 | | | | | | | | | | |
| 561 | 562 | | | | | | | | | |
## :electric_plug: UNIF boards
:electric_plug: Unif
-----------
NROM, NROM-128, NROM-256, Transformer, SLROM, UOROM, UNROM, CNROM, TLROM, TBROM, TFROM, TKROM, ANROM, AMROM, AOROM, SL1632, SC-127, CC-21, SuperHIK8in1, STREETFIGTER-GAME4IN1, A60AS, Supervision16in1, MARIO1-MALEE2, T3H53, D1038, NTBROM, SA-016-1M, VRC7, TEK90, BB, H2288, LH32, 22211, SA-72008, T4A54A, Sachen-8259D, Sachen-8259B, Sachen-8259C, Sachen-8259A, KS7032, SA-NROM, SA-72007, TC-U01-1.5M, SA-0037, SA-0036, Sachen-74LS374N, FS304, Super24in1SC03, WAIXING-FS005, FK23C, FK23CA, FC-28-5027, NovelDiamond9999999in1, JC-016-2, 8237, 8237A, N625092, Ghostbusters63in1, WAIXING-FW01, 42in1ResetSwitch, 150in1A, 212-HONG-KONG, 70in1, 70in1B, 603-5052, 43272, OneBus, DANCE, 158B, F-15, HPXX, HP2018-A, 810544-C-A1, SHERO, KOF97, YOKO, T-262, CITYFIGHT, COOLBOY, MINDKIDS, 22026, 80013-B, GS-2004, GS-2013, A65AS, DRIPGAME, BS-5, 411120-C, K-3088, GKCXIN1, 60311C, NTD-03, DRAGONFIGHTER, 13in1JY110, TF1201, 11160, 190in1, 8157, KS7057, KS7017, SMB2J, KS7031, KS7016, KS7037, TH2131-1, LH51, KS7013B, RESET-TXROM, 64in1NoRepeat, 830134C, HP898F, 830425C-4391T, K-3033, FARID_SLROM_8-IN-1, FARID_UNROM_8-IN-1, MALISB, 10-24-C-A1, RT-01, EDU2000, 12-IN-1, WS, 8-IN-1, NEWSTAR-GRM070-8IN1, CTC-09, K-3046, CTC-12IN1, SA005-A, K-3006, K-3036, TJ-03, COOLGIRL, RESETNROM-XIN1, GN-26, L6IN1, KS7012, KS7030, 830118C, G-146, 891227, KS106C, 3D-BLOCK, SB-5013, N49C-300, 820561C, M2C52A, 830752C, BS-400R, BS-4040R, K-3010, K-3071, SA-9602B, DANCE2000, EH8813A, DREAMTECH01, LH10, 900218, KS7021A, BJ-56, AX-40G, 831128C, T-230, AX5705, CHINA_ER_SAN2, 82112C, KONAMI-QTAI, AC08, S-2009
1. 3D-BLOCK
2. 8-IN-1
3. 10-24-C-A1
4. 12-IN-1
5. 13in1JY110
6. 42in1ResetSwitch
7. 64in1NoRepeat
8. 70in1
9. 70in1B
10. 150in1A
11. 158B
12. 190in1
13. 212-HONG-KONG
14. 603-5052
15. 8157
16. 8237
17. 8237A
18. 11160
19. 22026
20. 22211
21. 43272
22. 60311C
23. 80013-B
24. 82112C
25. 411120-C
26. 810544-C-A1
27. 820561C
28. 830118C
29. 830134C
30. 830425C-4391T
31. 830752C
32. 831128C
33. 891227
34. 900218
35. A60AS
36. A65AS
37. AC08
38. AMROM
39. ANROM
40. AOROM
41. AX5705
42. AX-40G
43. BB
44. BJ-56
45. BOY
46. BS-5
47. BS-400R
48. BS-4040R
49. CC-21
50. CHINA_ER_SAN2
51. CITYFIGHT
52. CNROM
53. COOLBOY
54. COOLGIRL
55. CTC-09
56. CTC-12IN1
57. D1038
58. DANCE
59. DANCE2000
60. DRAGONFIGHTER
61. DREAMTECH01
62. DRIPGAME
63. EDU2000
64. EH8813A
65. F-15
66. FARID_SLROM_8-IN-1
67. FARID_UNROM_8-IN-1
68. FC-28-5027
69. FK23C
70. FK23CA
71. FS304
72. G-146
73. Ghostbusters63in1
74. GKCXIN1
75. GN-26
76. GS-2004
77. GS-2013
78. H2288
79. HP898F
80. HP2018-A
81. HPXX
82. JC-016-2
83. K-3006
84. K-3010
85. K-3033
86. K-3036
87. K-3046
88. K-3071
89. K-3088
90. KOF97
91. KONAMI-QTAI
92. KS106C
93. KS7012
94. KS7013B
95. KS7016
96. KS7017
97. KS7021A
98. KS7030
99. KS7031
100. KS7032
101. KS7037
102. KS7057
103. L6IN1
104. LH09
105. LH10
106. LH32
107. LH51
108. M2C52A
109. MALISB
110. MARIO1-MALEE2
111. MINDKIDS
112. N49C-300
113. N625092
114. NEWSTAR-GRM070-8IN1
115. NovelDiamond9999999in1
116. NROM
117. NROM-128
118. NROM-256
119. NTBROM
120. NTD-03
121. OneBus
122. RESET-TXROM
123. RESETNROM-XIN1
124. RT-01
125. S-2009
126. SA005-A
127. SA-0036
128. SA-0037
129. SA-016-1M
130. SA-9602B
131. SA-72007
132. SA-72008
133. SA-NROM
134. Sachen-74LS374N
135. Sachen-8259A
136. Sachen-8259B
137. Sachen-8259C
138. Sachen-8259D
139. SB-5013
140. SC-127
141. SHERO
142. SL1632
143. SLROM
144. SMB2J
145. STREETFIGTER-GAME4IN1
146. Super24in1SC03
147. SuperHIK8in1
148. Supervision16in1
149. T3H53
150. T4A54A
151. T-230
152. T-262
153. TBROM
154. TC-U01-1.5M
155. TEK90
156. TF1201
157. TFROM
158. TH2131-1
159. TJ-03
160. TKROM
161. TLROM
162. Transformer
163. UNROM
164. UOROM
165. VRC7
166. WAIXING-FS005
167. WAIXING-FW01
168. WS
169. YOKO
:information_source: How to Compile
-----------
## :information_source: How to Compile
* :penguin: [Linux](#penguin-linux)
* :smiling_imp: [FreeBSD](#smiling_imp-freebsd)
* :blowfish: [OpenBSD](#blowfish-openbsd)
* :computer: [Windows](#computer-windows)
- :penguin: [Linux](#penguin-linux)
- :smiling_imp: [FreeBSD](#smiling_imp-freebsd)
- :blowfish: [OpenBSD](#blowfish-openbsd)
- :computer: [Windows](#computer-windows)
CMake Options
-----------
## CMake Options
| CMake Option | Description | Default |
|---------------------------|------------------------------------------------------------------------------------|---------|
| ------------------------- | ---------------------------------------------------------------------------------- | ------- |
| ENABLE_RELEASE | Build release version | ON |
| ENABLE_FFMPEG | Enable FFMPEG support | ON |
| ENABLE_OPENGL | Use OpenGL support instead of Direct3D 9 (only for Windows) | ON |
@ -176,71 +344,93 @@ CMake Options
| DISABLE_PORTABLE_MODE | Disable portable mode handling (useful with sandbox<br/>environments like Flatpak) | OFF |
## :penguin: Linux
<details>
<summary>Expand</summary>
#### Dependencies
* [CMake >= 3.14](https://cmake.org) ([Ninja](https://ninja-build.org) build system is optional)
* [Qt5](https://www.qt.io) or [Qt6](https://www.qt.io) with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
* [nvidia-cg](https://developer.nvidia.com/cg-toolkit)
* [alsa](https://www.alsa-project.org)
* libudev
* [libX11 and libXrandr](https://www.x.org)
* [p7zip](https://github.com/p7zip-project/p7zip) for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
* (optional) [ffmpeg libraries >= 4.0](https://ffmpeg.org) if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See [notes](#movie_camera-ffmpeg).
- [CMake >= 3.14](https://cmake.org) ([Ninja](https://ninja-build.org) build system is optional)
- [Qt5](https://www.qt.io) or [Qt6](https://www.qt.io) with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
- [nvidia-cg](https://developer.nvidia.com/cg-toolkit)
- [alsa](https://www.alsa-project.org)
- libudev
- [libX11 and libXrandr](https://www.x.org)
- [p7zip](https://github.com/p7zip-project/p7zip) for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
- (optional) [ffmpeg libraries >= 4.0](https://ffmpeg.org) if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See [notes](#movie_camera-ffmpeg).
#### Compilation of puNES
```bash
git clone https://github.com/punesemu/puNES
cd puNES
cmake -B build -G Ninja -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL_CG:BOOL=ON
cmake --build build -j2
```
if you don't want to use the Ninja build system and prefer the classic Makefile:
```bash
cmake -B build -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL_CG:BOOL=ON
make -j2
```
the executable `punes` is in the `build/src` directory.
#### Linux Debug version
If you need the debug version then you need to replace the `cmake -B build -G Ninja` command of the previous examples with the following:
```bash
cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOL=OFF [...]
cmake --build build -j2
```
or if you prefer the classic Makefile:
```bash
cmake -B build -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOL=OFF [...]
make -j2
```
where `[...]` are the other necessary options.
#### Example on how to compile on Ubuntu 22.04
```bash
sudo apt-get install git cmake ninja-build libtool build-essential pkg-config libudev-dev libasound2-dev
sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools libqt5svg5-dev nvidia-cg-toolkit libx11-dev libxrandr-dev
sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools libqt5svg5-dev nvidia-cg-toolkit libx11-dev libxrandr-dev
sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev p7zip-full
git clone https://github.com/punesemu/puNES
cd puNES
cmake -B build -G Ninja
cmake --build build -j2
```
to start the emulator
```bash
./build/src/punes
```
</details>
## :smiling_imp: FreeBSD
<details>
<summary>Expand</summary>
#### Dependencies
* [CMake >= 3.14](https://cmake.org) ([Ninja](https://ninja-build.org) build system is optional)
* [Qt5](https://www.qt.io) or [Qt6](https://www.qt.io) with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
* [sndio](http://www.sndio.org)
* [libX11 and libXrandr](https://www.x.org)
* [p7zip](https://github.com/p7zip-project/p7zip) for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
* (optional) [ffmpeg libraries >= 4.0](https://ffmpeg.org) if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See [notes](#movie_camera-ffmpeg).
- [CMake >= 3.14](https://cmake.org) ([Ninja](https://ninja-build.org) build system is optional)
- [Qt5](https://www.qt.io) or [Qt6](https://www.qt.io) with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
- [sndio](http://www.sndio.org)
- [libX11 and libXrandr](https://www.x.org)
- [p7zip](https://github.com/p7zip-project/p7zip) for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
- (optional) [ffmpeg libraries >= 4.0](https://ffmpeg.org) if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See [notes](#movie_camera-ffmpeg).
#### Compilation of puNES
```bash
sudo pkg install -y devel/cmake devel/ninja devel/pkgconf devel/git multimedia/ffmpeg audio/sndio devel/qt5-qmake
sudo pkg install -y devel/qt5-buildtools devel/qt5-core x11-toolkits/qt5-gui x11-toolkits/qt5-widgets graphics/qt5-svg
@ -250,77 +440,108 @@ cd puNES
cmake -B build -G Ninja -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
cmake --build build -j2
```
if you don't want to use the Ninja build system and prefer the classic Makefile:
```bash
cmake -B build -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
make -j2
```
the executable `punes` is in the `build/src` directory.
#### FreeBSD Debug version
If you need the debug version then you need to replace the `cmake -B Build -G Ninja` command of the previous examples with the following:
```bash
cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
cmake --build build -j2
```
or if you prefer the classic Makefile:
```bash
cmake -B build -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
make -j2
```
where `[...]` are the other necessary options.
</details>
## :blowfish: OpenBSD
<details>
<summary>Expand</summary>
#### Dependencies
* [CMake >= 3.14](https://cmake.org) ([Ninja](https://ninja-build.org) build system is optional)
* [Qt5](https://www.qt.io) or [Qt6](https://www.qt.io) with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
* [sndio](http://www.sndio.org)
* [libX11 and libXrandr](https://www.x.org)
* [p7zip](https://github.com/p7zip-project/p7zip) for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
* (optional) [ffmpeg libraries >= 4.0](https://ffmpeg.org) if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See [notes](#movie_camera-ffmpeg)
- [CMake >= 3.14](https://cmake.org) ([Ninja](https://ninja-build.org) build system is optional)
- [Qt5](https://www.qt.io) or [Qt6](https://www.qt.io) with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
- [sndio](http://www.sndio.org)
- [libX11 and libXrandr](https://www.x.org)
- [p7zip](https://github.com/p7zip-project/p7zip) for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
- (optional) [ffmpeg libraries >= 4.0](https://ffmpeg.org) if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See [notes](#movie_camera-ffmpeg)
#### Compilation of puNES
```bash
git clone https://github.com/punesemu/puNES
cd puNES
cmake -B build -G Ninja -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
cmake --build build -j2
```
if you don't want to use the Ninja build system and prefer the classic Makefile:
```bash
cmake -B build -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
make -j2
```
the executable `punes` is in the `buid/src` directory.
#### OpenBSD Debug version
If you need the debug version then you need to replace the `cmake -B Build -G Ninja` command of the previous examples with the following:
```bash
cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
cmake --build build -j2
```
or if you prefer the classic Makefile:
```bash
cmake -B build -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
make -j2
```
where `[...]` are the other necessary options.
</details>
## :computer: Windows
<details>
<summary>Expand</summary>
#### Dependencies
* [Qt5](https://www.qt.io) with OpenGL support (5.6.3 is the last if you want the support for Windows XP)
- [Qt5](https://www.qt.io) with OpenGL support (5.6.3 is the last if you want the support for Windows XP)
#### Development Environment installation
1. install [MSYS2](https://www.msys2.org/)
2. open "MSYS2 MinGW 64-bit" shell (or 32 bit if you want compile the 32 bit version of puNES)
```bash
pacman -Syu
```
3. close the MSYS2 window and run it again from Start menu
```bash
pacman -Su
pacman -S base-devel git wget p7zip unzip mingw-w64-i686-cmake mingw-w64-x86_64-cmake
@ -328,32 +549,44 @@ pacman -S perl ruby python2 mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
pacman -S mingw-w64-i686-ffmpeg mingw-w64-x86_64-ffmpeg
exit
```
4. open a new MSYS2 shell and build the necessary libraries
#### Compilation of the Qt5 libraries
5. download and unzip the sources
```bash
wget http://download.qt.io/archive/qt/5.15/5.15.8/submodules/qtbase-everywhere-opensource-src-5.15.8.zip
unzip qtbase-everywhere-opensource-src-5.15.8.zip
mv qtbase-everywhere-src-5.15.8 qt5
```
the renaming of the directory is necessary to not generate a compile-time error caused by the 255 characters maximum path length limitation on Windows, This is the typical error message you might encounter:
```code
"../../../../include/QtEventDispatcherSupport/5.15.8/QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h:1:10: fatal error: ../../../../../src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h: No such file or directory"
```
6. compile the libraries
```bash
cd qt5
echo -e "QMAKE_LFLAGS += -static -static-libgcc\nDEFINES += QT_STATIC_BUILD\n" >> mkspecs/win32-g++/qmake.conf
./configure.bat -prefix $MINGW_PREFIX -extprefix $MINGW_PREFIX -bindir $MINGW_PREFIX/lib/qt5/bin -headerdir $MINGW_PREFIX/include/qt5 -libdir $MINGW_PREFIX/lib/qt5 -archdatadir $MINGW_PREFIX/lib/qt5 -plugindir $MINGW_PREFIX/lib/qt5/plugins -libexecdir $MINGW_PREFIX/lib/qt5/bin -datadir $MINGW_PREFIX/share/qt5 -docdir $MINGW_PREFIX/share/doc/qt5 -translationdir $MINGW_PREFIX/share/qt5/translations -sysconfdir $MINGW_PREFIX/etc/xdg -examplesdir $MINGW_PREFIX/share/qt5/examples -testsdir $MINGW_PREFIX/share/qt5/tests -platform win32-g++ -nomake examples -nomake tests -nomake tools -no-compile-examples -release -opensource -confirm-license -static -c++std c++17 -sse2 -static-runtime -make libs -no-ltcg -no-dbus -no-accessibility -no-inotify -no-iconv -no-icu -no-openssl -no-system-proxies -no-cups -no-fontconfig -no-zstd -opengl desktop -no-angle -gif -ico -qt-libpng -qt-libjpeg -qt-pcre -qt-zlib -qt-freetype
make
```
7. and finally install them
```bash
make install
cp -v $MINGW_PREFIX/lib/qt5/pkgconfig/* $MINGW_PREFIX/lib/pkgconfig/.
cd ..
```
8. now it's time for the SVG module...
```bash
wget http://download.qt.io/archive/qt/5.15/5.15.8/submodules/qtsvg-everywhere-opensource-src-5.15.8.zip
unzip qtsvg-everywhere-opensource-src-5.15.8.zip
@ -365,7 +598,9 @@ make install
cp -v $MINGW_PREFIX/lib/qt5/pkgconfig/* $MINGW_PREFIX/lib/pkgconfig/.
cd ..
```
9. ...and for the tools
```bash
wget http://download.qt.io/archive/qt/5.15/5.15.8/submodules/qttools-everywhere-opensource-src-5.15.8.zip
unzip qttools-everywhere-opensource-src-5.15.8.zip
@ -376,66 +611,83 @@ make
make install
cd ..
```
#### Compilation of puNES
10. Now you have everything you need to compile correctly puNES
```bash
git clone https://github.com/punesemu/puNES
cd puNES
```
if you want D3D9 version :
```bash
cmake -B build -G Ninja -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL:BOOL=OFF
cmake --build build -j2
```
otherwise :
```bash
cmake -B build -G Ninja -DENABLE_FFMPEG:BOOL=ON
cmake --build build -j2
```
The executable `punes.exe` is in the `build/src` directory but in order to run it you need the following dlls:
* 7z.dl
* avcodec-58.dll
* avformat-58.dll
* avutil-56.dll
* cg.dll
* cgD3D9.dll (only for D3D9 version)
* cgGL.dll (only for OpenGL version)
* libwinpthread-1.dll
* swresample-3.dll
* swscale-5.dll
- 7z.dl
- avcodec-58.dll
- avformat-58.dll
- avutil-56.dll
- cg.dll
- cgD3D9.dll (only for D3D9 version)
- cgGL.dll (only for OpenGL version)
- libwinpthread-1.dll
- swresample-3.dll
- swscale-5.dll
that you can download here : :link:[`64bit`](https://www.dropbox.com/s/d632cjezybz6a74/puNES_x86_64_dlls.zip?dl=1) version or :link:[`32bit`](https://www.dropbox.com/s/ye00129nyacdl05/puNES_i686_dlls.zip?dl=1) version.
#### Windows Debug version
If you need the debug version then you need to replace the `cmake -B build -G Ninja` command of the previous examples with the following:
```bash
cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
```
where `[...]` are the other necessary options.
</details>
-----------
---
#### :movie_camera: FFmpeg
It is always possible to disable audio/video recording support by specifying the `configure` parameter `--without-ffmpeg`.
If the installed version is lower than 4.0 the support will be disabled automatically.
Supported audio recording formats:
* WAV Audio
* MP3 Audio ([lame](https://xiph.org/vorbis/)) (*)
* AAC Audio
* Flac Audio
* Ogg Audio ([vorbis](https://xiph.org/vorbis/)) (*)
* Opus Audio ([libopus](https://www.opus-codec.org)) (*)
- WAV Audio
- MP3 Audio ([lame](https://xiph.org/vorbis/)) (\*)
- AAC Audio
- Flac Audio
- Ogg Audio ([vorbis](https://xiph.org/vorbis/)) (\*)
- Opus Audio ([libopus](https://www.opus-codec.org)) (\*)
Supported video recording formats:
* MPEG 1 Video
* MPEG 2 Video
* MPEG 4 Video
* MPEG H264 Video ([libx264](https://www.videolan.org/developers/x264.html)) (*)
* High Efficiency Video Codec ([libx265](https://www.videolan.org/developers/x265.html)) (*)
* WebM Video ([libvpx](https://www.webmproject.org/code)) (*)
* Windows Media Video
* AVI FF Video
* AVI Video
(*) if compiled in FFmpeg.
- MPEG 1 Video
- MPEG 2 Video
- MPEG 4 Video
- MPEG H264 Video ([libx264](https://www.videolan.org/developers/x264.html)) (\*)
- High Efficiency Video Codec ([libx265](https://www.videolan.org/developers/x265.html)) (\*)
- WebM Video ([libvpx](https://www.webmproject.org/code)) (\*)
- Windows Media Video
- AVI FF Video
- AVI Video
(\*) if compiled in FFmpeg.

View file

@ -7,6 +7,7 @@ set(TOOLCHAIN_PREFIX i686-w64-mingw32)
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
set(PKG_CONFIG_EXECUTABLE ${TOOLCHAIN_PREFIX}-pkg-config)
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})

View file

@ -7,6 +7,7 @@ set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
set(PKG_CONFIG_EXECUTABLE ${TOOLCHAIN_PREFIX}-pkg-config)
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})

View file

@ -95,7 +95,7 @@
</releases>
<url type="homepage">https://github.com/punesemu/puNES</url>
<url type="bugtracker">https://github.com/punesemu/puNES/issues</url>
<url type="donation">https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=QPPXNRL5NAHDC</url>
<url type="donation">https://github.com/sponsors/punesemu</url>
<url type="translate">https://crowdin.com/project/punes</url>
<categories>
<category>Game</category>

View file

@ -477,6 +477,7 @@ set(core_srcs
core/mappers/mapper_559.c
core/mappers/mapper_560.c
core/mappers/mapper_561.c
core/mappers/mapper_562.c
core/mappers/mapper_FDS.c
core/mappers/mapper_GameGenie.c
core/mappers/mapper_NSF.c

View file

@ -652,6 +652,11 @@ void cpu_exe_op(BYTE nidx) {
nes[nidx].c.cpu.base_opcode_cycles = table_opcode_cycles[(BYTE)nes[nidx].c.cpu.opcode];
mod_cycles_op(+=, nes[nidx].c.cpu.base_opcode_cycles);
//Jam the cpu if necessary
if (nes[nidx].c.cpu.jammed) {
return;
}
// ... e la eseguo
switch (nes[nidx].c.cpu.opcode) {
@ -957,28 +962,30 @@ void cpu_exe_op(BYTE nidx) {
case 0xBB: ABX(RD_OP, _CYW(LAS), nes[nidx].c.cpu.YR) break; // LAS $ABS,Y
case 0x9B: ABX(WR_OP, XAS, nes[nidx].c.cpu.YR) break; // XAS $ABS,Y
case 0x02: // JAM
case 0x12: // JAM
case 0x22: // JAM
case 0x32: // JAM
case 0x42: // JAM
case 0x52: // JAM
case 0x62: // JAM
case 0x72: // JAM
case 0x92: // JAM
case 0xB2: // JAM
case 0xD2: // JAM
case 0xF2: // JAM
//KIL/HLT instructions. Set the cpu to be jammed
case 0x02:
case 0x12:
case 0x22:
case 0x32:
case 0x42:
case 0x52:
case 0x62:
case 0x72:
case 0x92:
case 0xB2:
case 0xD2:
case 0xF2:
default:
if (!info.no_rom && !info.first_illegal_opcode) {
log_warning(uL("cpu;alert PC = 0x%04X, CODEOP = 0x%02X"), (nes[nidx].c.cpu.PC.w - 1), nes[nidx].c.cpu.opcode);
gui_overlay_info_append_msg_precompiled(4, NULL);
info.first_illegal_opcode = TRUE;
}
nes[nidx].c.cpu.jammed = 1;
nes[nidx].c.cpu.cycles = 0;
break;
case 0x100: IMP(RD_OP, NMI) break; // NMI
case 0x200: IMP(RD_OP, IRQ(nes[nidx].c.cpu.SR & 0xEF)) break; // IRQ
case OP_NMI: IMP(RD_OP, NMI) break; // NMI
case OP_IRQ: IMP(RD_OP, IRQ(nes[nidx].c.cpu.SR & 0xEF)) break; // IRQ
}
// se presenti eseguo i restanti cicli di PPU e APU
@ -1061,6 +1068,7 @@ void cpu_turn_on(BYTE nidx) {
nes[nidx].c.cpu.opcode_cycle = 0;
nes[nidx].c.cpu.double_wr = 0;
nes[nidx].c.cpu.double_rd = 0;
nes[nidx].c.cpu.jammed = 0;
}
memset(&nes[nidx].c.nmi, 0x00, sizeof(_nmi));
memset(&nes[nidx].c.irq, 0x00, sizeof(_irq));

View file

@ -27,6 +27,8 @@ enum interrupt_types {
INT_NMI = 0xFFFA,
INT_RESET = 0xFFFC,
INT_IRQ = 0xFFFE,
OP_NMI = 0x100,
OP_IRQ = 0x200,
APU_IRQ = 0x01,
DMC_IRQ = 0x02,
EXT_IRQ = 0x04,
@ -86,6 +88,8 @@ typedef struct _cpu {
WORD base_opcode_cycles;
// buffer di lettura
BYTE openbus;
//Set to true by KIL/HLT instruction
BYTE jammed;
} _cpu;
typedef struct _irq {
BYTE high;

View file

@ -474,13 +474,18 @@ INLINE static void nsf_rd_mem(BYTE nidx, WORD address, BYTE made_tick) {
case 0xFFFA:
if (nsf.state & NSF_CHANGE_SONG) {
nes[nidx].c.cpu.openbus = NSF_ROUTINE_NSF_INIT & 0xFF;
} else {
return;
} else if (nes[nidx].c.cpu.opcode == OP_NMI) {
nes[nidx].c.cpu.openbus = NSF_ROUTINE_NMI & 0xFF;
return;
}
return;
break;
case 0xFFFB:
nes[nidx].c.cpu.openbus = NSF_ROUTINE_START >> 8;
return;
if ((nsf.state & NSF_CHANGE_SONG) || (nes[nidx].c.cpu.opcode == OP_NMI)) {
nes[nidx].c.cpu.openbus = NSF_ROUTINE_START >> 8;
return;
}
break;
case 0xFFFC:
nes[nidx].c.cpu.openbus = NSF_ROUTINE_RESET & 0xFF;
return;
@ -695,7 +700,6 @@ INLINE static BYTE fds_rd_mem(BYTE nidx, WORD address, BYTE made_tick) {
// bit 1 (trasfer flag)
nes[nidx].c.cpu.openbus |= fds.drive.transfer_flag;
// bit 2 e 3 non settati
// TODO : bit 4 (CRC control : 0 passato, 1 errore)
nes[nidx].c.cpu.openbus |= (fds.drive.crc ? 0x10 : 0x00);
// bit 5 non settato
// bit 6 (end of head)
@ -720,9 +724,12 @@ INLINE static BYTE fds_rd_mem(BYTE nidx, WORD address, BYTE made_tick) {
fds.drive.transfer_flag = FALSE;
nes[nidx].c.irq.high &= ~FDS_DISK_IRQ;
#if !defined (RELEASE)
//printf("0x%04X 0x%02X [0x%04X] 0x%04X %d %d\n", address, nes[nidx].c.cpu.openbus,
// fds.info.sides[fds.drive.side_inserted].data[fds.drive.disk_position], nes[nidx].c.cpu.opcode_PC,
// fds.drive.disk_position, nes[nidx].c.irq.high);
//printf("0x%04X 0x%02X [0x%04X] 0x%04X %d %d\n",
// address, nes[nidx].c.cpu.openbus,
// fds.info.sides[fds.drive.side_inserted].data[fds.drive.disk_position],
// nes[nidx].c.cpu.opcode_PC,
// fds.drive.disk_position,
// nes[nidx].c.irq.high);
#endif
return (TRUE);
}
@ -744,12 +751,13 @@ INLINE static BYTE fds_rd_mem(BYTE nidx, WORD address, BYTE made_tick) {
nes[nidx].c.cpu.openbus |= fds.info.write_protected;
#if !defined (RELEASE)
//printf("%5d - %3d - %3d : 0x%04X 0x%02X %d %d %d %d\n",
//printf("%5d - %3d - %3d : 0x%04X 0x%02X %d %d %d %d %d\n",
// nes[nidx].p.ppu.frames,
// nes[nidx].p.ppu.frame_y,
// nes[nidx].p.ppu.frame_x,
// address, nes[nidx].c.cpu.openbus, fds.drive.disk_ejected, fds.drive.scan,
// fds.drive.delay_insert, fds.drive.disk_position);
// address, nes[nidx].c.cpu.openbus,
// fds.drive.end_of_head, fds.drive.transfer_reset,
// fds.drive.motor_started, fds.drive.io_mode, fds.drive.disk_position);
#endif
if (fds_auto_insert_enabled() && !fds.auto_insert.r4032.disabled && !fds.auto_insert.delay.dummy) {
if (!fds.auto_insert.r4032.frames) {
@ -762,10 +770,10 @@ INLINE static BYTE fds_rd_mem(BYTE nidx, WORD address, BYTE made_tick) {
if (diff < 70) {
if (!fds.drive.scan && (++fds.auto_insert.r4032.checks > FDS_AUTOINSERT_R4032_MAX_CHECKS)) {
// - 19 Neunzehn (1988)(Soft Pro)(J).fds (il controllo del r4032 e' mooooolto lento)
// - Dandy (19xx)(Pony Canyon)(J).fds
// - Zelda no Densetsu - The Hyrule Fantasy (1986)(Nintendo)(J).fds
// - Ao no Senritsu (1987)(Gakken)(J).fds
// - Bishojou SF Alien Battle (19xx)(Hacker International)(J)(Unl)[b].fds
// - Dandy (19xx)(Pony Canyon)(J).fds
// - Zelda no Densetsu - The Hyrule Fantasy (1986)(Nintendo)(J).fds
fds_disk_op(FDS_DISK_EJECT, 0, TRUE);
gui_update_fds_menu();
fds.auto_insert.delay.dummy = fds.info.cycles_dummy_delay;
@ -1851,7 +1859,7 @@ INLINE static void nsf_wr_mem(BYTE nidx, WORD address, BYTE value) {
bank = (address & 0x01);
address = (address & 0x000F) << 12;
memmap_wram_4k(nidx, MMCPU(address), bank);
dst = memmap_chunk_pnt(nidx, address);
dst = memmap_chunk_pnt(nidx, MMCPU(address));
if (dst) memcpy(dst, prgrom_pnt_byte(value << 12), S4K);
}
return;
@ -1863,12 +1871,12 @@ INLINE static void nsf_wr_mem(BYTE nidx, WORD address, BYTE value) {
case 0x5FFD:
case 0x5FFE:
case 0x5FFF:
value = prgrom_control_bank(S4K, value);
if (nsf.sound_chips.fds && (address <= 0x5FFD)) {
value = prgrom_control_bank(S4K, value);
bank = (address & 0x07);
address = (address & 0x000F) << 12;
memmap_wram_4k(nidx, MMCPU(address), bank + 2);
dst = memmap_chunk_pnt(nidx, address);
dst = memmap_chunk_pnt(nidx, MMCPU(address));
if (dst) memcpy(dst, prgrom_pnt_byte(value << 12), S4K);
return;
}
@ -1945,7 +1953,7 @@ INLINE static BYTE fds_wr_mem(BYTE nidx, WORD address, BYTE value) {
// |+- Enable disk I/O registers
// +-- Enable sound I/O registers
#if !defined (RELEASE)
//printf("0x%04X 0x%02X %d %d\n", address, value, fds.drive.disk_ejected, fds.drive.delay);
//printf("0x%04X 0x%02X %d %d\n", address, value, fds.drive.disk_ejected, fds.drive.io_mode);
#endif
fds.drive.enabled_dsk_reg = value & 0x01;
fds.drive.enabled_snd_reg = value & 0x02;
@ -1996,18 +2004,14 @@ INLINE static BYTE fds_wr_mem(BYTE nidx, WORD address, BYTE value) {
// nes[nidx].p.ppu.frames,
// nes[nidx].p.ppu.frame_y,
// nes[nidx].p.ppu.frame_x,
// address, value, fds.drive.motor_on, fds.drive.scan,
// address, value,
// fds.drive.motor_started,
// fds.drive.scan,
// fds.drive.delay_insert, fds.drive.disk_position);
#endif
if (fds.drive.enabled_dsk_reg) {
fds.drive.motor_on = value & 0x01;
if (!fds.drive.transfer_reset && (value & 0x02)) {
fds.drive.motor_started = TRUE;
}
fds.drive.transfer_reset = value & 0x02;
if (!fds.drive.transfer_reset || !fds.drive.motor_on) {
fds.drive.motor_started = FALSE;
}
fds.drive.io_mode = value & 0x04;
fds.drive.mirroring = value & 0x08;
if (fds.drive.mirroring) {
@ -2028,11 +2032,7 @@ INLINE static BYTE fds_wr_mem(BYTE nidx, WORD address, BYTE value) {
fds.drive.mark_finded = FALSE;
}
fds.drive.irq_disk_enabled = value & 0x80;
// "Akuu Senki Raijin (Japan) (Disk Writer)" (sporcare lo screen).
fds.drive.delay_8bit = fds.info.cycles_8bit_delay;
}
fds.drive.transfer_flag = FALSE;
nes[nidx].c.irq.high &= ~FDS_DISK_IRQ;
return (TRUE);
}

View file

@ -43,11 +43,11 @@
#include "recent_roms.h"
#include "../../c++/crc/crc.h"
#include "gui.h"
#include "nes20db.h"
#include "video/effects/pause.h"
#include "video/effects/tv_noise.h"
#if defined (FULLSCREEN_RESFREQ)
#include "video/gfx_monitor.h"
#include "nes20db.h"
#endif
#define RS_SCALE (1.0f / (1.0f + (float)RAND_MAX))
@ -1513,7 +1513,7 @@ void emu_initial_ram(BYTE *ram, unsigned int length) {
return;
}
for (i = 0; i < length; i++) {
ram[i] = cfg->initial_ram_value == IRV_0X00
ram[i] = (info.mapper.id == NSF_MAPPER) || (cfg->initial_ram_value == IRV_0X00)
? 0x00
: cfg->initial_ram_value == IRV_0XFF
? 0xFF

View file

@ -90,12 +90,12 @@ typedef struct _fds_info_block {
BYTE kgk;
} _fds_info_block;
BYTE fds_to_image(_fds_info *finfo);
BYTE fds_to_image(uTCHAR *file, _fds_info *finfo);
uTCHAR *fds_bcd_data(BYTE *bcd);
void fds_free_fds_info(void);
BYTE fds_examine_block(const BYTE *src, uint32_t position, _fds_info_block *fb);
void fds_control_autoinsert(_fds_sinfo *sinfo);
void fds_diff_file_name(uTCHAR *dst, size_t lenght);
void fds_diff_file_name(uTCHAR *file, BYTE format, uTCHAR *dst, size_t len_buffer_dst);
void fds_image_sinfo(BYTE side, _fds_sinfo *sinfo);
void fds_image_memset(BYTE *dst, BYTE value, uint32_t lenght);
void fds_image_memcpy(const BYTE *src, BYTE *dst, uint32_t lenght);
@ -115,7 +115,6 @@ void fds_init(void) {
fds.side.change.new_side = 0xFF;
fds.drive.disk_ejected = TRUE;
fds.drive.motor_on = TRUE;
fds.drive.enabled_dsk_reg = 0x01;
fds.drive.enabled_snd_reg = 0x02;
}
@ -221,10 +220,11 @@ BYTE fds_load_rom(BYTE format) {
fds.info.expcted_sides = fds.info.total_sides;
fds.info.write_protected = 0x00;
fds.info.cycles_8bit_delay = emu_ms_to_cpu_cycles(FDS_8BIT_MS_DELAY);
fds.info.cycles_insert_delay = emu_ms_to_cpu_cycles(FDS_INSERT_MS_DELAY);
fds.info.cycles_dummy_delay = emu_ms_to_cpu_cycles(FDS_OP_SIDE_MS_DELAY);
// converto nel mio formato immagine
if (fds_to_image(&fds.info)) {
if (fds_to_image(&info.rom.file[0], &fds.info)) {
return (EXIT_ERROR);
}
@ -329,7 +329,7 @@ fds_load_bios_founded:
return (EXIT_OK);
}
BYTE fds_create_empty_disk(BYTE format, BYTE type, BYTE double_side, uTCHAR *file) {
BYTE fds_create_empty_disk(uTCHAR *file, BYTE format, BYTE type, BYTE double_side) {
BYTE total_sides = double_side ? 2 : 1, *mfds = NULL;
size_t size = (type == FDS_TYPE_FDS ? 16 : 0) + (fds_disk_side_size(format) * total_sides);
FILE *fp = NULL;
@ -368,6 +368,8 @@ BYTE fds_change_disk(uTCHAR *file) {
_fds_info finfo;
FILE *fp = NULL;
fds_free_fds_info();
memset(&finfo, 0x00, sizeof(_fds_info));
umemset(&path[0], 0x00, usizeof(path));
ustrncpy(path, file, usizeof(path) - 1);
@ -448,11 +450,13 @@ BYTE fds_change_disk(uTCHAR *file) {
finfo.expcted_sides = finfo.total_sides;
finfo.write_protected = 0x00;
finfo.enabled = fds.info.enabled;
finfo.writings_occurred = FALSE;
finfo.cycles_8bit_delay = fds.info.cycles_8bit_delay;
finfo.cycles_insert_delay = fds.info.cycles_insert_delay;
finfo.cycles_dummy_delay = fds.info.cycles_dummy_delay;
// converto nel mio formato immagine
if (fds_to_image(&finfo)) {
if (fds_to_image(file, &finfo)) {
free(finfo.data);
if (finfo.image) {
free(finfo.image);
@ -465,7 +469,6 @@ BYTE fds_change_disk(uTCHAR *file) {
info.format = finfo.format;
ustrncpy(info.rom.file, path, usizeof(info.rom.file));
fds_free_fds_info();
memcpy(&fds.info, &finfo, sizeof(_fds_info));
fds_info();
@ -561,7 +564,11 @@ fds_disk_op_start:
case FDS_DISK_EJECT:
fds.drive.disk_ejected = TRUE;
fds.drive.scan = FALSE;
fds.drive.end_of_head = 0x40;
fds.drive.motor_on = 0x01;
fds.drive.transfer_reset = 0x02;
fds.drive.motor_started = FALSE;
fds.drive.delay_8bit = 0;
fds.auto_insert.r4032.frames = 0;
fds.auto_insert.r4032.checks = 0;
if (!quiet) {
@ -580,8 +587,12 @@ fds_disk_op_start:
fds.drive.mark_finded = FALSE;
fds.drive.disk_ejected = FALSE;
fds.drive.scan = FALSE;
fds.drive.end_of_head = 0x40;
fds.drive.motor_on = 0x01;
fds.drive.transfer_reset = 0x02;
fds.drive.motor_started = FALSE;
fds.drive.delay_insert = 32768;
fds.drive.delay_8bit = 0;
fds.drive.delay_insert = fds.info.cycles_insert_delay;
fds.auto_insert.r4032.frames = 0;
fds.auto_insert.r4032.checks = 0;
if (!quiet) {
@ -656,7 +667,7 @@ BYTE fds_from_image_to_file(uTCHAR *file, BYTE format, BYTE type) {
{
uTCHAR diff[LENGTH_FILE_NAME_LONG];
fds_diff_file_name(&diff[0], usizeof(diff));
fds_diff_file_name(&info.rom.file[0], fds.info.format, &diff[0], usizeof(diff));
uremove(diff);
}
return (EXIT_OK);
@ -697,7 +708,7 @@ uint32_t fds_image_side_size(void) {
return (FDS_IMAGE_SIDE_SIZE);
}
BYTE fds_to_image(_fds_info *finfo) {
BYTE fds_to_image(uTCHAR *file, _fds_info *finfo) {
BYTE *mfds = NULL, *pointer = finfo->data;
if (finfo->image) {
@ -707,14 +718,14 @@ BYTE fds_to_image(_fds_info *finfo) {
// applico la diff
{
uTCHAR file[LENGTH_FILE_NAME_LONG];
uTCHAR diff[LENGTH_FILE_NAME_LONG];
fds_diff_file_name(&file[0], usizeof(file));
if (emu_file_exist(file) == EXIT_OK) {
fds_diff_file_name(file, finfo->format, &diff[0], usizeof(diff));
if (emu_file_exist(diff) == EXIT_OK) {
mfds = malloc(finfo->total_size);
if (mfds) {
memcpy(mfds, finfo->data, finfo->total_size);
mfds = fds_read_ips(mfds, finfo->total_size, file);
mfds = fds_read_ips(mfds, finfo->total_size, diff);
}
if (!mfds) {
log_error(uL("FDS;error on reading diff file"));
@ -792,7 +803,7 @@ BYTE fds_to_image(_fds_info *finfo) {
fib.blength = finfo->protection.magic_card_trainer
? 0x200
: finfo->protection.kgk ? 0x500 : finfo->protection.quick_hunter ? 0x3000 : 0;
: finfo->protection.kgk ? 0x2500 : finfo->protection.quick_hunter ? 0x3000 : 0;
// indico l'inizio del blocco
fds_image_memset(&dst[size], FDS_DISK_BLOCK_MARK, 1);
size += 1;
@ -907,7 +918,7 @@ void fds_free_fds_info(void) {
if (fds.info.writings_occurred) {
uTCHAR file[LENGTH_FILE_NAME_LONG];
fds_diff_file_name(&file[0], usizeof(file));
fds_diff_file_name(&info.rom.file[0], fds.info.format, &file[0], usizeof(file));
if (cfg->fds_write_mode == FDS_WR_ORIGINAL_FILE) {
fds_from_image_to_file(info.rom.file, fds.info.format, fds.info.type);
} else {
@ -1084,13 +1095,13 @@ void fds_control_autoinsert(_fds_sinfo *sinfo) {
}
}
}
void fds_diff_file_name(uTCHAR *dst, size_t lenght) {
void fds_diff_file_name(uTCHAR *file, BYTE format, uTCHAR *dst, size_t len_buffer_dst) {
uTCHAR ext[10], basename[255], *last_dot = NULL;
umemset(dst, 0x00, lenght);
gui_utf_basename(info.rom.file, basename, usizeof(basename));
usnprintf(dst, lenght, uL("" uPs("") DIFF_FOLDER "/" uPs("")), gui_data_folder(), basename);
usnprintf(ext, usizeof(ext), uL("" uPs("")), (fds.info.format == QD_FORMAT ? uL(".ipq") : uL(".ipf")));
umemset(dst, 0x00, len_buffer_dst);
gui_utf_basename(file, basename, usizeof(basename));
usnprintf(dst, len_buffer_dst, uL("" uPs("") DIFF_FOLDER "/" uPs("")), gui_data_folder(), basename);
usnprintf(ext, usizeof(ext), uL("" uPs("")), (format == QD_FORMAT ? uL(".ipq") : uL(".ipf")));
// rintraccio l'ultimo '.' nel nome
last_dot = ustrrchr(dst, uL('.'));
@ -1109,7 +1120,7 @@ void fds_image_sinfo(BYTE side, _fds_sinfo *sinfo) {
memset(sinfo, 0x00, sizeof(_fds_sinfo));
for (position = 0; position < fds_disk_side_size(fds.info.format);) {
BYTE block = src[position], stop = FALSE;;
BYTE block = src[position], stop = FALSE;
uint32_t blength = 1;
switch (block) {
@ -1414,7 +1425,7 @@ BYTE fds_create_ips(const BYTE *d1, const size_t size1, const BYTE *d2, const si
fwrite("PATCH", 5, 1, fp);
fsize += 5;
while ((i < size1) || (i < size2)) {
while ((i < size1) && (i < size2)) {
size_t length = 0;
BYTE rle = TRUE;

View file

@ -50,7 +50,7 @@ enum fds_misc {
FDS_MIN_LAG_FRAMES = 20,
FDS_IMAGE_SIDE_SIZE = 75500,
DISK_FDS_SIDE_SIZE = 65500,
DISK_QD_SIDE_SIZE = 65536
DISK_QD_SIDE_SIZE = 65536,
};
// https://www.chrismcovell.com/fds-lister.html
@ -63,6 +63,8 @@ enum fds_misc {
// Aspic (1988)(Bothtec)(J) necessita di almeno 1500 ms
// Pulsar no Hikari - Space Wars Simulation (Japan) di almeno 1600 ms
#define FDS_OP_SIDE_MS_DELAY 1600.0f
// Kosodate Gokko (Japan) (Unl) ha un delay di 78 ms
#define FDS_INSERT_MS_DELAY 74.0f
#define fds_auto_insert_enabled() (cfg->fds_switch_side_automatically & !fds.auto_insert.disabled & !fds.bios.first_run)
#define fds_reset_envelope_counter(env) (fds.snd.envelope.speed << 3) * (fds.snd.env.speed + 1)
@ -99,6 +101,7 @@ typedef struct _fds_info {
BYTE last_operation;
BYTE frame_insert;
uint32_t cycles_8bit_delay;
uint32_t cycles_insert_delay;
uint32_t cycles_dummy_delay;
_fds_info_protection protection;
_fds_info_side sides[20];
@ -234,7 +237,7 @@ EXTERNC void fds_init(void);
EXTERNC void fds_quit(void);
EXTERNC BYTE fds_load_rom(BYTE format);
EXTERNC BYTE fds_load_bios(void);
EXTERNC BYTE fds_create_empty_disk(BYTE format, BYTE type, BYTE double_side, uTCHAR *file);
EXTERNC BYTE fds_create_empty_disk(uTCHAR *file, BYTE format, BYTE type, BYTE double_side);
EXTERNC BYTE fds_change_disk(uTCHAR *file);
EXTERNC void fds_info(void);
EXTERNC void fds_info_side(BYTE side);

View file

@ -154,6 +154,19 @@ void js_guid_create(_js_device *jdev) {
(*(word + 5)) = jdev->usb.product_id - 300;
(*(word + 6)) = jdev->usb.version;
(*(word + 7)) = jdev->usb.version - 400;
#if defined (__linux__)
{
BYTE *byte = (BYTE *)&word[2];
int idx = 0;
for (const char *s = jdev->uniq; (*s); ++s) {
byte[idx++] ^= (*s);
if (idx > 11) {
idx = 0;
}
}
}
#endif
} else {
word += 2;
memcpy((char *)word, (char *)jdev->desc, sizeof(jdev->guid.data) - 4);

View file

@ -161,6 +161,9 @@ typedef struct _js_device {
int size;
} report;
#endif
#endif
#if defined (__linux__)
uTCHAR uniq[64];
#endif
// comuni
enum _js_gamepad_type type;

View file

@ -1297,6 +1297,9 @@ BYTE map_init(void) {
case 561:
map_init_561();
break;
case 562:
map_init_562();
break;
default:
gui_overlay_info_append_msg_precompiled(11, NULL);
EXTCL_CPU_WR_MEM(000);
@ -1382,4 +1385,4 @@ void map_internal_struct_init(BYTE *strct, size_t size) {
}
void map_internal_struct_quit(void) {
memset(&mapper.structs, 0x00, sizeof(_mapper_int_structs));
}
}

View file

@ -411,6 +411,7 @@
#include "mappers/mapper_559.h"
#include "mappers/mapper_560.h"
#include "mappers/mapper_561.h"
#include "mappers/mapper_562.h"
#include "mappers/mapper_FDS.h"
#include "mappers/mapper_GameGenie.h"
#include "mappers/mapper_NSF.h"

View file

@ -96,6 +96,18 @@ void map_init_005(void) {
m005.snd.S4.length.value = 0;
}
// Because no ExROM game is known to write PRG-RAM with one bank value and then attempt
// to read back the same data with a different bank value, emulating the PRG-RAM as 64K at all times
// can be used as a compatible superset for all games.
if (info.format == iNES_1_0) {
if (info.mapper.battery) {
wram_set_nvram_size(S16K);
wram_set_ram_size(S48K);
} else {
wram_set_ram_size(S64K);
}
}
info.mapper.extend_wr = TRUE;
nes[0].irql2f.present = TRUE;
}

View file

@ -30,280 +30,262 @@ INLINE static void mirroring_fix_006(void);
INLINE static void irq_clock_006(BYTE nidx);
const BYTE initial_state[0x1000] = {
0x20, 0x03, 0x70, 0x6C, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xDD, 0x54, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x2C, 0x00, 0x45, 0x30, 0x19, 0x50, 0x17, 0x2C, 0x2F,
0x50, 0x10, 0x0E, 0x8D, 0x44, 0x58, 0xA5, 0xFA, 0x0A, 0x09, 0xE0, 0x8D, 0xFD, 0x42, 0xAD,
0x44, 0x58, 0x28, 0x4C, 0x11, 0x11, 0x8D, 0x44, 0x58, 0x8E, 0x45, 0x58, 0x8C, 0x46, 0x58,
0xBA, 0x8E, 0x47, 0x58, 0xAD, 0x00, 0x58, 0x8D, 0x40, 0x58, 0x29, 0x7F, 0x8D, 0x00, 0x20,
0xAD, 0x01, 0x58, 0x8D, 0x41, 0x58, 0xAD, 0x00, 0x45, 0x8D, 0x42, 0x58, 0xAD, 0x01, 0x45,
0x8D, 0x43, 0x58, 0xA2, 0x1F, 0xBD, 0x00, 0x50, 0x9D, 0x48, 0x58, 0xBD, 0x00, 0x55, 0x9D,
0x68, 0x58, 0xCA, 0x10, 0xF1, 0xA9, 0x00, 0x8D, 0x01, 0x45, 0x8D, 0x10, 0x40, 0x8D, 0x11,
0x40, 0x8D, 0x15, 0x40, 0xA9, 0x01, 0x8D, 0x31, 0x50, 0x20, 0xCE, 0x53, 0xAD, 0xCA, 0x53,
0xF0, 0xF8, 0xA9, 0x72, 0x8D, 0x00, 0x45, 0xA2, 0x00, 0xB5, 0x00, 0x9D, 0x00, 0x60, 0xBD,
0x00, 0x01, 0x9D, 0x00, 0x61, 0xBD, 0x00, 0x02, 0x9D, 0x00, 0x62, 0xBD, 0x00, 0x03, 0x9D,
0x00, 0x63, 0xBD, 0x00, 0x04, 0x9D, 0x00, 0x64, 0xBD, 0x00, 0x05, 0x9D, 0x00, 0x65, 0xBD,
0x00, 0x06, 0x9D, 0x00, 0x66, 0xBD, 0x00, 0x07, 0x9D, 0x00, 0x67, 0xE8, 0xD0, 0xCE, 0xA9,
0x00, 0x8D, 0x00, 0x20, 0x8D, 0x01, 0x20, 0xA2, 0x07, 0x9D, 0x10, 0x45, 0xCA, 0x10, 0xFA,
0x20, 0xF8, 0x51, 0x20, 0xB6, 0x52, 0x20, 0x24, 0x53, 0x20, 0xE7, 0x52, 0x20, 0x18, 0x53,
0xA9, 0x00, 0x8D, 0x00, 0x45, 0xA0, 0x02, 0x8C, 0x31, 0x50, 0x4C, 0x3D, 0xF0, 0xAD, 0x31,
0x50, 0xC9, 0x01, 0xF0, 0x01, 0x60, 0x4C, 0xA7, 0x50, 0xAD, 0x31, 0x50, 0xC9, 0x02, 0xF0,
0x01, 0x60, 0xA9, 0x00, 0x8D, 0x31, 0x50, 0x8D, 0x00, 0x20, 0x8D, 0x01, 0x20, 0x20, 0x52,
0x53, 0x20, 0x88, 0x52, 0x20, 0x80, 0x53, 0x20, 0xAE, 0x53, 0xA9, 0x00, 0x8D, 0xFC, 0x43,
0xA2, 0x03, 0xBD, 0x6C, 0x58, 0x9D, 0x04, 0x45, 0xCA, 0x10, 0xF7, 0xA2, 0x0B, 0xBD, 0x78,
0x58, 0x9D, 0x10, 0x45, 0xCA, 0x10, 0xF7, 0xA2, 0x00, 0xBD, 0x48, 0x58, 0x9D, 0x00, 0x40,
0xE8, 0xE0, 0x10, 0xD0, 0xF5, 0xAD, 0x5D, 0x58, 0x8D, 0x15, 0x40, 0xAD, 0x5E, 0x58, 0x8D,
0x16, 0x40, 0xAD, 0x5F, 0x58, 0x8D, 0x17, 0x40, 0xA9, 0x72, 0x8D, 0x00, 0x45, 0xA2, 0x00,
0xBD, 0x00, 0x60, 0x95, 0x00, 0xBD, 0x00, 0x61, 0x9D, 0x00, 0x01, 0xBD, 0x00, 0x62, 0x9D,
0x00, 0x02, 0xBD, 0x00, 0x63, 0x9D, 0x00, 0x03, 0xBD, 0x00, 0x64, 0x9D, 0x00, 0x04, 0xBD,
0x00, 0x65, 0x9D, 0x00, 0x05, 0xBD, 0x00, 0x66, 0x9D, 0x00, 0x06, 0xBD, 0x00, 0x67, 0x9D,
0x00, 0x07, 0xE8, 0xD0, 0xCE, 0xAD, 0x68, 0x58, 0x8D, 0x00, 0x45, 0xAD, 0x42, 0x58, 0x29,
0x03, 0xAA, 0xAD, 0x42, 0x58, 0x0A, 0x0A, 0x9D, 0xFC, 0x42, 0xAD, 0x43, 0x58, 0x29, 0x03,
0xAA, 0xAD, 0x43, 0x58, 0x4A, 0x4A, 0x9D, 0xFC, 0x43, 0xAD, 0x02, 0x20, 0x10, 0xFB, 0xAD,
0x02, 0x20, 0x10, 0xFB, 0x2C, 0x00, 0x45, 0x10, 0x03, 0x2C, 0x0A, 0x45, 0xAE, 0x47, 0x58,
0x9A, 0xAC, 0x46, 0x58, 0xAE, 0x45, 0x58, 0xAD, 0x41, 0x58, 0x8D, 0x01, 0x20, 0xAD, 0x40,
0x58, 0x8D, 0x00, 0x20, 0xAD, 0x44, 0x58, 0x28, 0x40, 0xA9, 0x20, 0x8D, 0xFD, 0x42, 0x8D,
0xFC, 0x43, 0xA9, 0x00, 0x85, 0x00, 0xA9, 0x80, 0xA0, 0x04, 0x20, 0x2D, 0x52, 0x8E, 0x6C,
0x58, 0xA9, 0xA0, 0xA0, 0x05, 0x20, 0x2D, 0x52, 0x8E, 0x6D, 0x58, 0xA9, 0xC0, 0xA0, 0x06,
0x20, 0x2D, 0x52, 0x8E, 0x6E, 0x58, 0xA9, 0xE0, 0xA0, 0x07, 0x20, 0x2D, 0x52, 0x8E, 0x6F,
0x58, 0x60, 0x85, 0x01, 0x8C, 0x56, 0x52, 0xA0, 0x00, 0xB1, 0x00, 0x8D, 0xC7, 0x53, 0xC8,
0xB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x00, 0xAD,
0x2F, 0x57, 0xF0, 0x1E, 0xA9, 0xB9, 0x8D, 0x27, 0x57, 0x20, 0x27, 0x57, 0x48, 0x20, 0x0C,
0x57, 0x68, 0x4D, 0x30, 0x57, 0x8D, 0x30, 0x57, 0xC8, 0xD0, 0xEF, 0xEE, 0x29, 0x57, 0xCE,
0x2F, 0x57, 0xD0, 0xE7, 0xAE, 0x2E, 0x57, 0xF0, 0x19, 0xA9, 0xAD, 0x8D, 0x27, 0x57, 0x20,
0x27, 0x57, 0x48, 0x20, 0x0C, 0x57, 0x68, 0x4D, 0x30, 0x57, 0x8D, 0x30, 0x57, 0xEE, 0x28,
0x57, 0xCA, 0xD0, 0xEC, 0xAD, 0x30, 0x57, 0x20, 0x0C, 0x57, 0x2C, 0x00, 0x45, 0x30, 0xFB,
0x4C, 0xEB, 0x56, 0xC9, 0x02, 0xD0, 0x29, 0x20, 0xAA, 0x56, 0xAD, 0x29, 0x57, 0x8D, 0x06,
0x20, 0xAD, 0x28, 0x57, 0x8D, 0x06, 0x20, 0x20, 0xF1, 0x56, 0x20, 0x03, 0x57, 0x8D, 0x07,
0x20, 0x4D, 0x30, 0x57, 0x8D, 0x30, 0x57, 0x20, 0xD0, 0x56, 0xD0, 0xEF, 0x20, 0xF7, 0x56,
0x4C, 0xE5, 0x56, 0xC9, 0x03, 0xD0, 0x36, 0x20, 0xAA, 0x56, 0xAD, 0x29, 0x57, 0x8D, 0x06,
0x20, 0xAD, 0x28, 0x57, 0x8D, 0x06, 0x20, 0xAD, 0x07, 0x20, 0x20, 0xF1, 0x56, 0xAD, 0x07,
0x20, 0x48, 0x20, 0x0C, 0x57, 0x68, 0x4D, 0x30, 0x57, 0x8D, 0x30, 0x57, 0x20, 0xD0, 0x56,
0xD0, 0xED, 0xAD, 0x30, 0x57, 0x20, 0x0C, 0x57, 0x2C, 0x00, 0x45, 0x30, 0xFB, 0x4C, 0xEB,
0x56, 0xC9, 0x04, 0xD0, 0x08, 0xA9, 0x4C, 0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0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00
0x20, 0x03, 0x70, 0x6C, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xDD, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x2C, 0x00, 0x45, 0x30, 0x19, 0x50, 0x17, 0x2C, 0x2F, 0x50, 0x10, 0x0E, 0x8D,
0x44, 0x58, 0xA5, 0xFA, 0x0A, 0x09, 0xE0, 0x8D, 0xFD, 0x42, 0xAD, 0x44, 0x58, 0x28, 0x4C, 0x11,
0x11, 0x8D, 0x44, 0x58, 0x8E, 0x45, 0x58, 0x8C, 0x46, 0x58, 0xBA, 0x8E, 0x47, 0x58, 0xAD, 0x00,
0x58, 0x8D, 0x40, 0x58, 0x29, 0x7F, 0x8D, 0x00, 0x20, 0xAD, 0x01, 0x58, 0x8D, 0x41, 0x58, 0xAD,
0x00, 0x45, 0x8D, 0x42, 0x58, 0xAD, 0x01, 0x45, 0x8D, 0x43, 0x58, 0xA2, 0x1F, 0xBD, 0x00, 0x50,
0x9D, 0x48, 0x58, 0xBD, 0x00, 0x55, 0x9D, 0x68, 0x58, 0xCA, 0x10, 0xF1, 0xA9, 0x00, 0x8D, 0x01,
0x45, 0x8D, 0x10, 0x40, 0x8D, 0x11, 0x40, 0x8D, 0x15, 0x40, 0xA9, 0x01, 0x8D, 0x31, 0x50, 0x20,
0xCE, 0x53, 0xAD, 0xCA, 0x53, 0xF0, 0xF8, 0xA9, 0x72, 0x8D, 0x00, 0x45, 0xA2, 0x00, 0xB5, 0x00,
0x9D, 0x00, 0x60, 0xBD, 0x00, 0x01, 0x9D, 0x00, 0x61, 0xBD, 0x00, 0x02, 0x9D, 0x00, 0x62, 0xBD,
0x00, 0x03, 0x9D, 0x00, 0x63, 0xBD, 0x00, 0x04, 0x9D, 0x00, 0x64, 0xBD, 0x00, 0x05, 0x9D, 0x00,
0x65, 0xBD, 0x00, 0x06, 0x9D, 0x00, 0x66, 0xBD, 0x00, 0x07, 0x9D, 0x00, 0x67, 0xE8, 0xD0, 0xCE,
0xA9, 0x00, 0x8D, 0x00, 0x20, 0x8D, 0x01, 0x20, 0xA2, 0x07, 0x9D, 0x10, 0x45, 0xCA, 0x10, 0xFA,
0x20, 0xF8, 0x51, 0x20, 0xB6, 0x52, 0x20, 0x24, 0x53, 0x20, 0xE7, 0x52, 0x20, 0x18, 0x53, 0xA9,
0x00, 0x8D, 0x00, 0x45, 0xA0, 0x02, 0x8C, 0x31, 0x50, 0x4C, 0x3D, 0xF0, 0xAD, 0x31, 0x50, 0xC9,
0x01, 0xF0, 0x01, 0x60, 0x4C, 0xA7, 0x50, 0xAD, 0x31, 0x50, 0xC9, 0x02, 0xF0, 0x01, 0x60, 0xA9,
0x00, 0x8D, 0x31, 0x50, 0x8D, 0x00, 0x20, 0x8D, 0x01, 0x20, 0x20, 0x52, 0x53, 0x20, 0x88, 0x52,
0x20, 0x80, 0x53, 0x20, 0xAE, 0x53, 0xA9, 0x00, 0x8D, 0xFC, 0x43, 0xA2, 0x03, 0xBD, 0x6C, 0x58,
0x9D, 0x04, 0x45, 0xCA, 0x10, 0xF7, 0xA2, 0x0B, 0xBD, 0x78, 0x58, 0x9D, 0x10, 0x45, 0xCA, 0x10,
0xF7, 0xA2, 0x00, 0xBD, 0x48, 0x58, 0x9D, 0x00, 0x40, 0xE8, 0xE0, 0x10, 0xD0, 0xF5, 0xAD, 0x5D,
0x58, 0x8D, 0x15, 0x40, 0xAD, 0x5E, 0x58, 0x8D, 0x16, 0x40, 0xAD, 0x5F, 0x58, 0x8D, 0x17, 0x40,
0xA9, 0x72, 0x8D, 0x00, 0x45, 0xA2, 0x00, 0xBD, 0x00, 0x60, 0x95, 0x00, 0xBD, 0x00, 0x61, 0x9D,
0x00, 0x01, 0xBD, 0x00, 0x62, 0x9D, 0x00, 0x02, 0xBD, 0x00, 0x63, 0x9D, 0x00, 0x03, 0xBD, 0x00,
0x64, 0x9D, 0x00, 0x04, 0xBD, 0x00, 0x65, 0x9D, 0x00, 0x05, 0xBD, 0x00, 0x66, 0x9D, 0x00, 0x06,
0xBD, 0x00, 0x67, 0x9D, 0x00, 0x07, 0xE8, 0xD0, 0xCE, 0xAD, 0x68, 0x58, 0x8D, 0x00, 0x45, 0xAD,
0x42, 0x58, 0x29, 0x03, 0xAA, 0xAD, 0x42, 0x58, 0x0A, 0x0A, 0x9D, 0xFC, 0x42, 0xAD, 0x43, 0x58,
0x29, 0x03, 0xAA, 0xAD, 0x43, 0x58, 0x4A, 0x4A, 0x9D, 0xFC, 0x43, 0xAD, 0x02, 0x20, 0x10, 0xFB,
0xAD, 0x02, 0x20, 0x10, 0xFB, 0x2C, 0x00, 0x45, 0x10, 0x03, 0x2C, 0x0A, 0x45, 0xAE, 0x47, 0x58,
0x9A, 0xAC, 0x46, 0x58, 0xAE, 0x45, 0x58, 0xAD, 0x41, 0x58, 0x8D, 0x01, 0x20, 0xAD, 0x40, 0x58,
0x8D, 0x00, 0x20, 0xAD, 0x44, 0x58, 0x28, 0x40, 0xA9, 0x20, 0x8D, 0xFD, 0x42, 0x8D, 0xFC, 0x43,
0xA9, 0x00, 0x85, 0x00, 0xA9, 0x80, 0xA0, 0x04, 0x20, 0x2D, 0x52, 0x8E, 0x6C, 0x58, 0xA9, 0xA0,
0xA0, 0x05, 0x20, 0x2D, 0x52, 0x8E, 0x6D, 0x58, 0xA9, 0xC0, 0xA0, 0x06, 0x20, 0x2D, 0x52, 0x8E,
0x6E, 0x58, 0xA9, 0xE0, 0xA0, 0x07, 0x20, 0x2D, 0x52, 0x8E, 0x6F, 0x58, 0x60, 0x85, 0x01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x56, 0x4C,
0xE5, 0x56, 0xC9, 0x01, 0xD0, 0x54, 0x20, 0xF1, 0x56, 0xA0, 0x00, 0xAD, 0x2F, 0x57, 0xF0, 0x1E,
0xA9, 0xB9, 0x8D, 0x27, 0x57, 0x20, 0x27, 0x57, 0x48, 0x20, 0x0C, 0x57, 0x68, 0x4D, 0x30, 0x57,
0x8D, 0x30, 0x57, 0xC8, 0xD0, 0xEF, 0xEE, 0x29, 0x57, 0xCE, 0x2F, 0x57, 0xD0, 0xE7, 0xAE, 0x2E,
0x57, 0xF0, 0x19, 0xA9, 0xAD, 0x8D, 0x27, 0x57, 0x20, 0x27, 0x57, 0x48, 0x20, 0x0C, 0x57, 0x68,
0x4D, 0x30, 0x57, 0x8D, 0x30, 0x57, 0xEE, 0x28, 0x57, 0xCA, 0xD0, 0xEC, 0xAD, 0x30, 0x57, 0x20,
0x0C, 0x57, 0x2C, 0x00, 0x45, 0x30, 0xFB, 0x4C, 0xEB, 0x56, 0xC9, 0x02, 0xD0, 0x29, 0x20, 0xAA,
0x56, 0xAD, 0x29, 0x57, 0x8D, 0x06, 0x20, 0xAD, 0x28, 0x57, 0x8D, 0x06, 0x20, 0x20, 0xF1, 0x56,
0x20, 0x03, 0x57, 0x8D, 0x07, 0x20, 0x4D, 0x30, 0x57, 0x8D, 0x30, 0x57, 0x20, 0xD0, 0x56, 0xD0,
0xEF, 0x20, 0xF7, 0x56, 0x4C, 0xE5, 0x56, 0xC9, 0x03, 0xD0, 0x36, 0x20, 0xAA, 0x56, 0xAD, 0x29,
0x57, 0x8D, 0x06, 0x20, 0xAD, 0x28, 0x57, 0x8D, 0x06, 0x20, 0xAD, 0x07, 0x20, 0x20, 0xF1, 0x56,
0xAD, 0x07, 0x20, 0x48, 0x20, 0x0C, 0x57, 0x68, 0x4D, 0x30, 0x57, 0x8D, 0x30, 0x57, 0x20, 0xD0,
0x56, 0xD0, 0xED, 0xAD, 0x30, 0x57, 0x20, 0x0C, 0x57, 0x2C, 0x00, 0x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0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
struct _m006 {
@ -330,6 +312,7 @@ struct _m006 {
BYTE scratch[0x1000];
} m006;
struct _m006tmp {
size_t old_prgrom_size;
BYTE *chr;
} m006tmp;
@ -351,6 +334,7 @@ void map_init_006(void) {
m006tmp.chr = NULL;
if ((info.reset == CHANGE_ROM) || (info.reset == POWER_UP)) {
m006tmp.old_prgrom_size = prgrom_size();
if (chrrom_size()) {
if (info.mapper.id != 12) {
if (vram_size(0) < chrrom_size()) {
@ -358,9 +342,7 @@ void map_init_006(void) {
m006tmp.chr = chrrom_pnt();
}
} else {
size_t old_size = prgrom_size();
if (old_size < S512K) {
if (m006tmp.old_prgrom_size < S512K) {
prgrom_pnt() = realloc(prgrom_pnt(), S512K);
prgrom_set_size(S512K);
}
@ -408,10 +390,10 @@ void map_init_006(void) {
m006.chr.lock = FALSE;
m006.latch = 0;
m006.prg[0] = ~3;
m006.prg[1] = ~2;
m006.prg[2] = ~1;
m006.prg[3] = ~0;
m006.prg[0] = memmap_banks_from_size(S8K, m006tmp.old_prgrom_size) - 4;
m006.prg[1] = memmap_banks_from_size(S8K, m006tmp.old_prgrom_size) - 3;
m006.prg[2] = memmap_banks_from_size(S8K, m006tmp.old_prgrom_size) - 2;
m006.prg[3] = memmap_banks_from_size(S8K, m006tmp.old_prgrom_size) - 1;
m006.chr.reg[0] = 0;
m006.chr.reg[1] = 1;
@ -532,7 +514,6 @@ void extcl_cpu_wr_mem_006(BYTE nidx, WORD address, BYTE value) {
// +-- 2M or 4M banking mode select if M=0
// 0: 4M banking mode
// 1: 2M banking mode
m006.mode.m2m4 = address & 0x03;
// The CC bits are mirrors of those in the latch at $8000-$FFFF.
m006.latch = (m006.latch & 0xFC) | (value & 0x03);
@ -796,7 +777,7 @@ INLINE static void chr_fix_006(void) {
bank[1] = bank[0] | 0x01;
bank[2] = bank[0] | 0x02;
bank[3] = bank[0] | 0x03;
bank[4] = m006.chr.reg[1 | m006.chr.mmc4[1]] & 0xFC;
bank[4] = m006.chr.reg[4 | m006.chr.mmc4[1]] & 0xFC;
bank[5] = bank[4] | 0x01;
bank[6] = bank[4] | 0x02;
bank[7] = bank[4] | 0x03;

View file

@ -94,7 +94,7 @@ void extcl_cpu_wr_mem_091(BYTE nidx, WORD address, BYTE value) {
m091.chr[address & 0x03] = value;
chr_fix_091();
}
return;;
return;
case 0x7000:
switch (address & 0x0003) {
case 0:

View file

@ -59,6 +59,8 @@ void map_init_176(void) {
info.mapper.submapper = 1;
} else if ((prgrom_size() == S256K) && (chrrom_size() == S128K)) {
info.mapper.submapper = 1;
} else if ((prgrom_size() == S128K) && (chrrom_size() == S64K)) {
info.mapper.submapper = 1;
} else if ((prgrom_size() >= S8M) && !chrrom_size()) {
info.mapper.submapper = 2;
} else if ((prgrom_size() >= S4M) && !chrrom_size()) {
@ -213,7 +215,7 @@ INLINE static void prg_fix_176(void) {
switch (info.mapper.submapper) {
case 1:
if ((mode == 7) || ext) {
if ((mode == 0) || ext) {
mask = 0xFF;
}
break;
@ -223,7 +225,7 @@ INLINE static void prg_fix_176(void) {
break;
case 3:
base |= (m176.cpu5xxx[5] << 7);
if (mode == 7) {
if (mode == 0) {
mask = 0xFF;
}
break;

View file

@ -49,8 +49,8 @@ void extcl_after_mapper_init_228(void) {
memcpy(buffer, prgrom_pnt(), prgrom_size());
for (int i = 0x000000; i < 0x080000; i++) {
buffer[0x180000 +i] = buffer[0x100000 +i];
buffer[0x100000 +i] = (i >> 8) & 0xFF;
buffer[0x180000 + i] = buffer[0x100000 + i];
buffer[0x100000 + i] = (i >> 8) & 0xFF;
}
prgrom_set_size(size);

View file

@ -2247,7 +2247,7 @@ INLINE static BYTE mapper13_cpu_rd(UNUSED(BYTE nidx), WORD address, BYTE openbus
}
INLINE static BYTE mapper15_cpu_rd(UNUSED(BYTE nidx), WORD address, BYTE openbus) {
// MMC5
if (address == 0x0204) {
if (address == 0x5204) {
BYTE value = (m342.mmc5.irq.out << 7) |
(!m342.mmc5.ppu.rendering || ((m342.mmc5.ppu.scanline + 1) >= 241) ? 0 : 0x40);

View file

@ -49,7 +49,7 @@ void map_init_561(void) {
if (info.reset >= HARD) {
memset(&m561, 0x00, sizeof(m561));
m561.reg1m = info.mapper.submapper << 5 | (info.mapper.mirroring == MIRRORING_VERTICAL ? 0x01: 0x11) | 0x02;
m561.reg1m = (info.mapper.submapper << 5) | (info.mapper.mirroring == MIRRORING_VERTICAL ? 0x01: 0x11) | 0x02;
m561.reg4m = 0x03;
m561.prg[0] = 0x1C;
m561.prg[1] = 0x1D;
@ -94,7 +94,11 @@ void extcl_cpu_init_pc_561(BYTE nidx) {
data = miscrom_pnt_byte(4);
}
memcpy(wram_pnt_byte(address & 0x1FFF), data, size);
if (address < 0x2000) {
memcpy(ram_pnt_byte(nidx, address & 0x1FFF), data, size);
} else {
memcpy(wram_pnt_byte(address & 0x1FFF), data, size);
}
if (init) {
// JSR init
@ -239,12 +243,12 @@ INLINE static void prg_fix_561(void) {
memmap_auto_wp_32k(0, MMCPU(0x8000), 0x03, TRUE, wr);
return;
case 6:
memmap_auto_wp_8k(0, MMCPU(0x8000), m561.prg[0], TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xA000), m561.prg[1], TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0x8000), (m561.reg & 0x0F), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xA000), (m561.reg >> 4), TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), 0x07, TRUE, wr);
return;
case 7:
memmap_auto_wp_8k(0, MMCPU(0x8000), (m561.prg[0] & 0x0E), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0x8000), (m561.reg & 0x0E), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xA000), ((m561.reg >> 4) | 0x01), TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), 0x07, TRUE, wr);
return;
@ -252,7 +256,7 @@ INLINE static void prg_fix_561(void) {
}
}
INLINE static void chr_fix_561(void) {
memmap_vram_wp_8k(0, MMPPU(0x0000), m561.chr, TRUE, !((m561.reg1m & 0xE0) & 0x80));
memmap_vram_wp_8k(0, MMPPU(0x0000), m561.chr, TRUE, !(m561.reg1m >= 0x80));
}
INLINE static void mirroring_fix_561(void) {
switch (m561.reg1m & 0x11) {

View file

@ -0,0 +1,538 @@
/*
* Copyright (C) 2010-2024 Fabio Cavallo (aka FHorse)
*
* 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.
*/
#include <string.h>
#include "mappers.h"
#include "save_slot.h"
INLINE static void prg_fix_562(void);
INLINE static void chr_fix_562(void);
INLINE static void mirroring_fix_562(void);
const BYTE bios[0x1000] = {
0xF6, 0x60, 0x20, 0xD3, 0xE7, 0xF0, 0x06, 0x20, 0xD3, 0xE7, 0x20, 0xF5, 0xE7, 0xA2, 0x01, 0xB5,
0xF5, 0xA8, 0x55, 0xF7, 0x35, 0xF5, 0x95, 0xF5, 0x94, 0xF7, 0xCA, 0x10, 0xF2, 0x60, 0xA9, 0x08,
0x08, 0xA0, 0x00, 0x18, 0x65, 0x00, 0x85, 0x00, 0xA9, 0x00, 0x65, 0x01, 0x85, 0x01, 0x28, 0xC6,
0x02, 0x60, 0xA2, 0x08, 0xB0, 0x0A, 0xB1, 0x00, 0x8D, 0x07, 0x20, 0xC8, 0xCA, 0xD0, 0xF5, 0x60,
0xAD, 0x07, 0x20, 0x91, 0x00, 0xB0, 0xF4, 0xA5, 0x03, 0xA2, 0x08, 0xB0, 0x07, 0x8D, 0x07, 0x20,
0xCA, 0xD0, 0xF8, 0x60, 0xAD, 0x07, 0x20, 0xB0, 0xF7, 0xA2, 0x08, 0xA5, 0x03, 0x51, 0x00, 0x8D,
0x07, 0x20, 0xC8, 0xCA, 0xD0, 0xF5, 0x60, 0x85, 0x04, 0x86, 0x02, 0x84, 0x03, 0x20, 0xFC, 0xE3,
0xAD, 0x02, 0x20, 0xA5, 0xFF, 0x29, 0xFB, 0x85, 0xFF, 0x8D, 0x00, 0x20, 0xA4, 0x03, 0x8C, 0x06,
0x20, 0xA5, 0x04, 0x29, 0xF0, 0x8D, 0x06, 0x20, 0xA9, 0x00, 0x85, 0x03, 0xA5, 0x04, 0x29, 0x0F,
0x4A, 0x90, 0x02, 0xC6, 0x03, 0x4A, 0x90, 0x03, 0xAE, 0x07, 0x20, 0xA8, 0xF0, 0x15, 0x88, 0xF0,
0x20, 0x88, 0xF0, 0x29, 0x88, 0x20, 0x59, 0xE8, 0xA0, 0x00, 0x20, 0x32, 0xE8, 0x20, 0x1E, 0xE8,
0xD0, 0xF3, 0x60, 0x20, 0x32, 0xE8, 0x20, 0x32, 0xE8, 0xA9, 0x10, 0x20, 0x20, 0xE8, 0xD0, 0xF3,
0x60, 0x20, 0x32, 0xE8, 0x20, 0x47, 0xE8, 0x20, 0x1E, 0xE8, 0xD0, 0xF5, 0x60, 0x20, 0x47, 0xE8,
0x20, 0x32, 0xE8, 0x20, 0x1E, 0xE8, 0xD0, 0xF5, 0x60, 0xAE, 0x00, 0x78, 0x9A, 0xAD, 0x11, 0x44,
0x29, 0xFC, 0x09, 0x06, 0x8D, 0x11, 0x44, 0xA2, 0x00, 0xBD, 0x00, 0x70, 0x95, 0x00, 0xBD, 0x00,
0x71, 0x9D, 0x00, 0x01, 0xE8, 0xD0, 0xF2, 0xAD, 0x13, 0x44, 0x8D, 0x11, 0x44, 0xAD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4F
};
struct _m562 {
BYTE prg[4];
BYTE latch;
struct _m562_chr {
BYTE lock;
BYTE reg1k[8];
BYTE reg8k;
BYTE lastbank;
} chr;
struct _m562_mode {
BYTE m1;
BYTE m2;
BYTE tgd;
} mode;
struct _m562_irq {
WORD target;
WORD counter;
} irq;
struct _m562_fds {
BYTE control;
SWORD counter;
} fds;
} m562;
void map_init_562(void) {
EXTCL_AFTER_MAPPER_INIT(562);
EXTCL_CPU_INIT_PC(562);
EXTCL_CPU_WR_MEM(562);
EXTCL_CPU_RD_MEM(562);
EXTCL_SAVE_MAPPER(562);
EXTCL_WR_CHR(562);
EXTCL_RD_CHR(562);
EXTCL_CPU_EVERY_CYCLE(562);
map_internal_struct_init((BYTE *)&m562, sizeof(m562));
if (info.reset >= HARD) {
memset(&m562, 0x00, sizeof(m562));
m562.mode.m1 = (info.mapper.submapper << 5) | (info.mapper.mirroring == MIRRORING_VERTICAL ? 0x01: 0x11) | 0x06;
m562.mode.m2 = 0x03;
m562.mode.tgd = 0x03;
m562.prg[0] = 0x1C;
m562.prg[1] = 0x1D;
m562.prg[2] = 0x1E;
m562.prg[3] = 0x1F;
m562.chr.reg1k[0] = 0;
m562.chr.reg1k[1] = 1;
m562.chr.reg1k[2] = 2;
m562.chr.reg1k[3] = 3;
m562.chr.reg1k[4] = 4;
m562.chr.reg1k[5] = 5;
m562.chr.reg1k[6] = 6;
m562.chr.reg1k[7] = 7;
m562.chr.lock = FALSE;
}
memset(&m562.irq, 0x00, sizeof(m562.irq));
m562.irq.counter = 0xFFFF;
info.mapper.extend_wr = TRUE;
}
void extcl_after_mapper_init_562(void) {
if ((info.reset == CHANGE_ROM) || (info.reset == POWER_UP)) {
if (chrrom_size()) {
if (!chrrom_size() || (vram_size(0) < chrrom_size())) {
vram_set_ram_size(0, chrrom_size());
vram_init();
}
memcpy(vram_pnt(0), chrrom_pnt(), chrrom_size());
}
}
prg_fix_562();
chr_fix_562();
mirroring_fix_562();
}
void extcl_cpu_init_pc_562(BYTE nidx) {
if (info.reset >= HARD) {
if (miscrom_size() >= 4) {
WORD address = 0x7000;
WORD init = 0x7003;
size_t size = 512;
BYTE *data = miscrom_pnt();
if (miscrom_size() != size) {
address = (miscrom_byte(1) << 8) | miscrom_byte(0);
init = (miscrom_byte(3) << 8) | miscrom_byte(2);
size = miscrom_size() - 4;
data = miscrom_pnt_byte(4);
}
if (address < 0x2000) {
memcpy(ram_pnt_byte(nidx, address & 0x1FFF), data, size);
} else {
memcpy(wram_pnt_byte(address & 0x1FFF), data, size);
}
if (init) {
// JSR init
ram_wr(nidx, 0x700, 0x20);
ram_wr(nidx, 0x701, init & 0xFF);
ram_wr(nidx, 0x702, init >> 8);
// JMP ($FFFC)
ram_wr(nidx, 0x703, 0x6C);
ram_wr(nidx, 0x704, 0xFC);
ram_wr(nidx, 0x705, 0xFF);
nes[nidx].c.cpu.PC.w = 0x700;
}
}
r4015.value &= 0xBF;
nes[nidx].c.irq.high &= ~APU_IRQ;
}
}
void extcl_cpu_wr_mem_562(BYTE nidx, WORD address, BYTE value) {
if ((address >= 0x4000) && (address <= 0x4FFF)) {
switch (address) {
case 0x4024:
nes[nidx].c.irq.high &= ~EXT_IRQ;
return;
case 0x4025:
m562.fds.control = value;
if (m562.fds.control & 0x42) {
m562.fds.counter = 0;
}
nes[nidx].c.irq.high &= ~EXT_IRQ;
return;
case 0x42FC:
case 0x42FD:
case 0x42FE:
case 0x42FF:
m562.mode.m1 = (value & 0xF0) | (address & 0x03);
if (m562.mode.m1 >= 0x80) {
m562.chr.lock = FALSE;
}
prg_fix_562();
chr_fix_562();
mirroring_fix_562();
return;
case 0x43FC:
case 0x43FD:
case 0x43FE:
case 0x43FF:
m562.mode.m2 = (value & 0xF0) | (address & 0x03);
m562.chr.reg8k = value & 0x03;
prg_fix_562();
chr_fix_562();
return;
case 0x4400:
case 0x4401:
case 0x4402:
case 0x4403:
case 0x4404:
case 0x4405:
case 0x4406:
case 0x4407:
m562.chr.reg1k[address & 0x07] = value;
chr_fix_562();
return;
case 0x440C:
m562.irq.target = (m562.irq.target & 0x00FF) | (value << 8);
if (!(value & 0x80)) {
m562.irq.counter = 0x8000;
}
nes[nidx].c.irq.high &= ~EXT_IRQ;
return;
case 0x440D:
m562.irq.target = (m562.irq.target & 0xFF00) | value;
nes[nidx].c.irq.high &= ~EXT_IRQ;
return;
case 0x4411:
m562.mode.tgd = value;
prg_fix_562();
chr_fix_562();
return;
default:
return;
}
} else if (address >= 0x8000) {
if (m562.mode.m1 & 0x02) {
m562.latch = value;
switch (m562.mode.m1 >> 5) {
case 0:
case 2:
m562.chr.reg8k = 0;
break;
case 1:
case 4:
case 5:
m562.chr.reg8k = value & 0x03;
break;
case 3:
m562.chr.reg8k = (value & 0x30) >> 4;
break;
default:
break;
}
m562.prg[(address >> 13) & 0x03] = value >> 2;
prg_fix_562();
chr_fix_562();
}
}
}
BYTE extcl_cpu_rd_mem_562(BYTE nidx, WORD address, UNUSED(BYTE openbus)) {
if ((address >= 0x4000) && (address <= 0x4FFF)) {
switch(address) {
case 0x4400:
case 0x4401:
case 0x4402:
case 0x4403:
case 0x4404:
case 0x4405:
case 0x4406:
case 0x4407:
return (m562.chr.reg1k[address & 0x07]);
case 0x4408:
case 0x4409:
case 0x440A:
case 0x440B:
return ((m562.prg[address & 0x03] << 2) | (m562.latch & 0x03));
case 0x440C:
return (m562.irq.counter >> 8);
case 0x440D:
return (m562.irq.counter & 0xFF);
case 0x4411:
return (m562.mode.tgd);
case 0x4415:
return (m562.mode.m1);
case 0x4420:
return (m562.chr.reg1k[m562.chr.lastbank]);
default:
return (address & 0x0800 ? bios[address & 0x07FF] : wram_rd(nidx, address));
}
}
return (wram_rd(nidx, address));
}
BYTE extcl_save_mapper_562(BYTE mode, BYTE slot, FILE *fp) {
save_slot_ele(mode, slot, m562.prg);
save_slot_ele(mode, slot, m562.latch);
save_slot_ele(mode, slot, m562.chr.lock);
save_slot_ele(mode, slot, m562.chr.reg1k);
save_slot_ele(mode, slot, m562.chr.reg8k);
save_slot_ele(mode, slot, m562.chr.lastbank);
save_slot_ele(mode, slot, m562.mode.m1);
save_slot_ele(mode, slot, m562.mode.m2);
save_slot_ele(mode, slot, m562.mode.tgd);
save_slot_ele(mode, slot, m562.irq.target);
save_slot_ele(mode, slot, m562.irq.counter);
save_slot_ele(mode, slot, m562.fds.control);
save_slot_ele(mode, slot, m562.fds.counter);
return (EXIT_OK);
}
void extcl_wr_chr_562(BYTE nidx, WORD address, BYTE value) {
if ((m562.mode.m1 >= 0xA0) && !(m562.mode.m1 & 0x01)) {
m562.chr.lock = (m562.mode.m1 & 0x10);
}
m562.chr.lastbank = address >> 10;
chr_wr(nidx, address, value);
}
BYTE extcl_rd_chr_562(BYTE nidx, WORD address) {
m562.chr.lastbank = address >> 10;
return (chr_rd(nidx, address));
}
void extcl_cpu_every_cycle_562(BYTE nidx) {
m562.fds.counter += 3;
while ((m562.fds.counter >= 448) && (m562.fds.control & 0x80)) {
m562.fds.counter -= 448;
nes[nidx].c.irq.high |= EXT_IRQ;
}
if (m562.irq.target & 0x8000) {
if ((m562.irq.counter == m562.irq.target) && (m562.irq.counter != 0xFFFF)) {
nes[nidx].c.irq.high |= EXT_IRQ;
} else {
m562.irq.counter++;
}
}
}
INLINE static void prg_fix_562(void) {
BYTE wr = !(m562.mode.m1 & 0x02);
if (m562.mode.tgd & 0x80) {
memmap_auto_wp_8k(0, MMCPU(0x8000), m562.prg[0], TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xA000), m562.prg[1], TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xC000), m562.prg[2], TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xE000), m562.prg[3], TRUE, wr);
} else if (!(m562.mode.m2 & 0x01)) {
memmap_auto_wp_8k(0, MMCPU(0x8000), (((m562.mode.m2 & 0x40) >> 2) | (m562.prg[0] & 0x0F)), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xA000), (((m562.mode.m2 & 0x40) >> 2) | (m562.prg[1] & 0x0F)), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xC000), (m562.prg[2] & 0x0F), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xE000), (m562.prg[3] & 0x0F), TRUE, wr);
} else {
switch (m562.mode.m1 >> 5) {
case 0:
memmap_auto_wp_16k(0, MMCPU(0x8000), (m562.latch & 0x07), TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), 0x07, TRUE, wr);
return;
case 1:
memmap_auto_wp_16k(0, MMCPU(0x8000), ((m562.latch & 0x3C) >> 2), TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), 0x07, TRUE, wr);
return;
case 2:
memmap_auto_wp_16k(0, MMCPU(0x8000), (m562.latch & 0x0F), TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), 0x0F, TRUE, wr);
return;
case 3:
memmap_auto_wp_16k(0, MMCPU(0x8000), 0x0F, TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), (m562.latch & 0x0F), TRUE, wr);
return;
case 4:
memmap_auto_wp_32k(0, MMCPU(0x8000), ((m562.latch & 0x30) >> 4), TRUE, wr);
return;
case 5:
memmap_auto_wp_32k(0, MMCPU(0x8000), 0x03, TRUE, wr);
return;
case 6:
memmap_auto_wp_8k(0, MMCPU(0x8000), (m562.latch & 0x0F), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xA000), (m562.latch >> 4), TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), 0x07, TRUE, wr);
return;
case 7:
memmap_auto_wp_8k(0, MMCPU(0x8000), (m562.latch & 0x0E), TRUE, wr);
memmap_auto_wp_8k(0, MMCPU(0xA000), ((m562.latch >> 4) | 0x01), TRUE, wr);
memmap_auto_wp_16k(0, MMCPU(0xC000), 0x07, TRUE, wr);
return;
}
}
}
INLINE static void chr_fix_562(void) {
WORD bank[8];
if (m562.mode.tgd & 0x40) {
bank[0] = m562.chr.reg1k[0];
bank[1] = m562.chr.reg1k[1];
bank[2] = m562.chr.reg1k[2];
bank[3] = m562.chr.reg1k[3];
bank[4] = m562.chr.reg1k[4];
bank[5] = m562.chr.reg1k[5];
bank[6] = m562.chr.reg1k[6];
bank[7] = m562.chr.reg1k[7];
} else {
bank[0] = m562.chr.reg8k << 3;
bank[1] = bank[0] | 0x01;
bank[2] = bank[0] | 0x02;
bank[3] = bank[0] | 0x03;
bank[4] = bank[0] | 0x04;
bank[5] = bank[0] | 0x05;
bank[6] = bank[0] | 0x06;
bank[7] = bank[0] | 0x07;
}
{
BYTE enabled = !(((m562.mode.m1 & 0xE1) >= 0x81) || m562.chr.lock);
memmap_vram_wp_1k(0, MMPPU(0x0000), bank[0], TRUE, enabled);
memmap_vram_wp_1k(0, MMPPU(0x0400), bank[1], TRUE, enabled);
memmap_vram_wp_1k(0, MMPPU(0x0800), bank[2], TRUE, enabled);
memmap_vram_wp_1k(0, MMPPU(0x0C00), bank[3], TRUE, enabled);
memmap_vram_wp_1k(0, MMPPU(0x1000), bank[4], TRUE, enabled);
memmap_vram_wp_1k(0, MMPPU(0x1400), bank[5], TRUE, enabled);
memmap_vram_wp_1k(0, MMPPU(0x1800), bank[6], TRUE, enabled);
memmap_vram_wp_1k(0, MMPPU(0x1C00), bank[7], TRUE, enabled);
}
}
INLINE static void mirroring_fix_562(void) {
switch (m562.mode.m1 & 0x11) {
case 0x00:
mirroring_SCR0(0);
return;
case 0x01:
mirroring_V(0);
return;
case 0x10:
mirroring_SCR1(0);
return;
case 0x11:
mirroring_H(0);
return;
}
}

View file

@ -0,0 +1,34 @@
/*
* Copyright (C) 2010-2024 Fabio Cavallo (aka FHorse)
*
* 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.
*/
#ifndef MAPPER_562_H_
#define MAPPER_562_H_
#include "common.h"
void map_init_562(void);
void extcl_after_mapper_init_562(void);
void extcl_cpu_init_pc_562(BYTE nidx);
void extcl_cpu_wr_mem_562(BYTE nidx, WORD address, BYTE value);
BYTE extcl_cpu_rd_mem_562(BYTE index, WORD address, BYTE openbus);
BYTE extcl_save_mapper_562(BYTE mode, BYTE slot, FILE *fp);
void extcl_wr_chr_562(BYTE nidx, WORD address, BYTE value);
BYTE extcl_rd_chr_562(BYTE nidx, WORD address);
void extcl_cpu_every_cycle_562(BYTE nidx);
#endif /* MAPPER_562_H_ */

View file

@ -43,7 +43,7 @@ void map_init_FDS(void) {
fds.auto_insert.rE445.in_run = FALSE;
fds.auto_insert.in_game = FALSE;
fds.drive.transfer_reset = 0x02;
fds.drive.mirroring = 0x08;
fds.drive.io_mode = 0x04;
fds.drive.drive_ready = 0x40;
@ -77,6 +77,11 @@ void extcl_after_mapper_init_FDS(void) {
memmap_wram_8k(0, MMCPU(0xA000), 2);
memmap_wram_8k(0, MMCPU(0xC000), 3);
memmap_prgrom_8k(0, MMCPU(0xE000), 0);
if (fds.drive.mirroring) {
mirroring_H(0);
} else {
mirroring_V(0);
}
}
BYTE extcl_cpu_rd_mem_FDS(BYTE nidx, WORD address, UNUSED(BYTE openbus)) {
switch (address) {
@ -212,10 +217,10 @@ void extcl_cpu_every_cycle_FDS(BYTE nidx) {
}
// IRQ handler
if (fds.drive.irq_timer_delay && !(--fds.drive.irq_timer_delay)) {
fds.drive.irq_timer_high = 0x01;
nes[nidx].c.irq.high |= FDS_TIMER_IRQ;
}
// if (fds.drive.irq_timer_delay && !(--fds.drive.irq_timer_delay)) {
// fds.drive.irq_timer_high = 0x01;
// nes[nidx].c.irq.high |= FDS_TIMER_IRQ;
// }
if (fds.drive.enabled_dsk_reg && fds.drive.irq_timer_enabled) {
if (fds.drive.irq_timer_counter) {
fds.drive.irq_timer_counter--;
@ -226,7 +231,9 @@ void extcl_cpu_every_cycle_FDS(BYTE nidx) {
} else {
fds.drive.irq_timer_enabled = FALSE;
}
fds.drive.irq_timer_delay = 1;
// fds.drive.irq_timer_delay = 1;
fds.drive.irq_timer_high = 0x01;
nes[nidx].c.irq.high |= FDS_TIMER_IRQ;
}
}
@ -244,97 +251,115 @@ void extcl_cpu_every_cycle_FDS(BYTE nidx) {
return;
}
if (fds.drive.delay_insert) {
fds.drive.delay_insert--;
return;
if (!fds.drive.motor_on) {
fds.drive.transfer_reset = 0x02;
}
if (!fds.drive.motor_on && !fds.drive.motor_started) {
if (fds.drive.delay_insert) {
--fds.drive.delay_insert;
if (fds.drive.transfer_reset) {
fds.drive.motor_started = FALSE;
}
if (fds.drive.delay_insert) {
return;
}
fds.drive.disk_position = 0;
fds.drive.mark_finded = FALSE;
return;
fds.drive.end_of_head = FALSE;
fds.drive.data_available = FALSE;
fds.drive.delay_8bit = fds.info.cycles_8bit_delay;
}
if (!fds.drive.motor_started && !fds.drive.transfer_reset && fds.drive.drive_ready) {
// "Akuu Senki Raijin (Japan) (Disk Writer)" (sporcare lo screen).
fds.drive.delay_8bit = fds.info.cycles_8bit_delay;
fds.drive.motor_started = TRUE;
}
// se c'e' un delay aspetto
if ((fds.drive.delay_8bit > 0) && --fds.drive.delay_8bit) {
if (fds.drive.delay_8bit && --fds.drive.delay_8bit) {
return;
}
fds.drive.scan = !fds.drive.transfer_reset;
fds.drive.scan = FALSE;
fds.info.last_operation = FDS_OP_NONE;
fds.drive.data_available = FALSE;
if (fds.drive.scan) {
BYTE data = 0, transfer = FALSE;
if (fds.drive.motor_started) {
fds.drive.scan = !fds.drive.transfer_reset;
data = fds.side.info->data[fds.drive.disk_position];
if (fds.drive.scan) {
BYTE data = 0, transfer = FALSE;
if (fds.drive.io_mode) {
// read
if (fds.drive.drive_ready) {
if (fds.drive.mark_finded) {
transfer = TRUE;
fds.drive.crc = fds_crc_byte(fds.drive.crc, data);
} else if (data == FDS_DISK_BLOCK_MARK) {
fds.drive.mark_finded = TRUE;
fds.drive.crc = 0;
fds.drive.crc = fds_crc_byte(fds.drive.crc, data);
}
}
} else {
if (!fds.drive.drive_ready) {
data = FDS_DISK_GAP;
fds.drive.crc = 0;
} else {
if (fds.drive.crc_control) {
data = fds.drive.crc >> 0;
fds.drive.crc >>= 8;
} else {
data = fds.drive.data_io;
fds.drive.crc = fds_crc_byte(fds.drive.crc, data);
}
}
transfer = TRUE;
}
data = fds.side.info->data[fds.drive.disk_position];
fds.auto_insert.r4032.frames = 0;
fds.auto_insert.r4032.checks = 0;
if (transfer) {
fds.drive.data_available = 0x80;
if (fds.drive.irq_disk_enabled) {
fds.drive.transfer_flag = 0x02;
nes[nidx].c.irq.high |= FDS_DISK_IRQ;
}
if (fds.drive.io_mode) {
fds.drive.data_io = data;
fds.info.last_operation = FDS_OP_READ;
// read
if (fds.drive.drive_ready) {
if (fds.drive.mark_finded) {
transfer = TRUE;
fds.drive.crc = fds_crc_byte(fds.drive.crc, data);
} else if (data == FDS_DISK_BLOCK_MARK) {
fds.drive.mark_finded = TRUE;
fds.drive.crc = 0;
fds.drive.crc = fds_crc_byte(fds.drive.crc, data);
}
}
} else {
fds.side.info->data[fds.drive.disk_position] = data;
fds.info.writings_occurred = TRUE;
fds.info.last_operation = FDS_OP_WRITE;
// write
if (!fds.drive.drive_ready) {
data = FDS_DISK_GAP;
fds.drive.crc = 0;
} else {
if (fds.drive.crc_control) {
data = fds.drive.crc >> 0;
fds.drive.crc >>= 8;
} else {
data = fds.drive.data_io;
fds.drive.crc = fds_crc_byte(fds.drive.crc, data);
fds.drive.data_io = FDS_DISK_GAP;
}
}
transfer = TRUE;
}
fds.auto_insert.r4032.frames = 0;
fds.auto_insert.r4032.checks = 0;
if (transfer) {
if (fds.drive.irq_disk_enabled) {
nes[nidx].c.irq.high |= FDS_DISK_IRQ;
}
if (fds.drive.io_mode) {
fds.drive.data_io = data;
if (!fds.drive.data_available) {
fds.info.last_operation = FDS_OP_READ;
}
} else {
fds.side.info->data[fds.drive.disk_position] = data;
fds.info.writings_occurred = TRUE;
if (!fds.drive.data_available) {
fds.info.last_operation = FDS_OP_WRITE;
}
}
fds.drive.data_available = 0x80;
fds.drive.transfer_flag = 0x02;
}
}
}
if (fds.drive.scan || fds.drive.motor_started) {
if (++fds.drive.disk_position >= fds.info.sides[fds.drive.side_inserted].size) {
fds.drive.delay_insert = fds.info.cycles_insert_delay;
fds.drive.end_of_head = 0x40;
fds.drive.disk_position = 0;
fds.drive.transfer_reset = FALSE;
// Bishoujo Alien Battle (Japan) (Unl).fds non esegue la routine a 0xE188
// Bishoujo Alien Battle (Japan) (Unl).fds non esegue la routine a 0xE188
fds.auto_insert.in_game = TRUE;
if (fds.drive.motor_started) {
fds.drive.motor_on = FALSE;
fds.drive.motor_started = FALSE;
if (fds_auto_insert_enabled() && !fds.auto_insert.end_of_head.disabled && !fds.auto_insert.delay.dummy) {
fds_disk_op(FDS_DISK_EJECT, 0, TRUE);
gui_update_fds_menu();
fds.auto_insert.delay.dummy = fds.info.cycles_dummy_delay;
}
// signal "disk is full" if end track was reached during writing
if (!fds.drive.io_mode) {
fds.drive.transfer_reset = 0x02;
}
if (fds_auto_insert_enabled() && !fds.auto_insert.end_of_head.disabled && !fds.auto_insert.delay.dummy) {
fds_disk_op(FDS_DISK_EJECT, 0, TRUE);
gui_update_fds_menu();
fds.auto_insert.delay.dummy = fds.info.cycles_dummy_delay;
}
} else {
fds.drive.end_of_head = FALSE;
// il delay per riuscire a leggere i prossimi 8 bit
fds.drive.delay_8bit = fds.info.cycles_8bit_delay;
}

View file

@ -62,20 +62,18 @@ void map_init_NSF(void) {
}
nsf.state = NSF_PLAY | NSF_CHANGE_SONG;
nsf.timers.update_only_diff = FALSE;
switch (cfg->mode) {
switch (machine.type) {
default:
case AUTO:
nsf.type = nsf.region.preferred;
break;
case NTSC:
nsf.type = nsf.region.supported & 0x01 ? nsf.type = NSF_NTSC_MODE : nsf.region.preferred;
nsf.type = NSF_NTSC_MODE;
break;
case PAL:
nsf.type = nsf.region.supported & 0x02 ? nsf.type = NSF_PAL_MODE : nsf.region.preferred;
nsf.type = NSF_PAL_MODE;
break;
case DENDY:
nsf.type = nsf.region.supported & 0x04 ? nsf.type = NSF_DENDY_MODE : nsf.region.preferred;
nsf.type = NSF_DENDY_MODE;
break;
}
@ -281,22 +279,6 @@ void extcl_apu_tick_NSF(void) {
INLINE static void select_region_NSF(void) {
double rate = 0, nmi_rate = 0;
switch (nsf.type & 0x03) {
case NSF_NTSC_MODE:
info.machine[DATABASE] = NTSC;
break;
case NSF_PAL_MODE:
info.machine[DATABASE] = PAL;
break;
case NSF_DENDY_MODE:
info.machine[DATABASE] = DENDY;
break;
default:
nsf.type = NSF_NTSC_MODE;
info.machine[DATABASE] = NTSC;
break;
}
if (machine.type == NTSC) {
rate = nsf.play_speed.ntsc;
nmi_rate = 0x40FF;

View file

@ -138,6 +138,9 @@ BYTE *memmap_chunk_pnt(BYTE nidx, DBWORD address) {
}
return (NULL);
}
WORD memmap_banks_from_size(enum _sizes_types chunk_size, size_t size) {
return (memmap_banks(chunk_size, size));
}
BYTE memmap_prg_region_init(BYTE nidx, size_t chunk_size) {
return (memmap_region_init(&nes[nidx].m.memmap.prg, MEMMAP_PRG_SIZE, chunk_size));
@ -512,6 +515,7 @@ void prgrom_quit(void) {
}
void prgrom_set_size(size_t size) {
set_size(&prgrom_size(), &prgrom.real_size, nes[0].m.memmap.prg.info.chunk.size, size);
prgrom_mask() = calc_mask(prgrom_size());
}
void prgrom_reset_chunks(void) {
for (int nesidx = 0; nesidx < info.number_of_nes; nesidx++) {
@ -661,6 +665,7 @@ void chrrom_quit(void) {
}
void chrrom_set_size(size_t size) {
set_size(&chrrom_size(), &chrrom.real_size, nes[0].m.memmap.chr.info.chunk.size, size);
chrrom_mask() = calc_mask(chrrom_size());
}
void chrrom_reset_chunks(void) {
for (int nesidx = 0; nesidx < info.number_of_nes; nesidx++) {
@ -834,7 +839,6 @@ BYTE wram_init(void) {
wram_mask() = calc_mask(wram_size());
wram_ram_mask() = calc_mask(wram_ram_size());
wram_nvram_mask() = calc_mask(wram_nvram_size());
// resetto la wram
wram_reset_chunks();
}
@ -855,11 +859,17 @@ void wram_set_ram_size(size_t size) {
wram.ram.size = pow_of_2(size);
wram_size() = wram_ram_size() + wram_nvram_size();
wram.real_size = pow_of_2(wram_size());
wram_mask() = calc_mask(wram_size());
wram_ram_mask() = calc_mask(wram_ram_size());
wram_nvram_mask() = calc_mask(wram_nvram_size());
}
void wram_set_nvram_size(size_t size) {
wram.nvram.size = pow_of_2(size);
wram_size() = wram_ram_size() + wram_nvram_size();
wram.real_size = pow_of_2(wram_size());
wram_mask() = calc_mask(wram_size());
wram_ram_mask() = calc_mask(wram_ram_size());
wram_nvram_mask() = calc_mask(wram_nvram_size());
}
void wram_reset_chunks(void) {
for (int nesidx = 0; nesidx < info.number_of_nes; nesidx++) {
@ -1197,6 +1207,9 @@ void vram_set_ram_size(BYTE nidx, size_t size) {
nes[nidx].m.vram.ram.size = pow_of_2(size);
vram_size(nidx) = vram_ram_size(nidx) + vram_nvram_size(nidx);
nes[nidx].m.vram.real_size = pow_of_2(vram_size(nidx));
vram_mask(nidx) = calc_mask(vram_size(nidx));
vram_ram_mask(nidx) = calc_mask(vram_ram_size(nidx));
vram_nvram_mask(nidx) = calc_mask(vram_nvram_size(nidx));
}
void vram_set_nvram_size(BYTE nidx, size_t size) {
nes[nidx].m.vram.nvram.size = pow_of_2(size);
@ -1336,6 +1349,7 @@ void ram_quit(void) {
}
void ram_set_size(BYTE nidx, size_t size) {
set_size(&ram_size(nidx), &nes[nidx].m.ram.real_size, nes[nidx].m.memmap.ram.info.chunk.size, size);
ram_mask(nidx) = calc_mask(ram_size(nidx));
}
void ram_reset_chunks(void) {
for (int nesidx = 0; nesidx < info.number_of_nes; nesidx++) {
@ -1451,6 +1465,7 @@ void nmt_quit(void) {
}
void nmt_set_size(BYTE nidx, size_t size) {
set_size(&nmt_size(nidx), &nes[nidx].m.nmt.real_size, nes[nidx].m.memmap.nmt.info.chunk.size, size);
nmt_mask(nidx) = calc_mask(nmt_size(nidx));
}
void nmt_reset_chunks(void) {
for (int nesidx = 0; nesidx < info.number_of_nes; nesidx++) {

View file

@ -280,6 +280,7 @@ EXTERNC BYTE memmap_adr_is_readable(BYTE nidx, DBWORD address);
EXTERNC BYTE memmap_adr_is_writable(BYTE nidx, DBWORD address);
EXTERNC WORD memmap_chunk_actual_bank(BYTE nidx, DBWORD address);
EXTERNC BYTE *memmap_chunk_pnt(BYTE nidx, DBWORD address);
EXTERNC WORD memmap_banks_from_size(enum _sizes_types chunk_size, size_t size);
EXTERNC BYTE memmap_prg_region_init(BYTE nidx, size_t chunk_size);
EXTERNC BYTE memmap_chr_region_init(BYTE nidx, size_t chunk_size);

View file

@ -56,7 +56,6 @@ enum nsf_timining {
NSF_TIME_EFFECT_UPDATE = 1000 / 25
};
enum nsf_gui {
NSF_GUI_PPUX = 35,
NSF_GUI_PPUY = 49,
@ -200,12 +199,15 @@ void nsf_info(void) {
log_info_box(uL("copyright;" uPs("") ""), nsf.info.copyright);
log_info_box(uL("ripper;" uPs("") ""), nsf.info.ripper);
log_info_box(uL("text;%s"), nsf.info.text ? "yes" : "no");
log_info_box(uL("region;supported %s%s%s, preferred %s"),
log_info_box(uL("region;supported %s%s%s%s"),
nsf.region.supported & 0x01 ? "NTSC" : "",
nsf.region.supported & 0x02 ? nsf.region.supported & 0x01 ? "/PAL" : "PAL" : "",
nsf.region.supported & 0x04 ? nsf.region.supported & 0x03 ? "/Dendy" : "Dendy" : "",
nsf.region.preferred == NSF_NTSC_MODE ? "NTSC" : nsf.region.preferred == NSF_PAL_MODE
? "PAL" : nsf.region.preferred == NSF_DENDY_MODE ? "Dendy" : "unknown");
(nsf.region.supported == 0x01) || (nsf.region.supported == 0x02) || (nsf.region.supported == 0x04) ? ""
: nsf.region.preferred == NSF_NTSC_MODE ? ", preferred NTSC"
: nsf.region.preferred == NSF_PAL_MODE ? ", preferred PAL"
: nsf.region.preferred == NSF_DENDY_MODE ? ", preferred Dendy"
: ", preferred unknown");
log_info_box(uL("irq support;%s"), nsf2.features.irq_support ? "yes" : "no");
log_info_box(uL("non-ret INIT;%s"), nsf2.features.non_returning_init ? "yes" : "no");
log_info_box(uL("disable PLAY;%s"), nsf2.features.suppressed_PLAY ? "yes" : "no");
@ -322,6 +324,7 @@ BYTE nsf_load_rom(void) {
nsf.adr.load = (flags[LOAD_ADR_HI] << 8) | flags[LOAD_ADR_LO];
nsf.adr.init = (flags[INIT_ADR_HI] << 8) | flags[INIT_ADR_LO];
nsf.adr.play = (flags[PLAY_ADR_HI] << 8) | flags[PLAY_ADR_LO];
nsf.info.use_fade = FALSE;
if ((nsf.songs.total == 0) || (nsf.adr.load < 0x6000) || (nsf.adr.init < 0x6000) || (nsf.adr.play < 0x6000)) {
free(rom.data);
@ -541,6 +544,22 @@ BYTE nsf_load_rom(void) {
nsf.play_speed.dendy = nsf.play_speed.pal;
}
switch (nsf.region.preferred & 0x03) {
case NSF_NTSC_MODE:
info.machine[DATABASE] = NTSC;
break;
case NSF_PAL_MODE:
info.machine[DATABASE] = PAL;
break;
case NSF_DENDY_MODE:
info.machine[DATABASE] = DENDY;
break;
default:
nsf.region.preferred = NSF_NTSC_MODE;
info.machine[DATABASE] = NTSC;
break;
}
nsf.enabled = TRUE;
nsf.songs.current = nsf.songs.starting - 1;
nsf.routine = &nsf_routine[0];
@ -561,7 +580,7 @@ BYTE nsf_load_rom(void) {
return (EXIT_OK);
}
void nsf_after_load_rom(void) {
nsf.scroll_info_nsf.rect.x = SCR_COLUMNS;
nsf.scroll_info_nsf.rect.x = 0;
nsf.scroll_info_nsf.rect.y = 0;
nsf.scroll_info_nsf.rect.w = SCR_COLUMNS;
nsf.scroll_info_nsf.rect.h = 16;
@ -569,7 +588,7 @@ void nsf_after_load_rom(void) {
nsf.scroll_info_nsf.reload = 4.0f;
nsf.scroll_info_nsf.velocity = 6;
nsf.scroll_title_song.rect.x = NSF_GUI_TITLE_W;
nsf.scroll_title_song.rect.x = 0;
nsf.scroll_title_song.rect.y = 0;
nsf.scroll_title_song.rect.w = NSF_GUI_TITLE_W;
nsf.scroll_title_song.rect.h = NSF_GUI_TITLE_H;
@ -595,7 +614,7 @@ void nsf_after_load_rom(void) {
dos_text_curtain_add_line(&nsf.curtain_info, DOS_TL02, DOS_TL01, uL("lemon_10"), 10,
uL("[top][image]:/pics/pics/controller_start.png[endimage] Start : Play/Pause"));
dos_text_curtain_add_line(&nsf.curtain_info, DOS_TL02, DOS_TL01, uL("lemon_10"), 10,
uL("[top][image]:/pics/pics/controller_select.png[endimage] Start : Stop"));
uL("[top][image]:/pics/pics/controller_select.png[endimage] Select : Stop"));
dos_text_curtain_add_line(&nsf.curtain_info, DOS_TL02, DOS_TL01, uL("lemon_10"), 10,
uL("[top][image]:/pics/pics/controller_right.png[endimage] Right : Next Song"));
dos_text_curtain_add_line(&nsf.curtain_info, DOS_TL02, DOS_TL01, uL("lemon_10"), 10,
@ -608,16 +627,14 @@ void nsf_after_load_rom(void) {
uL("[top][image]:/pics/pics/controller_up.png[endimage] Up : Change Effect"));
dos_text_curtain_add_line(&nsf.curtain_info, DOS_TL02, DOS_TL01, uL("lemon_10"), 10,
uL("or use your [top][image]:/pics/pics/controller_mouse.png[endimage] "));
}
void nsf_init_tune(void) {
WORD i = 0;
BYTE reset = info.reset;
info.reset = HARD;
info.disable_tick_hw = TRUE;
nes[0].c.cpu.SP = 0xFD;
memset(ram_pnt(0), 0x00, ram_size(0));
ram_memset();
wram_memset();
if (nsf.sound_chips.vrc6) {
@ -639,7 +656,7 @@ void nsf_init_tune(void) {
init_NSF_FME7();
}
for (i = 0x4000; i < 0x4014; i++) {
for (WORD i = 0x4000; i < 0x4014; i++) {
cpu_wr_mem(0, i, 0x00);
}
cpu_wr_mem(0, 0x4015, 0x00);
@ -654,6 +671,7 @@ void nsf_init_tune(void) {
nsf_reset_prg();
info.disable_tick_hw = FALSE;
info.reset = reset;
nsf.state = NSF_PLAY;
nsf.songs.started = FALSE;
@ -959,6 +977,8 @@ void nsf_controls_mouse_in_gui(int x_mouse, int y_mouse) {
}
return;
}
}
if (nsf.info.use_fade) {
x = NSF_GUI_OPTIONS_3_PPUX;
if (((x_mouse >= x) && (x_mouse <= (x + w))) && ((y_mouse >= y) && (y_mouse <= (y + h)))) {
cfg->nsf_player_nsf_fadeout = !cfg->nsf_player_nsf_fadeout;
@ -1379,7 +1399,7 @@ static void nsf_draw_controls(void) {
if (nsf.info.text) {
static int sauthnote = -1;
if (sauthnote != (nsf.authors_note == PRESSED)) {
if (force_draw || (sauthnote != (nsf.authors_note == PRESSED))) {
dos_image(0, (NSF_GUI_PPUX + dos_resource_w(uL(":/pics/pics/nsf_player.png"))) - dos_resource_w(uL(":/pics/pics/authors_note_press.png")),
NSF_GUI_PPUY - dos_resource_h(uL(":/pics/pics/authors_note_press.png")), 0, 0, -1, -1, nsf.authors_note == PRESSED
? uL(":/pics/pics/authors_note_press.png") : uL(":/pics/pics/authors_note_no_press.png"), NULL, 0);
@ -1388,7 +1408,7 @@ static void nsf_draw_controls(void) {
}
// titolo canzone
if (nsf.current_song.track_label) {
if (dos_text_pixels_w(uL("Ttyp0_11"), 11, nsf.current_song.track_label) > 182) {
if (dos_text_pixels_w(uL("Ttyp0_11"), 11, nsf.current_song.track_label) > NSF_GUI_TITLE_W) {
dos_text_scroll_tick(0, NSF_GUI_TITLE_PPUX, NSF_GUI_TITLE_PPUY, DOS_TL03, DOS_TL01,
uL("Ttyp0_11"), 11, &nsf.scroll_title_song, nsf.current_song.track_label);
} else if (nsf.curtain_title_song.count > 0) {
@ -1451,7 +1471,7 @@ static void nsf_draw_controls(void) {
umemset(buff, 0x00, usizeof(buff));
usnprintf(buff, usizeof(buff), uL("Playlist "));
ustrncat(buff, usizeof(buff), uL("" uPs("") "/"), nsf_print_number(nsf.playlist.index + 1, 3, fg));
ustrncat(buff, usizeof(buff), uL("" uPs("") ""), nsf_print_number(nsf.playlist.count + 1, 3, fg));
ustrncat(buff, usizeof(buff), uL("" uPs("") ""), nsf_print_number(nsf.playlist.count, 3, fg));
dos_text(0, NSF_GUI_PLIST_PPUX, NSF_GUI_PLIST_PPUY,
DOS_ALIGNHCENTER, 0, NSF_GUI_PLIST_W, NSF_GUI_PLIST_H, fg, bg, uL("lemon_10"), 10, buff);
spindex = nsf.playlist.index;
@ -1568,7 +1588,7 @@ static void nsf_draw_controls(void) {
}
if (force_draw || (sfadeout != cfg->nsf_player_nsf_fadeout)) {
nsf_print_option(NSF_GUI_OPTIONS_3_PPUX, NSF_GUI_OPTIONS_BOX_PPUY,
uL("Fadeout"), nsf.info_song && nsf.current_song.fade, cfg->nsf_player_nsf_fadeout);
uL("Fadeout"), nsf.info.use_fade, cfg->nsf_player_nsf_fadeout);
sfadeout = cfg->nsf_player_nsf_fadeout;
}
}
@ -1698,6 +1718,10 @@ static void nsf_reset_song_variables(void) {
nsf.current_song.time = -1;
nsf.current_song.fade = -1;
}
if (nsf.scroll_title_song.pimage.data) {
free(nsf.scroll_title_song.pimage.data);
nsf.scroll_title_song.pimage.data = NULL;
}
nsf_reset_song_title();
}
static void ustrncat(uTCHAR *buffer, size_t buffer_size, const uTCHAR *fmt, ...) {

View file

@ -38,17 +38,17 @@ enum nsf_states {
NSF_RESTART_SONG = 0x400,
};
enum nsf_routine_addresses {
NSF_ROUTINE_SIZE = 0x50,
NSF_ROUTINE_SIZE = 0x56,
NSF_ROUTINE_START = 0x2500,
NSF_ROUTINE_END = NSF_ROUTINE_START + (NSF_ROUTINE_SIZE - 1),
NSF_ROUTINE_CLEAR_ALL = 0x2518,
NSF_ROUTINE_LOOP = 0x254D,
NSF_ROUTINE_CLEAR_ALL = 0x251A,
NSF_ROUTINE_LOOP = 0x2553,
NSF_ROUTINE_NMI = 0x2500,
NSF_ROUTINE_NMI_RTI = 0x2514,
NSF_ROUTINE_NORMAL = 0x2536,
NSF_ROUTINE_NSF_INIT = 0x2525,
NSF_ROUTINE_RESET = 0x2515,
NSF_ROUTINE_YES_PLAY = 0x2521,
NSF_ROUTINE_NMI_RTI = 0x2516,
NSF_ROUTINE_NORMAL = 0x253C,
NSF_ROUTINE_NSF_INIT = 0x2527,
NSF_ROUTINE_RESET = 0x2517,
NSF_ROUTINE_YES_PLAY = 0x2523,
NSF_DATA_SIZE = 0x0B,
NSF_DATA_START = 0x2600,
@ -132,6 +132,7 @@ typedef struct _nsf {
uTCHAR *copyright;
uTCHAR *ripper;
uTCHAR *text;
BYTE use_fade;
} info;
struct _nsf_play_speed {
WORD ntsc;
@ -210,7 +211,8 @@ static const BYTE nsf_routine[NSF_ROUTINE_SIZE] = {
;$2609-$260A - loop address
.org $2500
NMI: PHA
NMI: PHP
PHA
LDA $2605
BEQ NMI_END
NMI_NRET: TXA
@ -225,6 +227,7 @@ NMI_NRET: TXA
PLA
TAX
NMI_END: PLA
PLP
NMI_RTI: RTI
RESET: JMP LOOP
CLEAR_ALL: RTS
@ -234,6 +237,9 @@ _PLAY: LDA $2606
_YES_PLAY JMP ($2602)
_NO_PLAY: RTS
NSF_INIT: JSR CLEAR_ALL
LDX #$FF ; inizializzo lo stack pointer
TXS ;
CLC ; azzero il carry flag ("Layla - The Iris Missions.nsfe" non funziona correttamente senza questo)
LDA $2607
LDX $2608
LDY $2605
@ -251,31 +257,32 @@ INIT_NRET: LDY #$80
LOOP: JMP ($2609)
.end
CLEAR_ALL $2518
INIT_NRET $253C
LOOP $254D
CLEAR_ALL $251A
INIT_NRET $2542
LOOP $2553
NMI $2500
NMI_END $2513
NMI_NRET $2506
NMI_RTI $2514
NORMAL $2536
NSF_INIT $2525
RESET $2515
_INIT $2519
_NO_PLAY $2524
_PLAY $251C
_YES_PLAY $2521
NMI_END $2514
NMI_NRET $2507
NMI_RTI $2516
NORMAL $253C
NSF_INIT $2527
RESET $2517
_INIT $251B
_NO_PLAY $2526
_PLAY $251E
_YES_PLAY $2523
*/
0x48, 0xAD, 0x05, 0x26, 0xF0, 0x0D, 0x8A, 0x48,
0x98, 0x48, 0x78, 0x20, 0x1C, 0x25, 0x58, 0x68,
0xA8, 0x68, 0xAA, 0x68, 0x40, 0x4C, 0x4D, 0x25,
0x60, 0x6C, 0x00, 0x26, 0xAD, 0x06, 0x26, 0xD0,
0x03, 0x6C, 0x02, 0x26, 0x60, 0x20, 0x18, 0x25,
0xAD, 0x07, 0x26, 0xAE, 0x08, 0x26, 0xAC, 0x05,
0x26, 0xD0, 0x09, 0x20, 0x19, 0x25, 0x20, 0x1C,
0x25, 0x4C, 0x4D, 0x25, 0xA0, 0x80, 0x20, 0x19,
0x25, 0x58, 0xAD, 0x07, 0x26, 0xAE, 0x08, 0x26,
0xA0, 0x81, 0x20, 0x19, 0x25, 0x6C, 0x09, 0x26
0x08, 0x48, 0xAD, 0x05, 0x26, 0xF0, 0x0D, 0x8A,
0x48, 0x98, 0x48, 0x78, 0x20, 0x1E, 0x25, 0x58,
0x68, 0xA8, 0x68, 0xAA, 0x68, 0x28, 0x40, 0x4C,
0x53, 0x25, 0x60, 0x6C, 0x00, 0x26, 0xAD, 0x06,
0x26, 0xD0, 0x03, 0x6C, 0x02, 0x26, 0x60, 0x20,
0x1A, 0x25, 0xA2, 0xFF, 0x9A, 0x18, 0xAD, 0x07,
0x26, 0xAE, 0x08, 0x26, 0xAC, 0x05, 0x26, 0xD0,
0x09, 0x20, 0x1B, 0x25, 0x20, 0x1E, 0x25, 0x4C,
0x53, 0x25, 0xA0, 0x80, 0x20, 0x1B, 0x25, 0x58,
0xAD, 0x07, 0x26, 0xAE, 0x08, 0x26, 0xA0, 0x81,
0x20, 0x1B, 0x25, 0x6C, 0x09, 0x26
};
#endif

View file

@ -109,6 +109,9 @@ BYTE nsfe_load_rom(void) {
info.number_of_nes = 1;
info.machine[DATABASE] = DEFAULT;
memset(&nsf2, 0x00, sizeof(_nsf2));
nsf.info.use_fade = FALSE;
for (phase = NSFE_COUNT; phase <= NSFE_READ; phase++) {
rom.position = 4;
@ -238,6 +241,22 @@ BYTE nsfe_load_rom(void) {
nsf.play_speed.dendy = nsf.play_speed.pal;
}
switch (nsf.region.preferred & 0x03) {
case NSF_NTSC_MODE:
info.machine[DATABASE] = NTSC;
break;
case NSF_PAL_MODE:
info.machine[DATABASE] = PAL;
break;
case NSF_DENDY_MODE:
info.machine[DATABASE] = DENDY;
break;
default:
nsf.region.preferred = NSF_NTSC_MODE;
info.machine[DATABASE] = NTSC;
break;
}
ram_set_size(0, S2K);
ram_init();
@ -510,6 +529,7 @@ BYTE nsfe_fade(_rom_mem *rom, BYTE phase) {
rom_mem_memcpy(&song->fade, rom, 4);
nsf.chunk.length -= 4;
nsf.info.use_fade = TRUE;
}
rom->position += nsf.chunk.length;
@ -549,6 +569,7 @@ BYTE nsfe_tlbl(_rom_mem *rom, BYTE phase) {
index += size;
}
if (!size) {
index++;
size = gui_utf8_to_utchar(&nsf_default_label[0], &song->track_label, strlen(nsf_default_label));
}
}

View file

@ -584,7 +584,7 @@ void ppu_tick(BYTE nidx) {
* altrimenti visualizzo un pixel del
* colore 0 della paletta.
*/
put_pixel(nes[nidx].m.memmap_palette.color[0])
put_emphasis(0)
if ((nes[nidx].p.r2006.value & 0xFF00) == 0x3F00) {
/*

View file

@ -204,8 +204,10 @@ void recording_init(void) {
}
av_dict_free(&opts);
opts = NULL;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0)
avcodec_close(test);
av_free(test);
#endif
avcodec_free_context(&test);
if (finded) {
break;
}
@ -487,7 +489,9 @@ static void ffmpeg_fstream_close(_ffmpeg_stream *fs) {
fs->encode = FALSE;
fs->avc = NULL;
if (fs->avcc) {
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0)
avcodec_close(fs->avcc);
#endif
avcodec_free_context(&fs->avcc);
}
if (fs->avf) {

View file

@ -32,7 +32,7 @@
#include "nsf.h"
#include "cheat.h"
#define SAVE_VERSION 100
#define SAVE_VERSION 101
static BYTE mem_with_size(BYTE mode, BYTE slot, BYTE *mem, size_t msize, FILE *fp);
static void preview_image_from_ppu_screen(BYTE slot, _ppu_screen_buffer *sb, void **dst, size_t *size);
@ -257,6 +257,9 @@ BYTE save_slot_operation(BYTE mode, BYTE slot, FILE *fp) {
save_slot_ele(mode, slot, nes[nesidx].c.cpu.prg_ram_rd_active);
save_slot_ele(mode, slot, nes[nesidx].c.cpu.prg_ram_wr_active);
save_slot_ele(mode, slot, nes[nesidx].c.cpu.base_opcode_cycles);
if (save_slot.version >= 101) {
save_slot_ele(mode, slot, nes[nesidx].c.cpu.jammed);
}
// irq
save_slot_ele(mode, slot, nes[nesidx].c.irq.high);

View file

@ -24,8 +24,8 @@
#define VER1 "0"
#define VER1_INT 0
#define VER2 "111"
#define VER2_INT 111
#define VER2 "112"
#define VER2_INT 112
#if defined (RELEASE) && !defined (WITH_GIT_INFO)
#define VERSION VER1 "." VER2

View file

@ -1092,7 +1092,7 @@ OPLL *OPLL_new(uint32_t clk, uint32_t rate) {
initializeTables();
}
opll = (OPLL *)calloc(sizeof(OPLL), 1);
opll = (OPLL *)calloc(1, sizeof(OPLL));
if (opll == NULL)
return NULL;

Binary file not shown.

View file

@ -104,6 +104,21 @@
<addaction name="action_Current_state_to_Quick_Disk"/>
<addaction name="action_Current_state_to_puNES_image"/>
</widget>
<widget class="QMenu" name="menu_Empty_Disk">
<property name="title">
<string>Create Empt&amp;y Disk</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icon/icons/disk_empty.svgz</normaloff>:/icon/icons/disk_empty.svgz</iconset>
</property>
<addaction name="action_Empty_Disk_FDS_Format_with_Header"/>
<addaction name="action_Empty_Disk_FDS_Format_without_Header"/>
<addaction name="action_Empty_Disk_Quick_Disk_Format"/>
<addaction name="action_Empty_Disk_DS_FDS_Format_with_Header"/>
<addaction name="action_Empty_Disk_DS_FDS_Format_without_Header"/>
<addaction name="action_Empty_Disk_DS_Quick_Disk_Format"/>
</widget>
<addaction name="action_Turn_Off"/>
<addaction name="action_Hard_Reset"/>
<addaction name="action_Soft_Reset"/>
@ -115,6 +130,7 @@
<addaction name="menu_Disk_Side"/>
<addaction name="action_Eject_Insert_Disk"/>
<addaction name="action_Change_Disk"/>
<addaction name="menu_Empty_Disk"/>
<addaction name="menu_Export_Current_state"/>
<addaction name="separator"/>
<addaction name="menu_Tape"/>
@ -819,6 +835,36 @@
<string>C&amp;hange Disk</string>
</property>
</action>
<action name="action_Empty_Disk_FDS_Format_with_Header">
<property name="text">
<string>Single Side &amp;FDS Format (with Header)</string>
</property>
</action>
<action name="action_Empty_Disk_FDS_Format_without_Header">
<property name="text">
<string>Single Side F&amp;DS Format (without Header)</string>
</property>
</action>
<action name="action_Empty_Disk_Quick_Disk_Format">
<property name="text">
<string>Single Side &amp;Quick Disk Format</string>
</property>
</action>
<action name="action_Empty_Disk_DS_FDS_Format_with_Header">
<property name="text">
<string>Double Sides &amp;FDS Format (with Header)</string>
</property>
</action>
<action name="action_Empty_Disk_DS_FDS_Format_without_Header">
<property name="text">
<string>Double Sides F&amp;DS Format (without Header)</string>
</property>
</action>
<action name="action_Empty_Disk_DS_Quick_Disk_Format">
<property name="text">
<string>Double Sides &amp;Quick Disk Format</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

View file

@ -7,6 +7,7 @@
<file>icons/flag_arabic.svgz</file>
<file>icons/bios.svgz</file>
<file>icons/buffer_size.svgz</file>
<file>icons/disk_empty.svgz</file>
<file>icons/barcode.svgz</file>
<file>icons/camera.svgz</file>
<file>icons/flag_germany.svgz</file>
@ -246,6 +247,10 @@
<file>pics/overlay_zapper.png</file>
<file>pics/overlay_floppy_gray.png</file>
<file>pics/overlay_floppy_green.png</file>
<file>pics/overlay_fds_motor_led_off.png</file>
<file>pics/overlay_fds_motor_led_on.png</file>
<file>pics/overlay_fds_motor_led_read.png</file>
<file>pics/overlay_fds_motor_led_write.png</file>
<file>pics/overlay_floppy_red.png</file>
<file>pics/overlay_mouse.png</file>
<file>pics/overlay_mouse_button.png</file>

View file

@ -1740,7 +1740,7 @@
<message>
<source>[red]error loading Game Genie rom[normal]</source>
<extracomment>Do not translate the words contained between parentheses (example: [red] or [normal]) are tags that have a specific meaning and do not traslate %1 and %2</extracomment>
<translation>[red]حصل خطأ في أثناء تحميل روم غيم جيني[normal]</translation>
<translation>[red]تعثرت عملية تشغيل روم غيم جيني[normal]</translation>
</message>
<message>
<source>[red]Illegal Opcode[normal] [yellow]0x%1[normal] at [yellow]0x%2[normal]</source>
@ -1750,7 +1750,7 @@
<message>
<source>[red]error loading rom[normal]</source>
<extracomment>Do not translate the words contained between parentheses (example: [red] or [normal]) are tags that have a specific meaning and do not traslate %1 and %2</extracomment>
<translation>[red]خطأ في أثناء تحميل الروم[normal]</translation>
<translation>[red]تعثرت عملية تشغيل الروم[normal]</translation>
</message>
<message>
<source>[red]FDS bios not found[normal]</source>

View file

@ -84,7 +84,7 @@
</message>
<message>
<source>Dip Switches</source>
<translation type="unfinished">Dip Switches</translation>
<translation>Dip Switches</translation>
</message>
</context>
<context>
@ -627,11 +627,11 @@
</message>
<message>
<source>Subor Keyboard plus mouse (3x8-bit)</source>
<translation type="unfinished">Subor Keyboard plus mouse (3x8-bit)</translation>
<translation>Klawiatura Subor plus mysz (3x8-bit)</translation>
</message>
<message>
<source>Subor Keyboard plus mouse (24-bit)</source>
<translation type="unfinished">Subor Keyboard plus mouse (24-bit)</translation>
<translation>Klawiatura Subor plus mysz (24-bit)</translation>
</message>
<message>
<source>SNES Mouse ($4017.0)</source>
@ -639,11 +639,11 @@
</message>
<message>
<source>Unknown Famiclone Keyboard (Golden Key)</source>
<translation type="unfinished">Unknown Famiclone Keyboard (Golden Key)</translation>
<translation>Nieznana klawiatura Famiclone (Golden Key)</translation>
</message>
<message>
<source>Subor Keyboard plus mouse (24-bit $4017)</source>
<translation type="unfinished">Subor Keyboard plus mouse (24-bit $4017)</translation>
<translation>Klawiatura Subor plus mysz (24-bit $4017)</translation>
</message>
<message>
<source>Port Test</source>
@ -969,7 +969,7 @@
</message>
<message>
<source>which Floppy Disk image do you want to load?</source>
<translation type="unfinished">which Floppy Disk image do you want to load?</translation>
<translation>który obraz dyskietki chcesz wgrać?</translation>
</message>
</context>
<context>
@ -1615,7 +1615,7 @@
</message>
<message>
<source>Detach &amp;Barcode</source>
<translation type="unfinished">Detach &amp;Barcode</translation>
<translation>Odłącz kod kreskowy</translation>
</message>
<message>
<source>Floppy Disk image files</source>
@ -1651,15 +1651,15 @@
</message>
<message>
<source>Impossible write %0.</source>
<translation type="unfinished">Impossible write %0.</translation>
<translation>Niemożliwy zapis %0.</translation>
</message>
<message>
<source>to &amp;FDS Format (with Header)</source>
<translation type="unfinished">to &amp;FDS Format (with Header)</translation>
<translation>do formatu &amp;FDS (z nagłówkiem)</translation>
</message>
<message>
<source>to &amp;Quick Disk Format</source>
<translation type="unfinished">to &amp;Quick Disk Format</translation>
<translation>do formatu &amp;Quick Disk</translation>
</message>
<message>
<source>to puNES image</source>
@ -1667,7 +1667,7 @@
</message>
<message>
<source>to F&amp;DS Format (without Header)</source>
<translation type="unfinished">to F&amp;DS Format (without Header)</translation>
<translation>do formatu F&amp;DS (bez nagłówka)</translation>
</message>
<message>
<source>C&amp;hange Disk</source>
@ -1675,7 +1675,7 @@
</message>
<message>
<source>E&amp;xport current state of Disk/Disks</source>
<translation type="unfinished">E&amp;xport current state of Disk/Disks</translation>
<translation>Eksportuj bieżący stan dysku/dysków</translation>
</message>
<message>
<source>Open Floppy Disk Image</source>
@ -1683,7 +1683,7 @@
</message>
<message>
<source>&amp;Dip Switches</source>
<translation type="unfinished">&amp;Dip Switches</translation>
<translation>&amp;Dip Switches</translation>
</message>
</context>
<context>
@ -1920,12 +1920,12 @@
<message>
<source>auto switch [red]disabled[normal], game not compatible</source>
<extracomment>Do not translate the words contained between parentheses (example: [red] or [normal]) are tags that have a specific meaning and do not traslate %1 and %2</extracomment>
<translation type="unfinished">auto switch [red]disabled[normal], game not compatible</translation>
<translation>automatyczne przełączenie [red]wyłączone[normal], gra nie jest kompatybilna</translation>
</message>
<message>
<source>auto switch [red]disabled[normal], single-sided disk</source>
<extracomment>Do not translate the words contained between parentheses (example: [red] or [normal]) are tags that have a specific meaning and do not traslate %1 and %2</extracomment>
<translation type="unfinished">auto switch [red]disabled[normal], single-sided disk</translation>
<translation>automatyczne przełączenie [red]wyłączone[normal], dysk jednostronny</translation>
</message>
</context>
<context>

File diff suppressed because it is too large Load diff

View file

@ -179,7 +179,7 @@
</message>
<message>
<source>Trainer</source>
<translation></translation>
<translation></translation>
</message>
<message>
<source>Unspecified</source>
@ -239,15 +239,15 @@
</message>
<message>
<source>Konami Hyper Shot</source>
<translation></translation>
<translation>Konami </translation>
</message>
<message>
<source>Coconuts Pachinko</source>
<translation></translation>
<translation>Coconuts </translation>
</message>
<message>
<source>Exciting Boxing Punching Bag</source>
<translation></translation>
<translation></translation>
</message>
<message>
<source>Jissen Mahjong Controller</source>
@ -275,7 +275,7 @@
</message>
<message>
<source>Top Rider</source>
<translation></translation>
<translation></translation>
</message>
<message>
<source>Double-Fisted</source>
@ -3179,23 +3179,23 @@
</message>
<message>
<source>Per-Game</source>
<translation type="unfinished">Per-Game</translation>
<translation></translation>
</message>
<message>
<source>Per-Game Overclock Setting</source>
<translation type="unfinished">Per-Game Overclock Setting</translation>
<translation></translation>
</message>
<message>
<source>On</source>
<translation type="unfinished">On</translation>
<translation></translation>
</message>
<message>
<source>Off</source>
<translation type="unfinished">Off</translation>
<translation></translation>
</message>
<message>
<source>Default Value</source>
<translation type="unfinished">Default Value</translation>
<translation></translation>
</message>
</context>
<context>

View file

@ -190,7 +190,7 @@
</widget>
</item>
<item>
<widget class="overlayWidgetFloppy" name="overlayFloppy" native="true">
<widget class="overlayWidgetFastForward" name="overlayFastForward" native="true">
<property name="minimumSize">
<size>
<width>16</width>
@ -200,7 +200,7 @@
</widget>
</item>
<item>
<widget class="overlayWidgetFastForward" name="overlayFastForward" native="true">
<widget class="overlayWidgetFloppy" name="overlayFloppy" native="true">
<property name="minimumSize">
<size>
<width>16</width>

View file

@ -596,6 +596,7 @@
<tabstop>pushButton_cm_famicom</tabstop>
<tabstop>pushButton_cm_fscore</tabstop>
<tabstop>comboBox_exp</tabstop>
<tabstop>pushButton_ep</tabstop>
<tabstop>comboBox_cp1</tabstop>
<tabstop>pushButton_cp1</tabstop>
<tabstop>comboBox_cp2</tabstop>

View file

@ -22,8 +22,8 @@
#include "version.h"
#include "gui.h"
dlgCmdLineHelp::dlgCmdLineHelp(QWidget *parent, const QString name, const QString title, const uTCHAR *usage_string) : QDialog(parent) {
init(name, title, usage_string);
dlgCmdLineHelp::dlgCmdLineHelp(QWidget *parent, const QString title, const uTCHAR *usage_string) : QDialog(parent) {
init(title, usage_string, false);
}
dlgCmdLineHelp::dlgCmdLineHelp(QWidget *parent, const QString name) : QDialog(parent) {
uTCHAR *usage_string;
@ -155,7 +155,7 @@ dlgCmdLineHelp::dlgCmdLineHelp(QWidget *parent, const QString name) : QDialog(pa
main_cfg[SET_ONLYCMDLINE_HIDDEN_GUI].hlp,
sch_input
);
init(name, uQString(uL("" NAME " Command Line Help")), usage_string);
init(uQString(uL("" NAME " Command Line Help")), uQStringCD(uQString(usage_string).arg(name)));
free(usage_string);
}
dlgCmdLineHelp::~dlgCmdLineHelp() = default;
@ -165,7 +165,7 @@ void dlgCmdLineHelp::closeEvent( QCloseEvent* event ) {
QDialog::closeEvent(event);
}
void dlgCmdLineHelp::init(const QString name, const QString title, const uTCHAR *usage_string) {
void dlgCmdLineHelp::init(const QString title, const uTCHAR *usage_string, bool use_html) {
setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
@ -178,10 +178,19 @@ void dlgCmdLineHelp::init(const QString name, const QString title, const uTCHAR
setFont(font);
}
if (name.isEmpty()) {
{
QFont monospace("Monospace");
monospace.setPointSize(font().pointSize());
textEdit_cmdLineHelp->setFont(monospace);
}
if (use_html) {
textEdit_cmdLineHelp->setHtml("<pre>" + uQString(usage_string) + "</pre>");
} else {
textEdit_cmdLineHelp->setHtml("<pre>" + uQString(usage_string).arg(name) + "</pre>");
// in questo modo il QTextEdit utilizza il lineWrapMode, cosa che non farebbe con
// l'html inserito nel tag '<pre>...</pre>'
textEdit_cmdLineHelp->setPlainText(uQString(usage_string));
}
connect(pushButton_Close, SIGNAL(clicked(bool)), this, SLOT(s_close_clicked(bool)));

View file

@ -27,7 +27,7 @@ class dlgCmdLineHelp : public QDialog, public Ui::dlgCmdLineHelp {
Q_OBJECT
public:
explicit dlgCmdLineHelp(QWidget *parent, const QString name, const QString title, const uTCHAR *usage_string);
explicit dlgCmdLineHelp(QWidget *parent, const QString title, const uTCHAR *usage_string);
explicit dlgCmdLineHelp(QWidget *parent = nullptr, const QString name = "");
~dlgCmdLineHelp() override;
@ -35,7 +35,7 @@ class dlgCmdLineHelp : public QDialog, public Ui::dlgCmdLineHelp {
void closeEvent(QCloseEvent *event) override;
private:
void init(const QString name, const QString title, const uTCHAR *usage_string);
void init(const QString title, const uTCHAR *usage_string, bool use_html = true);
private slots:
void s_close_clicked(bool checked);

View file

@ -47,6 +47,8 @@ typedef struct _joy_list {
extern _joy_list joy_list;
class pixmapButton: public QPushButton {
Q_OBJECT
private:
QPixmap pixmap;

View file

@ -305,10 +305,10 @@ void dos_text_scroll_tick(BYTE nidx, int ppu_x, int ppu_y, const WORD fg_def, co
if (!scroll->pimage.data) {
dos_text_pixels_size(&scroll->pimage.w, &scroll->pimage.h, font_family, font_size, &text[0]);
if (!scroll->pimage.w || !scroll->pimage.h) {
return;
}
scroll->x = -(scroll->pimage.w - scroll->velocity);
scroll->pimage.w += scroll->rect.w;
scroll->pimage.data = _dos_text_to_ppu_image(0, 0, scroll->pimage.w, scroll->pimage.h,
fg_def, bg_def, font_family, font_size, &text[0]);
@ -317,11 +317,13 @@ void dos_text_scroll_tick(BYTE nidx, int ppu_x, int ppu_y, const WORD fg_def, co
scroll->timer -= 0.34f;
if (scroll->timer < 0) {
scroll->timer = scroll->reload;
scroll->rect.x -= scroll->velocity;
dos_draw_ppu_image(nidx, ppu_x + scroll->rect.x, ppu_y,
0, 0, scroll->pimage.w, scroll->pimage.h, scroll->pimage.data);
if ((scroll->rect.x + ((scroll->pimage.w - scroll->rect.w))) < 0) {
scroll->rect.x = scroll->rect.w;
scroll->x -= scroll->velocity;
dos_draw_ppu_image(nidx, ppu_x, ppu_y,
scroll->rect.x, scroll->rect.y, scroll->rect.w, scroll->rect.h,
scroll->pimage.w, scroll->pimage.h,
scroll->x, 0, scroll->pimage.data);
if ((scroll->x + ((scroll->pimage.w - scroll->rect.w))) < 0) {
scroll->x = scroll->rect.w;
}
}
}
@ -339,12 +341,16 @@ void dos_text_curtain(BYTE nidx, int ppu_x, int ppu_y, _dos_text_curtain *curtai
if (curtain->redraw.all) {
curtain->redraw.all = FALSE;
dos_draw_ppu_image(nidx, ppu_x, ppu_y,
0, 0, curtain->image.w, curtain->image.h, curtain->line[curtain->index].data);
0, 0, curtain->image.w, curtain->image.h,
curtain->image.w, curtain->image.h,
0, 0, curtain->line[curtain->index].data);
}
if (curtain->timer <= 0) {
if (!curtain->pause) {
dos_draw_ppu_image(nidx, ppu_x, ppu_y + curtain->h,
0, curtain->h, curtain->image.w, 1, curtain->line[curtain->index].data);
dos_draw_ppu_image(nidx, ppu_x, ppu_y,
0, curtain->h, curtain->image.w, 1,
curtain->image.w, 1,
0, 0, curtain->line[curtain->index].data);
curtain->h++;
if (curtain->h == curtain->image.h) {
curtain->h = 0;
@ -585,22 +591,31 @@ void dos_image(BYTE nidx, int ppu_x, int ppu_y, int rect_x, int rect_y, int rect
}
void dos_draw_ppu_image(BYTE nidx, int ppu_x, int ppu_y, int rect_x, int rect_y, int rect_w, int rect_h,
WORD *ppu_image) {
int img_w, int img_h, int scroll_x, int scroll_y, WORD *ppu_image) {
if (ppu_image) {
for (int iy = 0; iy < rect_h; iy++) {
const WORD *src_line = ppu_image + (iy + rect_y) * rect_w + rect_x;
int py = iy + ppu_y;
if (py < 0 || py >= SCR_ROWS) {
int ppux0 = (rect_x + ppu_x) < 0 ? 0 : rect_x + ppu_x;
int ppuy0 = (rect_y + ppu_y) < 0 ? 0 : rect_y + ppu_y;
int ppux1 = (ppux0 + rect_w) >= SCR_COLUMNS ? SCR_COLUMNS : ppux0 + rect_w;
int ppuy1 = (ppuy0 + rect_h) >= SCR_ROWS ? SCR_ROWS : ppuy0 + rect_h;
for (int iy = 0; iy < img_h; iy++) {
const WORD *src_line = ppu_image + ((iy + rect_y) * img_w);
int py = (ppuy0 + iy) + scroll_y;
if ((py < ppuy0) || (py >= ppuy1)) {
continue;
}
WORD *dst_line = nes[nidx].p.ppu_screen.wr->line[py] + ppu_x;
{
WORD *dst_line = nes[nidx].p.ppu_screen.wr->line[py];
for (int ix = 0; ix < rect_w; ix++) {
int px = ix + ppu_x;
if (px < 0 || px >= SCR_COLUMNS) {
continue;
for (int ix = 0; ix < img_w; ix++) {
int px = (ppux0 + ix) + scroll_x;
if ((px < ppux0) || (px >= ppux1)) {
continue;
}
dst_line[px] = src_line[ix];
}
dst_line[ix] = src_line[ix];
}
}
}

View file

@ -76,6 +76,7 @@ typedef struct _dos_text_scroll {
_dos_text_ppu_image pimage;
double timer;
double reload;
int x;
int velocity;
} _dos_text_scroll;
typedef struct _dos_text_curtain {
@ -126,7 +127,7 @@ EXTERNC void dos_image(BYTE nidx, int ppu_x, int ppu_y, int rect_x, int rect_y,
const uTCHAR *resource, WORD *ppu_image, uint32_t pitch);
EXTERNC void dos_draw_ppu_image(BYTE nidx, int ppu_x, int ppu_y, int rect_x, int rect_y, int rect_w, int rect_h,
WORD *ppu_image);
int img_w, int img_h, int scroll_x, int scroll_y, WORD *ppu_image);
EXTERNC int dos_resource_w(const uTCHAR *resource);
EXTERNC int dos_resource_h(const uTCHAR *resource);

View file

@ -73,12 +73,15 @@ void js_os_jdev_open(_js_device *jdev, void *arg) {
const char *vid = udev_device_get_sysattr_value(udevd, "id/vendor");
const char *ver = udev_device_get_sysattr_value(udevd, "id/version");
const char *name = udev_device_get_sysattr_value(udevd, "name");
const char *uniq = udev_device_get_sysattr_value(udevd, "uniq");
jdev->usb.bustype = strtoul(btype, NULL, 16);
jdev->usb.vendor_id = strtoul(vid, NULL, 16);
jdev->usb.product_id = strtoul(pid, NULL, 16);
jdev->usb.version = strtoul(ver, NULL, 16);
ustrncpy(jdev->desc, name, usizeof(jdev->desc) - 1);
ustrncpy(jdev->uniq, uniq, usizeof(jdev->uniq) - 1);
} else {
return;
}

View file

@ -895,6 +895,12 @@ void mainWindow::connect_menu_signals(void) {
connect_action(action_Switch_sides, 0xFFF, SLOT(s_disk_side()));
connect_action(action_Eject_Insert_Disk, SLOT(s_eject_disk()));
connect_action(action_Change_Disk, SLOT(s_change_disk()));
connect_action(action_Empty_Disk_FDS_Format_with_Header, 0, SLOT(s_create_empty_disk()));
connect_action(action_Empty_Disk_FDS_Format_without_Header, 1, SLOT(s_create_empty_disk()));
connect_action(action_Empty_Disk_Quick_Disk_Format, 2, SLOT(s_create_empty_disk()));
connect_action(action_Empty_Disk_DS_FDS_Format_with_Header, 3, SLOT(s_create_empty_disk()));
connect_action(action_Empty_Disk_DS_FDS_Format_without_Header, 4, SLOT(s_create_empty_disk()));
connect_action(action_Empty_Disk_DS_Quick_Disk_Format, 5, SLOT(s_create_empty_disk()));
connect_action(action_Current_state_to_FDS_with_Header, 0, SLOT(s_export_fds_image()));
connect_action(action_Current_state_to_FDS_without_Header, 1, SLOT(s_export_fds_image()));
connect_action(action_Current_state_to_Quick_Disk, 2, SLOT(s_export_fds_image()));
@ -1182,12 +1188,14 @@ void mainWindow::update_fds_menu(void) {
ctrl_disk_side(action_Disk_4_side_B);
action_Eject_Insert_Disk->setEnabled(true);
action_Change_Disk->setEnabled(true);
menu_Empty_Disk->setEnabled(true);
menu_Export_Current_state->setEnabled(true);
} else {
action_text(action_Eject_Insert_Disk, tr("&Eject/Insert disk"), sc);
menu_Disk_Side->setEnabled(false);
action_Eject_Insert_Disk->setEnabled(false);
action_Change_Disk->setEnabled(false);
menu_Empty_Disk->setEnabled(false);
menu_Export_Current_state->setEnabled(false);
}
}
@ -1626,6 +1634,72 @@ void mainWindow::s_change_disk(void) {
emu_thread_continue();
}
void mainWindow::s_create_empty_disk(void) {
int format = QVariant(((QObject *)sender())->property("myValue")).toInt();
QStringList filters;
QString file;
emu_thread_pause();
switch (format) {
default:
case 0:
case 1:
filters.append(tr("Single Side FDS Format Disk"));
filters[0].append(" (*.fds *.FDS)");
break;
case 2:
filters.append(tr("Single Side Quick Disk Format Disk"));
filters[0].append(" (*.qd *.QD)");
break;
case 3:
case 4:
filters.append(tr("Double Sides FDS Format Disk"));
filters[0].append(" (*.fds *.FDS)");
break;
case 5:
filters.append(tr("Double Sides Quick Disk Format Disk"));
filters[0].append(" (*.qd *.QD)");
break;
}
filters.append(tr("All files"));
filters[1].append(" (*.*)");
file = QFileDialog::getSaveFileName(this, tr("Create an image of an empty disk"),
uQString(gui.last_open_path), filters.join(";;"));
if (!file.isNull()) {
QFileInfo fileinfo(file);
BYTE rc = EXIT_ERROR;
if (fileinfo.suffix().isEmpty()) {
switch (format) {
default:
case 0:
case 1:
case 3:
case 4:
fileinfo.setFile(QString(file) + ".fds");
break;
case 2:
case 5:
fileinfo.setFile(QString(file) + ".qd");
break;
}
}
rc = fds_create_empty_disk(uQStringCD(fileinfo.absoluteFilePath()),
(format == 2) || (format == 5) ? QD_FORMAT : FDS_FORMAT,
(format == 0) || (format == 3) ? FDS_TYPE_FDS : FDS_TYPE_RAW,
format > 2);
if (rc == EXIT_ERROR) {
QMessageBox::critical(this, tr("Error creating file"),
tr("Impossible write %0.").arg(fileinfo.fileName()), QMessageBox::Ok);
}
}
emu_thread_continue();
}
void mainWindow::s_export_fds_image(void) {
int format = QVariant(((QObject *)sender())->property("myValue")).toInt();
QStringList filters;
@ -2567,7 +2641,7 @@ void mainWindow::s_et_nsf_author_note_open(const uTCHAR *string) {
if (!nsf_author_note.dlg) {
QString sstring = uQString(string);
nsf_author_note.dlg = new dlgCmdLineHelp(this, "", "Author's Note", uQStringCD(sstring));
nsf_author_note.dlg = new dlgCmdLineHelp(this, "Author's Note", uQStringCD(sstring));
nsf_author_note.dlg->setModal(false);
if (!nsf_author_note.geom.isEmpty()) {
nsf_author_note.dlg->setGeometry(nsf_author_note.geom);

View file

@ -296,6 +296,7 @@ class mainWindow : public QMainWindow, public Ui::mainWindow {
void s_disk_side(void);
void s_eject_disk(void);
void s_change_disk(void);
void s_create_empty_disk(void);
void s_export_fds_image(void);
void s_start_stop_audio_recording(void);
#if defined (WITH_FFMPEG)

View file

@ -23,6 +23,11 @@
#include <QtGui/QScreen>
#include <QtGui/QFontDatabase>
#include <QtCore/QBuffer>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QtCore/QTextCodec>
#else
#include <QtCore/QStringDecoder>
#endif
#if defined (_WIN32)
#include <QtCore/QtPlugin>
#if defined (QT5_PLUGIN_QWINDOWS)
@ -319,10 +324,33 @@ void gui_start(void) {
}
size_t gui_utf8_to_utchar(char *input, uTCHAR **output, size_t max_size) {
QString s = QString::fromUtf8(input);
size_t size = s.toUtf8().size();
bool is_iso8859_1 = false;
uTCHAR *buff = NULL;
size_t size = 0;
QString s;
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QTextCodec *clatin1 = QTextCodec::codecForName("ISO 8859-1");
QTextDecoder latin1(clatin1);
QTextCodec *cutf8 = QTextCodec::codecForName("UTF-8");
QTextDecoder utf8(cutf8);
QString slatin1 = latin1.toUnicode(input);
QString sutf8 = utf8.toUnicode(input);
is_iso8859_1 = !latin1.hasFailure() && utf8.hasFailure();
#else
QStringDecoder latin1 = QStringDecoder(QStringDecoder::Latin1);
QStringDecoder utf8 = QStringDecoder(QStringDecoder::Utf8);
QString slatin1 = latin1(input);
QString sutf8 = utf8(input);
is_iso8859_1 = !latin1.hasError() && utf8.hasError();
#endif
}
s = is_iso8859_1 ? QString::fromLatin1(input) : QString::fromUtf8(input);
size = s.size();
if (size && (size <= max_size)) {
QByteArray array = uQByteArrayFromString(s);
size_t asize = array.length();

View file

@ -34,9 +34,9 @@
#include "rewind.h"
#include "version.h"
#include "nes.h"
#include "input/standard_controller.h"
#if defined (FULLSCREEN_RESFREQ)
#include "video/gfx_monitor.h"
#include "input/standard_controller.h"
#endif
void overlay_info_append_qstring(BYTE alignment, const QString &msg);
@ -886,41 +886,45 @@ void overlayWidgetFastForward::update_widget(void) {
// overlayWidgetFloppy -------------------------------------------------------------------------------------------------
overlayWidgetFloppy::overlayWidgetFloppy(QWidget *parent) : overlayWidget(parent) {}
overlayWidgetFloppy::overlayWidgetFloppy(QWidget *parent) : overlayWidget(parent) {
set_opacity(0.75);
}
overlayWidgetFloppy::~overlayWidgetFloppy() = default;
QSize overlayWidgetFloppy::sizeHint(void) const {
return (QSize(floppy.gray.size().width() + hpadtot(), minimum_eight()));
return (QSize(motor.off.size().width() + hpadtot(), minimum_eight()));
}
void overlayWidgetFloppy::paintEvent(QPaintEvent *event) {
const QPointF coords = QPointF(((qreal)rect().width() - (qreal)(floppy.gray.size().width())) / 2.0,
((qreal)rect().height() - (qreal)floppy.gray.size().height()) / 2.0);
qreal x = ((qreal)rect().width() - (qreal)motor.off.size().width()) / 2.0;
qreal y = ((qreal)rect().height() - (qreal)motor.off.size().height()) / 2.0;
QPointF coords = QPointF(x, y);
overlayWidget::paintEvent(event);
painter.begin(this);
painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
if ((fds.info.last_operation | fds.drive.disk_ejected)) {
if (fds.drive.disk_ejected) {
painter.drawImage(coords, floppy.gray);
} else {
if (fds.info.last_operation == FDS_OP_READ) {
painter.drawImage(coords, floppy.green);
} else {
painter.drawImage(coords, floppy.red);
}
if (rwnd.action != RWND_ACT_PAUSE) {
fds.info.last_operation = FDS_OP_NONE;
}
}
// led del motore e operazioni di I/O
if (fds.info.last_operation == FDS_OP_READ) {
painter.drawImage(coords, motor.read);
} else if (fds.info.last_operation == FDS_OP_WRITE) {
painter.drawImage(coords, motor.write);
} else if (fds.drive.motor_started) {
painter.drawImage(coords, motor.on);
} else {
painter.drawImage(coords, motor.off);
}
if (rwnd.action != RWND_ACT_PAUSE) {
fds.info.last_operation = FDS_OP_NONE;
}
painter.end();
}
void overlayWidgetFloppy::update_dpr(void) {
floppy.gray = dpr_image(":/pics/pics/overlay_floppy_gray.png");
floppy.red = dpr_image(":/pics/pics/overlay_floppy_red.png");
floppy.green = dpr_image(":/pics/pics/overlay_floppy_green.png");
motor.on = dpr_image(":/pics/pics/overlay_fds_motor_led_on.png");
motor.off = dpr_image(":/pics/pics/overlay_fds_motor_led_off.png");
motor.read = dpr_image(":/pics/pics/overlay_fds_motor_led_read.png");
motor.write = dpr_image(":/pics/pics/overlay_fds_motor_led_write.png");
}
void overlayWidgetFloppy::update_widget(void) {
if (cfg->txt_on_screen & fds.info.enabled & !info.turn_off) {

View file

@ -195,11 +195,12 @@ class overlayWidgetFastForward : public overlayWidget {
class overlayWidgetFloppy : public overlayWidget {
private:
struct _images_floppy {
QImage gray;
QImage red;
QImage green;
} floppy;
struct _images_motor {
QImage on;
QImage off;
QImage read;
QImage write;
} motor;
public:
explicit overlayWidgetFloppy(QWidget *parent = nullptr);