├── .gitignore ├── LICENSE ├── README.md ├── SS_Backup_RAM_Parser.pro ├── blue_arrow.xpm ├── cart_to_game.xpm ├── config.cpp ├── config.h ├── entersavedetailsdialog.cpp ├── entersavedetailsdialog.h ├── entersavedetailsdialog.ui ├── extract.cpp ├── fileiosettingsdialog.cpp ├── fileiosettingsdialog.h ├── fileiosettingsdialog.ui ├── game_to_cart.xpm ├── imagemapwindow.cpp ├── imagemapwindow.h ├── imagemapwindow.ui ├── import.cpp ├── import.h ├── insert.cpp ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── map.xpm ├── masqurin_highwizard.xpm ├── new.xpm ├── newdialog.cpp ├── newdialog.h ├── newdialog.ui ├── open.xpm ├── parselib.cpp ├── parselib.h ├── resources.qrc ├── save.xpm ├── setupwindow.cpp ├── setupwindow.h ├── setupwindow.ui ├── sys_header_counter.xpm └── sys_header_start.xpm /.gitignore: -------------------------------------------------------------------------------- 1 | /SS_Backup_RAM_Parser.pro.user 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a QT-based parser for Sega Saturn RAM Backup (aka Power Memory), Internal RAM, and possibly 2 | other media images. It can load/save/show image's content and extract/insert/delete single saves in a customizable 3 | way. Virtually any sector size (64,256,512,whatever) is suppoted, and conversion is available. Importing of a Datel's compressed images is supported. 4 | Support for a direct connection to Sega Saturn is planned. 5 | -------------------------------------------------------------------------------- /SS_Backup_RAM_Parser.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-02-11T23:42:29 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | VERSION = 0.9.9 10 | DEFINES += APP_VERSION=\\\"$$VERSION\\\" 11 | 12 | QMAKE_LFLAGS += -static -static-libgcc 13 | 14 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 15 | 16 | TARGET = SS_Backup_RAM_Parser 17 | TEMPLATE = app 18 | 19 | 20 | SOURCES += main.cpp\ 21 | extract.cpp \ 22 | insert.cpp \ 23 | mainwindow.cpp \ 24 | setupwindow.cpp \ 25 | config.cpp \ 26 | parselib.cpp \ 27 | entersavedetailsdialog.cpp \ 28 | fileiosettingsdialog.cpp \ 29 | newdialog.cpp \ 30 | imagemapwindow.cpp \ 31 | import.cpp 32 | 33 | HEADERS += mainwindow.h \ 34 | setupwindow.h \ 35 | config.h \ 36 | parselib.h \ 37 | entersavedetailsdialog.h \ 38 | fileiosettingsdialog.h \ 39 | newdialog.h \ 40 | imagemapwindow.h \ 41 | import.h 42 | 43 | FORMS += mainwindow.ui \ 44 | setupwindow.ui \ 45 | entersavedetailsdialog.ui \ 46 | fileiosettingsdialog.ui \ 47 | newdialog.ui \ 48 | imagemapwindow.ui 49 | 50 | DISTFILES += 51 | 52 | RESOURCES += \ 53 | resources.qrc 54 | -------------------------------------------------------------------------------- /blue_arrow.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\_Git\ss_save_parser\blue_arrow_xpm[] = { 3 | "32 32 2 1", 4 | " c None", 5 | ". c #0000FF", 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 | -------------------------------------------------------------------------------- /cart_to_game.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\__repo\ss_save_parser\cart_to_game_xpm[] = { 3 | "73 23 240 2", 4 | " c None", 5 | ". c #4A4A4A", 6 | "+ c #A5A5A5", 7 | "@ c #1A2127", 8 | "# c #1B2228", 9 | "$ c #1A2327", 10 | "% c #383E42", 11 | "& c #252D32", 12 | "* c #1A1C1D", 13 | "= c #F2F2F2", 14 | "- c #262626", 15 | "; c #939393", 16 | "> c #192C3D", 17 | ", c #007EED", 18 | "' c #008BFF", 19 | ") c #0280F3", 20 | "! c #2592F1", 21 | "~ c #038BFF", 22 | "{ c #008AFF", 23 | "] c #066FCF", 24 | "^ c #162C3F", 25 | "/ c #142C41", 26 | "( c #0676DB", 27 | "_ c #14314A", 28 | ": c #B6B6B6", 29 | "< c #CECECE", 30 | "[ c #9E9E9E", 31 | "} c #666666", 32 | "| c #1E3344", 33 | "1 c #056ECC", 34 | "2 c #0086FF", 35 | "3 c #0F497F", 36 | "4 c #C5AC81", 37 | "5 c #5BA3DA", 38 | "6 c #0084FD", 39 | "7 c #0085FE", 40 | "8 c #0089FF", 41 | "9 c #132F48", 42 | "0 c #DADADA", 43 | "a c #545454", 44 | "b c #9C9C9C", 45 | "c c #0000FF", 46 | "d c #2A4257", 47 | "e c #0569C1", 48 | "f c #0F4A81", 49 | "g c #C0AB85", 50 | "h c #A0BEC9", 51 | "i c #0084FC", 52 | "j c #0084FE", 53 | "k c #0B5596", 54 | "l c #263640", 55 | "m c #D4E3FF", 56 | "n c #C2C2C2", 57 | "o c #1D354C", 58 | "p c #0767BE", 59 | "q c #056AC7", 60 | "r c #5997C9", 61 | "s c #0987FA", 62 | "t c #0086FE", 63 | "u c #0080FC", 64 | "v c #8EC8F9", 65 | "w c #8FC8F9", 66 | "x c #49A6F8", 67 | "y c #0083FE", 68 | "z c #122535", 69 | "A c #213746", 70 | "B c #076FCD", 71 | "C c #B0D8F8", 72 | "D c #FFFFFF", 73 | "E c #E0F2FE", 74 | "F c #44A5FB", 75 | "G c #0081FE", 76 | "H c #008DFF", 77 | "I c #112433", 78 | "J c #E6E6E6", 79 | "K c #223646", 80 | "L c #0382F6", 81 | "M c #018BFF", 82 | "N c #0187FF", 83 | "O c #FDFEFE", 84 | "P c #A4A3A3", 85 | "Q c #156AB7", 86 | "R c #AAD8FE", 87 | "S c #3E5263", 88 | "T c #373938", 89 | "U c #282A29", 90 | "V c #292A2A", 91 | "W c #252626", 92 | "X c #191A1A", 93 | "Y c #0B5799", 94 | "Z c #F9FBFB", 95 | "` c #929292", 96 | " . c #085EAC", 97 | ".. c #C5E6FF", 98 | "+. c #464847", 99 | "@. c #0D4C83", 100 | "#. c #0088FF", 101 | "$. c #2091F3", 102 | "%. c #1F91F4", 103 | "&. c #0B85F2", 104 | "*. c #FEFFFF", 105 | "=. c #A1A1A1", 106 | "-. c #2970AF", 107 | ";. c #203D52", 108 | ">. c #1A1C19", 109 | ",. c #1E201F", 110 | "'. c #0D4478", 111 | "). c #0085FF", 112 | "!. c #0286FD", 113 | "~. c #FFE5A7", 114 | "{. c #FFE1A4", 115 | "]. c #FFE0A3", 116 | "^. c #FDF8EC", 117 | "/. c #FFFCF1", 118 | "(. c #FFEBC0", 119 | "_. c #FFEBB0", 120 | ":. c #464337", 121 | "<. c #112737", 122 | "[. c #0A68BC", 123 | "}. c #0A64B4", 124 | "|. c #0C64B6", 125 | "1. c #B5A47F", 126 | "2. c #F9DEA9", 127 | "3. c #F9DDA6", 128 | "4. c #C6B18A", 129 | "5. c #4C4940", 130 | "6. c #363737", 131 | "7. c #393B39", 132 | "8. c #3B3839", 133 | "9. c #3B3938", 134 | "0. c #3B3A37", 135 | "a. c #3A3837", 136 | "b. c #1F201F", 137 | "c. c #7F735B", 138 | "d. c #998A6C", 139 | "e. c #998869", 140 | "f. c #95866A", 141 | "g. c #95866B", 142 | "h. c #96886B", 143 | "i. c #32312A", 144 | "j. c #47494B", 145 | "k. c #AA9B7D", 146 | "l. c #69604D", 147 | "m. c #131614", 148 | "n. c #0A5DA6", 149 | "o. c #A29374", 150 | "p. c #A19272", 151 | "q. c #605849", 152 | "r. c #141616", 153 | "s. c #121413", 154 | "t. c #313332", 155 | "u. c #4C4E4D", 156 | "v. c #AEA081", 157 | "w. c #4F493B", 158 | "x. c #D0D0D0", 159 | "y. c #CDCDCD", 160 | "z. c #03213C", 161 | "A. c #FEE4AE", 162 | "B. c #F8DDA8", 163 | "C. c #8E8066", 164 | "D. c #909091", 165 | "E. c #D2D2D2", 166 | "F. c #3D3E3D", 167 | "G. c #3D3E3F", 168 | "H. c #1D1D1B", 169 | "I. c #F6F7F7", 170 | "J. c #33312B", 171 | "K. c #FDE1AD", 172 | "L. c #8E8167", 173 | "M. c #B1B1B2", 174 | "N. c #4C4D4D", 175 | "O. c #363636", 176 | "P. c #ECECEC", 177 | "Q. c #F3F3F3", 178 | "R. c #181A1A", 179 | "S. c #464336", 180 | "T. c #877B63", 181 | "U. c #A6A7A7", 182 | "V. c #3B3C3C", 183 | "W. c #AAAAAA", 184 | "X. c #2B2C2C", 185 | "Y. c #E0E0E0", 186 | "Z. c #DDDDDD", 187 | "`. c #0D2133", 188 | " + c #191D1D", 189 | ".+ c #152431", 190 | "++ c #191C1B", 191 | "@+ c #181919", 192 | "#+ c #1C1E1D", 193 | "$+ c #0B0D0C", 194 | "%+ c #131413", 195 | "&+ c #018AFF", 196 | "*+ c #172329", 197 | "=+ c #0B5A9F", 198 | "-+ c #3C3B39", 199 | ";+ c #171B19", 200 | ">+ c #21181A", 201 | ",+ c #661018", 202 | "'+ c #6F3D42", 203 | ")+ c #5B5B5B", 204 | "!+ c #131716", 205 | "~+ c #8C0F19", 206 | "{+ c #7E468E", 207 | "]+ c #1E1617", 208 | "^+ c #AE0A1B", 209 | "/+ c #CB081D", 210 | "(+ c #8B686B", 211 | "_+ c #646A69", 212 | ":+ c #4A5251", 213 | "<+ c #383838", 214 | "[+ c #2E2E2E", 215 | "}+ c #BB091D", 216 | "|+ c #FF001C", 217 | "1+ c #FC0010", 218 | "2+ c #B5B5B5", 219 | "3+ c #9D0A1B", 220 | "4+ c #59141B", 221 | "5+ c #C13D48", 222 | "6+ c #C91B2C", 223 | "7+ c #BC081C", 224 | "8+ c #3B2627", 225 | "9+ c #2E2E2F", 226 | "0+ c #FF031E", 227 | "a+ c #FF021D", 228 | "b+ c #FCEFF0", 229 | "c+ c #F81C2F", 230 | "d+ c #FB031D", 231 | "e+ c #E9041E", 232 | "f+ c #6F111A", 233 | "g+ c #CA0A1E", 234 | "h+ c #FF011C", 235 | "i+ c #F8031C", 236 | "j+ c #2F2929", 237 | "k+ c #2F3030", 238 | "l+ c #0F1B1A", 239 | "m+ c #050707", 240 | "n+ c #171C1B", 241 | "o+ c #121C1A", 242 | "p+ c #0E1B19", 243 | "q+ c #212423", 244 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . + @ # # $ # # # # # # % & * ", 245 | ". = = = = = = = = = = = = = = = = = = = = = = = = = = = - ; > , ' ' ) ! ~ { { { { ] ^ / ( _ ", 246 | ". : < < < < < < < < < < < < < < < < < < < < < < < < < [ - } + | 1 2 3 4 5 6 7 7 7 2 8 8 8 9 ", 247 | ". = = < < < < < < < < < < < < < < < < < < < < < 0 < = = - a b c d e f g h i 7 7 j j j 7 2 k l ", 248 | ". : : = < m m m m m m m m m m m m m m m m m m m n = : : - a b c c o p q r s t 7 u v w x y 7 { z ", 249 | ". = = < < m m m m m m m m m m m m m m m m m m m n 0 = = - a b c c c A B 7 7 7 7 7 7 C D D E F G H I ", 250 | ". : : = < = J J J J J J J J J J J J J J J J J = n = : : - a b c c c c K L M M N 7 7 7 7 O D D P Q R S ", 251 | ". = = < < = = = = = = = = = = = = = = = = = = = n 0 = = - a b c c c c c T U V W X Y 7 7 7 t Z D D ` ...+. ", 252 | ". : : = < = J J J J J J J J J J J J J J J J J = n = : : - a b c c c c c c @.#.7 7 $.%.&.*.D =.-.;.>.,. ", 253 | ". 0 n < < = = = = = = = = = = = = = = = = = = = n < < [ - a b c c c c c c c c c c c c c c c '.#.t ).!.~.{.].^.^./.(._.:. ", 254 | ". 0 n < < = J J J J J J J J J J J J J J J J J = n < < [ - a b c c c c c c c c c c c c c c c c <.[.}.}.}.|.1.2.2.3.3.3.2.4.5. ", 255 | ". 0 n < < = = = = = = = = = = = = = = = = = = = n < < [ - a b c c c c c c c c c c c c c c c c 6.7.8.9.0.a.b.c.d.e.f.g.h.d.i. ", 256 | ". 0 n < < = J J J J J J J J J J J J J J J J J = n < < [ - a b c c c c c c c c c c c c c c c j.k.l.m.n.o.p.q.r.s.t. ", 257 | ". 0 n < < = = = = = = = = = = = = = = = = = = = n < < [ - a b c c c c c c u.v.w.x.y.z.A.B.C.D.E.F. ", 258 | ". 0 n < n n n n n n n n n n n n n n n n n n n n n < < [ - a b c c c c c G.H.I.D D D J.K.L.M.D N. ", 259 | ". 0 n < < < < < < < < < < < < < < < < < < < < < < < < [ - a b c c c c O.P.D D Q.R.S.T.U.V. ", 260 | ". 0 n < < < < < < < < < W.= W.= W.= < < < < < < < < < [ - a b c c c X.Y.Z.`. +.+++@+#+ ", 261 | ". 0 n < < < < < < < < W.= W.= W.= < < < < < < < < < < [ - a b c c $+%+&+*+=+-+ ", 262 | ". 0 n < < < < < < < < < < < < < < < < < < < < < < < < [ - a b c s.;+#.>+,+'+ ", 263 | ". 0 n n n n n n n n n n n n n n n n n n n n n n n n n [ - a b )+!+~+{+]+^+/+(+_+:+ ", 264 | "+ - - - - - - - - - - - - - - - - - - - - - - - - - - - <+} + [+}+|+1+2+3+4+5+6+7+8+ ", 265 | " ; } a a a a a a a a a a a a a a a a a a a a a a a a a } ; 9+0+a+b+c+d+e+f+g+h+i+j+", 266 | " + b b b b b b b b b b b b b b b b b b b b b b b b b + k+l+l+m+l+l+l+n+o+l+p+q+"}; 267 | -------------------------------------------------------------------------------- /config.cpp: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | 3 | Config::Config() 4 | { 5 | } 6 | 7 | Config::~Config() 8 | { 9 | } 10 | 11 | void Config::UpdateFlags() 12 | { 13 | switch (m_ExtractMode) 14 | { 15 | case ExtractSSF: 16 | m_bExtractDateTime=true; 17 | m_bExtractDescription=true; 18 | m_bExtractLanguage=false; 19 | m_bExtractName=false; 20 | m_bExtractSAT=false; 21 | m_bExtractSize=false; 22 | m_bExtractSys=false; 23 | m_bExtractSysAll=false; 24 | m_bExtractSysFillZero=false; 25 | break; 26 | case ExtractAR: 27 | m_bExtractDateTime=true; 28 | m_bExtractDescription=true; 29 | m_bExtractLanguage=true; 30 | m_bExtractName=true; 31 | m_bExtractSAT=true; 32 | m_bExtractSize=true; 33 | m_bExtractSys=true; 34 | m_bExtractSysAll=true; 35 | m_bExtractSysFillZero=true; 36 | break; 37 | case ExtractFull: 38 | m_bExtractDateTime=true; 39 | m_bExtractDescription=true; 40 | m_bExtractLanguage=true; 41 | m_bExtractName=true; 42 | m_bExtractSAT=true; 43 | m_bExtractSize=true; 44 | m_bExtractSys=true; 45 | m_bExtractSysAll=true; 46 | m_bExtractSysFillZero=false; 47 | break; 48 | case ExtractRaw: 49 | m_bExtractDateTime=false; 50 | m_bExtractDescription=false; 51 | m_bExtractLanguage=false; 52 | m_bExtractName=false; 53 | m_bExtractSAT=false; 54 | m_bExtractSize=false; 55 | m_bExtractSys=false; 56 | m_bExtractSysAll=false; 57 | m_bExtractSysFillZero=false; 58 | break; 59 | case ExtractDruidII: 60 | m_bExtractDateTime=true; 61 | m_bExtractDescription=true; 62 | m_bExtractLanguage=true; 63 | m_bExtractName=true; 64 | m_bExtractSAT=false; 65 | m_bExtractSize=true; 66 | m_bExtractSys=false; 67 | m_bExtractSysAll=false; 68 | m_bExtractSysFillZero=false; 69 | break; 70 | case ExtractManual: 71 | break; 72 | } 73 | switch (m_InsertMode) 74 | { 75 | case InsertSSF: 76 | m_bInsertDateTime=true; 77 | m_bInsertDescription=true; 78 | m_bInsertLanguage=false; 79 | m_bInsertName=false; 80 | m_bInsertSAT=false; 81 | m_bInsertSize=false; 82 | m_bInsertSys=false; 83 | m_bInsertSysAll=false; 84 | m_bInsertSysUseCounter=false; 85 | break; 86 | case InsertAR: 87 | m_bInsertDateTime=true; 88 | m_bInsertDescription=true; 89 | m_bInsertLanguage=true; 90 | m_bInsertName=true; 91 | m_bInsertSAT=true; 92 | m_bInsertSize=true; 93 | m_bInsertSys=true; 94 | m_bInsertSysAll=true; 95 | m_bInsertSysUseCounter=false; 96 | break; 97 | case InsertFull: 98 | m_bInsertDateTime=true; 99 | m_bInsertDescription=true; 100 | m_bInsertLanguage=true; 101 | m_bInsertName=true; 102 | m_bInsertSAT=true; 103 | m_bInsertSize=true; 104 | m_bInsertSys=true; 105 | m_bInsertSysAll=true; 106 | m_bInsertSysUseCounter=true; 107 | break; 108 | case InsertRaw: 109 | m_bInsertDateTime=false; 110 | m_bInsertDescription=false; 111 | m_bInsertLanguage=false; 112 | m_bInsertName=false; 113 | m_bInsertSAT=false; 114 | m_bInsertSize=false; 115 | m_bInsertSys=false; 116 | m_bInsertSysAll=false; 117 | m_bInsertSysUseCounter=false; 118 | break; 119 | case InsertDruidII: 120 | m_bInsertDateTime=true; 121 | m_bInsertDescription=true; 122 | m_bInsertLanguage=true; 123 | m_bInsertName=true; 124 | m_bInsertSAT=false; 125 | m_bInsertSize=true; 126 | m_bInsertSys=false; 127 | m_bInsertSysAll=false; 128 | m_bInsertSysUseCounter=false; 129 | break; 130 | case InsertManual: 131 | break; 132 | } 133 | } 134 | 135 | void Config::SaveToRegistry() 136 | { 137 | TheSettings = new QSettings("Null Record Studio","Sega Saturn Backup RAM Parser"); 138 | UpdateFlags(); 139 | TheSettings->setValue("Extract Mode",(int)m_ExtractMode); 140 | TheSettings->setValue("Extract Sys",m_bExtractSys); 141 | TheSettings->setValue("Extract Sys All",m_bExtractSysAll); 142 | TheSettings->setValue("Extract Sys Fill Zero",m_bExtractSysFillZero); 143 | TheSettings->setValue("Extract Name",m_bExtractName); 144 | TheSettings->setValue("Extract Description",m_bExtractDescription); 145 | TheSettings->setValue("Extract DateTime",m_bExtractDateTime); 146 | TheSettings->setValue("Extract Size",m_bExtractSize); 147 | TheSettings->setValue("Extract SAT",m_bExtractSAT); 148 | TheSettings->setValue("Extract Language",m_bExtractLanguage); 149 | TheSettings->setValue("Insert Mode",(int)m_InsertMode); 150 | TheSettings->setValue("Insert Sys",m_bInsertSys); 151 | TheSettings->setValue("Insert Sys All",m_bInsertSysAll); 152 | TheSettings->setValue("Insert Sys Use Counter",m_bInsertSysUseCounter); 153 | TheSettings->setValue("Insert Name",m_bInsertName); 154 | TheSettings->setValue("Insert Description",m_bInsertDescription); 155 | TheSettings->setValue("Insert DateTime",m_bInsertDateTime); 156 | TheSettings->setValue("Insert Size",m_bInsertSize); 157 | TheSettings->setValue("Insert SAT",m_bInsertSAT); 158 | TheSettings->setValue("Insert Language",m_bInsertLanguage); 159 | TheSettings->setValue("Delete Mode",(int)m_DeleteMode); 160 | TheSettings->setValue("Show Hex Values",m_bShowHexValues); 161 | TheSettings->setValue("Ask For Format At Every Extract",m_bAskFormatAtEveryExtract); 162 | TheSettings->setValue("Ask For Format At Every Insert",m_bAskFormatAtEveryInsert); 163 | TheSettings->sync(); 164 | delete TheSettings; 165 | } 166 | 167 | void Config::LoadFromRegistry() 168 | { 169 | TheSettings = new QSettings("Null Record Studio","Sega Saturn Backup RAM Parser"); 170 | m_ExtractMode = (ExtractMode)TheSettings->value("Extract Mode").toInt(); 171 | m_bExtractSys = TheSettings->value("Extract Sys").toBool(); 172 | m_bExtractSysAll = TheSettings->value("Extract Sys All").toBool(); 173 | m_bExtractSysFillZero = TheSettings->value("Extract Sys Fill Zero").toBool(); 174 | m_bExtractName = TheSettings->value("Extract Name").toBool(); 175 | m_bExtractDescription = TheSettings->value("Extract Description").toBool(); 176 | m_bExtractDateTime = TheSettings->value("Extract DateTime").toBool(); 177 | m_bExtractSize = TheSettings->value("Extract Size").toBool(); 178 | m_bExtractSAT = TheSettings->value("Extract SAT").toBool(); 179 | m_bExtractLanguage = TheSettings->value("Extract Language").toBool(); 180 | m_InsertMode = (InsertMode)TheSettings->value("Insert Mode").toInt(); 181 | m_bInsertSys = (bool)TheSettings->value("Insert Sys").toBool(); 182 | m_bInsertSysAll = (bool)TheSettings->value("Insert Sys All").toBool(); 183 | m_bInsertSysUseCounter = (bool)TheSettings->value("Insert Sys Use Counter").toBool(); 184 | m_bInsertName = (bool)TheSettings->value("Insert Name").toBool(); 185 | m_bInsertDescription = (bool)TheSettings->value("Insert Description").toBool(); 186 | m_bInsertDateTime = (bool)TheSettings->value("Insert DateTime").toBool(); 187 | m_bInsertSize = (bool)TheSettings->value("Insert Size").toBool(); 188 | m_bInsertSAT = (bool)TheSettings->value("Insert SAT").toBool(); 189 | m_bInsertLanguage = (bool)TheSettings->value("Insert Language").toBool(); 190 | m_DeleteMode = (DeleteMode)TheSettings->value("Delete Mode").toInt(); 191 | m_bShowHexValues = (bool)TheSettings->value("Show Hex Values").toBool(); 192 | m_bAskFormatAtEveryExtract = (bool)TheSettings->value("Ask For Format At Every Extract").toBool(); 193 | m_bAskFormatAtEveryInsert = (bool)TheSettings->value("Ask For Format At Every Insert").toBool(); 194 | UpdateFlags(); 195 | delete TheSettings; 196 | } 197 | -------------------------------------------------------------------------------- /config.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 3 | 4 | #include 5 | #include 6 | 7 | enum ExtractMode {ExtractYabaSanshiroJson,ExtractSSF,ExtractAR,ExtractFull,ExtractRaw,ExtractDruidII,ExtractManual}; 8 | enum InsertMode {InsertYabaSanshiroJson,InsertSSF,InsertAR,InsertFull,InsertRaw,InsertDruidII,InsertManual}; 9 | enum DeleteMode {DeleteSingleSys,DeleteAllSys,DeleteFull}; 10 | 11 | typedef struct MySave{ 12 | QByteArray Name; 13 | QByteArray Comment; 14 | unsigned char cLanguageCode; 15 | QDateTime DateTime; 16 | QByteArray DateTimeRaw; 17 | int iBytes; 18 | int iBlocks; 19 | QList SAT; 20 | //int iSATSize; 21 | int iStartCluster; 22 | unsigned char cCounter; 23 | } SaveType; 24 | 25 | class Config 26 | { 27 | public: 28 | Config(); 29 | ~Config(); 30 | QSettings *TheSettings; 31 | void SaveToRegistry(); 32 | void LoadFromRegistry(); 33 | void UpdateFlags(); 34 | // LoadMode m_LoadMode; 35 | // SaveMode m_SaveMode; 36 | // LoadClusterSize m_LoadClusterSize; 37 | int m_iClusterSize; 38 | int m_iFileSize; 39 | ExtractMode m_ExtractMode; 40 | bool m_bExtractSys; 41 | bool m_bExtractSysAll; 42 | bool m_bExtractSysFillZero; 43 | bool m_bExtractName; 44 | bool m_bExtractLanguage; 45 | bool m_bExtractDescription; 46 | bool m_bExtractDateTime; 47 | bool m_bExtractSize; 48 | bool m_bExtractSAT; 49 | InsertMode m_InsertMode; 50 | bool m_bInsertSys; 51 | bool m_bInsertSysAll; 52 | bool m_bInsertSysUseCounter; 53 | bool m_bInsertName; 54 | bool m_bInsertLanguage; 55 | bool m_bInsertDescription; 56 | bool m_bInsertDateTime; 57 | bool m_bInsertSize; 58 | bool m_bInsertSAT; 59 | DeleteMode m_DeleteMode; 60 | bool m_bShowHexValues; 61 | bool m_bAskFormatAtEveryExtract; 62 | bool m_bAskFormatAtEveryInsert; 63 | }; 64 | 65 | #endif // CONFIG_H 66 | -------------------------------------------------------------------------------- /entersavedetailsdialog.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "entersavedetailsdialog.h" 3 | #include "ui_entersavedetailsdialog.h" 4 | #include "parselib.h" 5 | 6 | EnterSaveDetailsDialog::EnterSaveDetailsDialog(SaveType *save, QWidget *parent) : 7 | QDialog(parent), 8 | ui(new Ui::EnterSaveDetailsDialog) 9 | { 10 | QString s; 11 | QTextCodec *codec = QTextCodec::codecForName("Shift-JIS"); 12 | ui->setupUi(this); 13 | ui->lineEdit_2->setText(codec->toUnicode(save->Name)); 14 | ui->lineEdit_3->setText(codec->toUnicode(save->Comment)); 15 | ui->spinBox->setMaximum(255); 16 | ui->spinBox_2->setMaximum(255); 17 | ui->spinBox->setValue(QString(save->cCounter).toInt()); 18 | ui->spinBox_2->setValue(save->cLanguageCode); 19 | ui->dateTimeEdit->setDateTime(save->DateTime); 20 | ui->label_7->setText(QString("%1").arg(save->iBytes)); 21 | wsave=save; 22 | this->setWindowTitle(this->windowTitle().append(" ").append(APP_VERSION)); 23 | ui->OptionalBox->setFlat(true); 24 | ui->pushButton->setEnabled(false); 25 | } 26 | 27 | EnterSaveDetailsDialog::~EnterSaveDetailsDialog() 28 | { 29 | delete ui; 30 | } 31 | 32 | void EnterSaveDetailsDialog::on_buttonBox_accepted() 33 | { 34 | QTextCodec *codec = QTextCodec::codecForName("Shift-JIS"); 35 | wsave->Name = codec->fromUnicode(ui->lineEdit_2->text()); 36 | wsave->Comment = codec->fromUnicode(ui->lineEdit_3->text()); 37 | wsave->cCounter = (unsigned char)ui->spinBox->value(); 38 | wsave->cLanguageCode = ui->spinBox_2->value(); 39 | wsave->DateTime = ui->dateTimeEdit->dateTime(); 40 | wsave->DateTimeRaw = GetRaw4ByteFromDateTime(wsave->DateTime); 41 | } 42 | -------------------------------------------------------------------------------- /entersavedetailsdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef ENTERSAVEDETAILSDIALOG_H 2 | #define ENTERSAVEDETAILSDIALOG_H 3 | 4 | #include 5 | #include "mainwindow.h" 6 | 7 | namespace Ui { 8 | class EnterSaveDetailsDialog; 9 | } 10 | 11 | class EnterSaveDetailsDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit EnterSaveDetailsDialog(SaveType *save,QWidget *parent = 0); 17 | ~EnterSaveDetailsDialog(); 18 | 19 | private slots: 20 | void on_buttonBox_accepted(); 21 | 22 | private: 23 | Ui::EnterSaveDetailsDialog *ui; 24 | SaveType *wsave; 25 | }; 26 | 27 | #endif // ENTERSAVEDETAILSDIALOG_H 28 | -------------------------------------------------------------------------------- /entersavedetailsdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | EnterSaveDetailsDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 533 10 | 300 11 | 12 | 13 | 14 | Sega Saturn RAM Backup parser 15 | 16 | 17 | 18 | 19 | 20 | QFormLayout::AllNonFixedFieldsGrow 21 | 22 | 23 | 24 | 25 | Name 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Language code 36 | 37 | 38 | 39 | 40 | 41 | 42 | Comment 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Date/time 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Counter 63 | 64 | 65 | 66 | 67 | 68 | 69 | 255 70 | 71 | 72 | 73 | 74 | 75 | 76 | 255 77 | 78 | 79 | 80 | 81 | 82 | 83 | Size (bytes) 84 | 85 | 86 | 87 | 88 | 89 | 90 | 0 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | Qt::Horizontal 100 | 101 | 102 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 103 | 104 | 105 | 106 | 107 | 108 | 109 | Optional fields (not used yet) 110 | 111 | 112 | 113 | 114 | 115 | Game ID 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | Addtional comment 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | Get game ID 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | buttonBox 148 | accepted() 149 | EnterSaveDetailsDialog 150 | accept() 151 | 152 | 153 | 248 154 | 254 155 | 156 | 157 | 157 158 | 274 159 | 160 | 161 | 162 | 163 | buttonBox 164 | rejected() 165 | EnterSaveDetailsDialog 166 | reject() 167 | 168 | 169 | 316 170 | 260 171 | 172 | 173 | 286 174 | 274 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /extract.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "config.h" 9 | #include "mainwindow.h" 10 | #include "parselib.h" 11 | #include "entersavedetailsdialog.h" 12 | 13 | extern QList SavesList; 14 | extern QByteArray HugeRAM;//full size buffer 15 | 16 | 17 | void MainWindow::ExtractSaves(int iStart,int iEnd) 18 | { 19 | //we should ask for a filenames first, to find the format 20 | //there are two special formats, BUP and XML, they imply different sanity checks, so the checks come after file selection 21 | //for a "binary" (i.e. normal) saves, some sanity checks should be done once per insert and some once per file 22 | //QStringList fileNames = QFileDialog::getOpenFileNames(this,tr("Load Savegame"), "", NULL); 23 | //if (fileNames.isEmpty()) return; //return if user cancel 24 | //cycle through each save 25 | QString fileName; 26 | SaveType tmpSave; 27 | QFile file_out; 28 | QString folderName; 29 | TheConfig->LoadFromRegistry(); 30 | 31 | if (iStart==iEnd) 32 | { 33 | //choose single file to save 34 | tmpSave = SavesList.at(iStart);//ui->tableWidget->currentRow()); 35 | fileName = QFileDialog::getSaveFileName(this,tr("Save Savegame"), QString(tmpSave.Name), NULL); 36 | if (fileName.isEmpty()) return; //return if user cancel 37 | file_out.setFileName(fileName); 38 | if (!(file_out.open(QIODevice::WriteOnly))) 39 | { 40 | QMessageBox msgBox; 41 | msgBox.setText(tr("Cannot open save file %s.").arg(fileName)); 42 | msgBox.exec(); 43 | return; 44 | } 45 | 46 | //extract single save 47 | if(fileName.toUpper().endsWith(".BUP")) { 48 | ExtractBUPSave(&file_out,tmpSave,true); 49 | } 50 | else if (fileName.toUpper().endsWith(".XML")) { 51 | ExtractXMLSave(&file_out,tmpSave,true); 52 | } 53 | else { 54 | if (false == GlobalBinaryExtractChecks()) 55 | return; 56 | ExtractBinarySave(&file_out,tmpSave,true); 57 | } 58 | file_out.close(); 59 | } 60 | else 61 | { 62 | //when saving multiple files, ask for folder, not for file 63 | QFileDialog dialog(this); 64 | dialog.setFileMode(QFileDialog::Directory); 65 | if (dialog.exec()) 66 | folderName = dialog.selectedFiles().at(0); 67 | else return; //return if user cancel 68 | 69 | //do a multiple extract - BUP and XML are not supported yet, so binary only 70 | for (int i=iStart; i<=iEnd; i++) 71 | { 72 | //if multiple saves load every file now 73 | tmpSave = SavesList.at(i); 74 | QString fileName = folderName+QString("/")+QString(tmpSave.Name); 75 | file_out.setFileName(fileName); 76 | if (!(file_out.open(QIODevice::WriteOnly))) 77 | { 78 | QMessageBox msgBox; 79 | msgBox.setText(tr("Cannot open save file %s.").arg(fileName)); 80 | msgBox.exec(); 81 | return; 82 | } 83 | ExtractBinarySave(&file_out,tmpSave,false); 84 | file_out.close(); 85 | } 86 | } 87 | 88 | //ui->statusBar->showMessage(tr("Save from file %1 inserted").arg(fileName)); 89 | TheConfig->LoadFromRegistry();//restoring config after all those temporary updates (if any) 90 | 91 | } 92 | 93 | bool MainWindow::GlobalBinaryExtractChecks() 94 | { 95 | //first we must check if file is recoverable after all 96 | //since some configs are not 97 | //known examples : 98 | // 1) no SAT, no size, sys all. Since we cannot detect cluster size 99 | // in this case, we don't know where to find headers. 100 | // Theoretically, we can search for counter using both known 101 | // cluster sizes, but that magic is unreliable, so no. 102 | if ( (TheConfig->m_bExtractSAT == false) && 103 | (TheConfig->m_bExtractSize == false) && 104 | TheConfig->m_bExtractSysAll ) 105 | { 106 | QMessageBox msgBox; 107 | msgBox.setText(tr("The combination you set (no SAT, no size, all headers) is extractable, but not reliably insertable. There are possible workarounds, but i'm not into implementing them. Not extracting.")); 108 | msgBox.exec(); 109 | return false; 110 | } 111 | 112 | //issue a warning if SAT is off and sys are on 113 | if ( (TheConfig->m_bExtractSAT==false) && ( (TheConfig->m_bExtractSys) || (TheConfig->m_bExtractSysAll) ) ) 114 | { 115 | QMessageBox msgBox; 116 | msgBox.setText(tr("You're trying to do something strange saving headers and NOT saving SAT. This is possible setup all right, it will be extracted and inserted successfully, but data inside looks stupidly unrelated. I will continue, but you've been warned.")); 117 | msgBox.exec(); 118 | } 119 | 120 | return true; 121 | } 122 | 123 | void MainWindow::ExtractBinarySave(QFile *file_out, SaveType Save, bool bSingle) 124 | { 125 | //extract save from image 126 | char buf[256]; 127 | QString fileName; 128 | QString folderName; 129 | TheConfig->LoadFromRegistry(); 130 | 131 | //file/folder opened, move on 132 | 133 | //copy extractwin's config from current one 134 | if (TheConfig->m_bAskFormatAtEveryExtract) 135 | { 136 | *(SetupWinExtract->SetupConfig) = *TheConfig; 137 | } 138 | 139 | if (TheConfig->m_bAskFormatAtEveryExtract) 140 | { 141 | SetupWinExtract->SetupConfig->m_bAskFormatAtEveryExtract = true; 142 | SetupWinExtract->SetupConfig->UpdateFlags(); 143 | SetupWinExtract->UpdateFromConfig(); 144 | SetupWinExtract->SetExtractInsertFilename(QString(Save.Name)); 145 | //opening format window as modal 146 | if (SetupWinExtract->exec() == QDialog::Rejected) return; 147 | //getting temporal config from it 148 | *TheConfig = *(SetupWinExtract->SetupConfig); 149 | } 150 | 151 | //1st cluster 152 | if (TheConfig->m_bExtractSys) 153 | { 154 | if (TheConfig->m_bExtractSysFillZero) 155 | { 156 | buf[0]=(char)0; 157 | buf[1]=(char)0; 158 | buf[2]=(char)0; 159 | buf[3]=(char)0; 160 | } 161 | else 162 | { 163 | buf[0] = HugeRAM[Save.iStartCluster*TheConfig->m_iClusterSize]; 164 | buf[1] = HugeRAM[Save.iStartCluster*TheConfig->m_iClusterSize+1]; 165 | buf[2] = HugeRAM[Save.iStartCluster*TheConfig->m_iClusterSize+2]; 166 | buf[3] = HugeRAM[Save.iStartCluster*TheConfig->m_iClusterSize+3]; 167 | } 168 | file_out->write(buf,4); 169 | } 170 | if (TheConfig->m_bExtractName) 171 | { 172 | file_out->write(Save.Name,11); 173 | } 174 | if (TheConfig->m_bExtractLanguage) 175 | { 176 | buf[0]=(char)Save.cLanguageCode; 177 | file_out->write(buf,1); 178 | } 179 | if (TheConfig->m_bExtractDescription) 180 | { 181 | file_out->write(Save.Comment,10); 182 | } 183 | //SSF specific - add zero and language code after description 184 | if (TheConfig->m_ExtractMode == ExtractSSF) 185 | { 186 | buf[0]=(char)0; 187 | buf[1]=(char)Save.cLanguageCode; 188 | file_out->write(buf,2); 189 | } 190 | if (TheConfig->m_bExtractDateTime) 191 | { 192 | //SSF specific date/time 193 | if (TheConfig->m_ExtractMode == ExtractSSF) 194 | { 195 | Save.DateTimeRaw = GetSSF4ByteFromDateTime(Save.DateTime); 196 | file_out->write(Save.DateTimeRaw,4); 197 | } 198 | else 199 | { 200 | file_out->write(Save.DateTimeRaw,4); 201 | } 202 | } 203 | if (TheConfig->m_bExtractSize) 204 | { 205 | buf[0]=(unsigned char)(Save.iBytes/0x1000000); 206 | buf[1]=(unsigned char)(Save.iBytes/0x10000); 207 | buf[2]=(unsigned char)(Save.iBytes/0x100); 208 | buf[3]=(unsigned char)(Save.iBytes); 209 | file_out->write(buf,4); 210 | } 211 | //Druid II specific - add 2 zeroes after header 212 | if (TheConfig->m_ExtractMode == ExtractDruidII) 213 | { 214 | buf[0]=(unsigned char)0; 215 | buf[1]=(unsigned char)0; 216 | file_out->write(buf,2); 217 | } 218 | //write 1st cluster 219 | int iSATnDataSize = Save.SAT.size()*2 + Save.iBytes; 220 | if ((iSATnDataSize + 34 ) < TheConfig->m_iClusterSize ) 221 | { 222 | //writing single cluster 223 | if (TheConfig->m_bExtractSAT) 224 | file_out->write(HugeRAM.mid(Save.iStartCluster*TheConfig->m_iClusterSize+34,Save.SAT.size()*2),Save.SAT.size()*2); 225 | file_out->write(HugeRAM.mid(Save.iStartCluster*TheConfig->m_iClusterSize+34+Save.SAT.size()*2,Save.iBytes),Save.iBytes); 226 | } 227 | else 228 | { 229 | //writing first cluster 230 | if (TheConfig->m_bExtractSAT) //if saving SAT 231 | file_out->write(HugeRAM.mid(Save.iStartCluster*TheConfig->m_iClusterSize+34,TheConfig->m_iClusterSize),TheConfig->m_iClusterSize-34); 232 | else //not saving SAT 233 | if (34+Save.SAT.size()*2 < TheConfig->m_iClusterSize) //if sat uses first cluster, but not fully 234 | file_out->write(HugeRAM.mid(Save.iStartCluster*TheConfig->m_iClusterSize+34+Save.SAT.size()*2,TheConfig->m_iClusterSize), 235 | TheConfig->m_iClusterSize-34-(Save.SAT.size()*2)); 236 | 237 | } 238 | //now remaining clusters 239 | int iRemainingBytes = Save.SAT.size()*2+Save.iBytes + 34 - TheConfig->m_iClusterSize; 240 | for (int i=0;i (TheConfig->m_iClusterSize-4)) //not counting headers 243 | { 244 | //full middle block 245 | if (TheConfig->m_bExtractSysAll) 246 | { 247 | //extract header 248 | if (TheConfig->m_bExtractSysFillZero) 249 | { 250 | buf[0]=(char)0; 251 | buf[1]=(char)0; 252 | buf[2]=(char)0; 253 | buf[3]=(char)0; 254 | } 255 | else 256 | { 257 | buf[0]=(char)0; 258 | buf[1]=(char)0; 259 | buf[2]=(char)0; 260 | buf[3]=Save.cCounter; 261 | } 262 | file_out->write(buf,4); 263 | } 264 | //three cases here: full sat cluster, ful data cluster, sat with data in the end 265 | //detecting 266 | if ((iRemainingBytes - Save.iBytes) >= (TheConfig->m_iClusterSize-4) ) 267 | { 268 | //full SAT cluster 269 | if (TheConfig->m_bExtractSAT) 270 | file_out->write(HugeRAM.mid(Save.SAT.at(i)*TheConfig->m_iClusterSize+4,TheConfig->m_iClusterSize-4),TheConfig->m_iClusterSize-4); 271 | } 272 | else if (iRemainingBytes <= Save.iBytes) 273 | { 274 | //full data cluster 275 | file_out->write(HugeRAM.mid(Save.SAT.at(i)*TheConfig->m_iClusterSize+4,TheConfig->m_iClusterSize-4),TheConfig->m_iClusterSize-4); 276 | } 277 | else 278 | { 279 | int iRemainingSAT = iRemainingBytes - Save.iBytes; 280 | //SAT with data in the end 281 | if (TheConfig->m_bExtractSAT) //write as is 282 | file_out->write(HugeRAM.mid(Save.SAT.at(i)*TheConfig->m_iClusterSize+4,TheConfig->m_iClusterSize-4),TheConfig->m_iClusterSize-4); 283 | else //only write data part 284 | file_out->write(HugeRAM.mid(Save.SAT.at(i)*TheConfig->m_iClusterSize+4+iRemainingSAT,TheConfig->m_iClusterSize-4),TheConfig->m_iClusterSize-4-iRemainingSAT); 285 | } 286 | iRemainingBytes -= TheConfig->m_iClusterSize; 287 | iRemainingBytes +=4; 288 | } 289 | else 290 | { 291 | //write last cluster 292 | //last cluster here is definitely NOT SAT, so no SAT checks here 293 | // (this last cluster case is not used when save is only 1 cluster, 294 | // only when save is 2 or more clusters, so don't worry) 295 | if (TheConfig->m_bExtractSysAll) 296 | { 297 | //extract header 298 | if (TheConfig->m_bExtractSysFillZero) 299 | { 300 | buf[0]=(char)0; 301 | buf[1]=(char)0; 302 | buf[2]=(char)0; 303 | buf[3]=(char)0; 304 | } 305 | else 306 | { 307 | buf[0]=(char)0; 308 | buf[1]=(char)0; 309 | buf[2]=(char)0; 310 | buf[3]=Save.cCounter; 311 | } 312 | file_out->write(buf,4); 313 | } 314 | file_out->write(HugeRAM.mid((Save.SAT.at(i)*TheConfig->m_iClusterSize)+4,iRemainingBytes),iRemainingBytes); 315 | iRemainingBytes = 0; 316 | } 317 | } 318 | } 319 | 320 | void MainWindow::ExtractBUPSave(QFile *file_out, SaveType Save, bool bSingle) 321 | { 322 | //extract save from image 323 | char buf[256]; 324 | QString fileName; 325 | QString folderName; 326 | TheConfig->LoadFromRegistry(); 327 | int iWritten = 0; 328 | 329 | //file/folder opened, move on 330 | 331 | //add signature 332 | file_out->write("Vmem"); 333 | //unknown up to 16 334 | for (int i=0;i<12;i++) 335 | file_out->write("\0",1); 336 | iWritten+=16; 337 | 338 | file_out->write(Save.Name,11); 339 | iWritten+=11; 340 | 341 | buf[0]=(char)Save.cLanguageCode; 342 | file_out->write(buf,1); 343 | iWritten+=1; 344 | 345 | file_out->write(Save.Comment,10); 346 | iWritten+=10; 347 | 348 | //skipping 2 unknown bytes for BUP 349 | for (int i=0;i<2;i++) 350 | file_out->write("\0",1); 351 | iWritten+=2; 352 | 353 | file_out->write(Save.DateTimeRaw,4); 354 | iWritten+=4; 355 | 356 | buf[0]=(unsigned char)(Save.iBytes/0x1000000); 357 | buf[1]=(unsigned char)(Save.iBytes/0x10000); 358 | buf[2]=(unsigned char)(Save.iBytes/0x100); 359 | buf[3]=(unsigned char)(Save.iBytes); 360 | file_out->write(buf,4); 361 | iWritten+=4; 362 | 363 | while(iWritten<64) 364 | { 365 | file_out->write("\0",1);//skipping to data 366 | iWritten++; 367 | } 368 | 369 | //write 1st cluster 370 | int iSATnDataSize = Save.SAT.size()*2 + Save.iBytes; 371 | if ((iSATnDataSize + 34 ) < TheConfig->m_iClusterSize ) 372 | { 373 | //writing single cluster 374 | file_out->write(HugeRAM.mid(Save.iStartCluster*TheConfig->m_iClusterSize+34+Save.SAT.size()*2,Save.iBytes),Save.iBytes); 375 | } 376 | else 377 | { 378 | //writing first cluster 379 | if (34+Save.SAT.size()*2 < TheConfig->m_iClusterSize) //if sat uses first cluster, but not fully 380 | file_out->write(HugeRAM.mid(Save.iStartCluster*TheConfig->m_iClusterSize+34+Save.SAT.size()*2,TheConfig->m_iClusterSize), 381 | TheConfig->m_iClusterSize-34-(Save.SAT.size()*2)); 382 | 383 | } 384 | //now remaining clusters 385 | int iRemainingBytes = Save.SAT.size()*2+Save.iBytes + 34 - TheConfig->m_iClusterSize; 386 | for (int i=0;i (TheConfig->m_iClusterSize-4)) //not counting headers 389 | { 390 | //three cases here: full sat cluster, ful data cluster, sat with data in the end 391 | //detecting 392 | if ((iRemainingBytes - Save.iBytes) >= (TheConfig->m_iClusterSize-4) ) 393 | { 394 | //full SAT cluster 395 | } 396 | else if (iRemainingBytes <= Save.iBytes) 397 | { 398 | //full data cluster 399 | file_out->write(HugeRAM.mid(Save.SAT.at(i)*TheConfig->m_iClusterSize+4,TheConfig->m_iClusterSize-4),TheConfig->m_iClusterSize-4); 400 | } 401 | else 402 | { 403 | int iRemainingSAT = iRemainingBytes - Save.iBytes; 404 | //only write data part 405 | file_out->write(HugeRAM.mid(Save.SAT.at(i)*TheConfig->m_iClusterSize+4+iRemainingSAT,TheConfig->m_iClusterSize-4),TheConfig->m_iClusterSize-4-iRemainingSAT); 406 | } 407 | iRemainingBytes -= TheConfig->m_iClusterSize; 408 | iRemainingBytes +=4; 409 | } 410 | else 411 | { 412 | //write last cluster 413 | //last cluster here is definitely NOT SAT, so no SAT checks here 414 | // (this last cluster case is not used when save is only 1 cluster, 415 | // only when save is 2 or more clusters, so don't worry) 416 | file_out->write(HugeRAM.mid((Save.SAT.at(i)*TheConfig->m_iClusterSize)+4,iRemainingBytes),iRemainingBytes); 417 | iRemainingBytes = 0; 418 | } 419 | } 420 | } 421 | 422 | void MainWindow::ExtractXMLSave(QFile *file_out, SaveType Save, bool bSingle) 423 | { 424 | //XML extraction is similar to binary with some exceptions: 425 | // 1) all extract flags are ignored, everything is extracted except SAT and 2..n headers 426 | // 2) some additional data fields are added, like player's name, comment, source etc. 427 | 428 | //file/folder opened, move on 429 | 430 | //TODO: ask user for additional fields 431 | 432 | //collect all binary save data 433 | QByteArray tmpdata; 434 | tmpdata.clear(); 435 | int iCurrentCluster = -1; 436 | int iCurrentPos = 34; 437 | //skipping SAT first 438 | for (int i=0;im_iClusterSize-1) 441 | { 442 | iCurrentCluster++; 443 | iCurrentPos = 4; 444 | } 445 | else 446 | iCurrentPos++; 447 | } 448 | //now copying data 449 | for (int i=0;im_iClusterSize+iCurrentPos)); 453 | else 454 | tmpdata.append(HugeRAM.at(Save.SAT.at(iCurrentCluster)*TheConfig->m_iClusterSize+iCurrentPos)); 455 | 456 | if (iCurrentPos == TheConfig->m_iClusterSize-1) 457 | { 458 | iCurrentCluster++; 459 | iCurrentPos = 4; 460 | } 461 | else 462 | iCurrentPos++; 463 | } 464 | 465 | //start xml writer 466 | QXmlStreamWriter xml_write(file_out); 467 | xml_write.setAutoFormatting(true); 468 | xml_write.writeStartDocument(QString("1.0")); 469 | xml_write.writeStartElement(QString("Sega_Saturn_Save")); 470 | xml_write.writeStartElement(QString("mandatory")); 471 | xml_write.writeStartElement("counter"); 472 | xml_write.writeCharacters(QString("%1").arg(Save.cCounter)); 473 | xml_write.writeEndElement();//counter 474 | xml_write.writeStartElement("name"); 475 | xml_write.writeCharacters(QString(Save.Name)); 476 | xml_write.writeEndElement();//name 477 | xml_write.writeStartElement("name_binary"); 478 | xml_write.writeCharacters(QString(Save.Name.toBase64())); 479 | xml_write.writeEndElement();//name_binary 480 | xml_write.writeStartElement("comment"); 481 | xml_write.writeCharacters(QString(Save.Comment)); 482 | xml_write.writeEndElement();//name_binary 483 | xml_write.writeStartElement("comment_binary"); 484 | xml_write.writeCharacters(QString(Save.Comment.toBase64())); 485 | xml_write.writeEndElement();//comment 486 | xml_write.writeStartElement("language_code"); 487 | xml_write.writeCharacters(QString("%1").arg(Save.cLanguageCode)); 488 | xml_write.writeEndElement();//language_code 489 | xml_write.writeStartElement("size"); 490 | xml_write.writeCharacters(QString("%1").arg(Save.iBytes)); 491 | xml_write.writeEndElement();//size 492 | xml_write.writeStartElement(QString("date")); 493 | xml_write.writeAttribute("year",QString("%1").arg(Save.DateTime.date().year())); 494 | xml_write.writeAttribute("month",QString("%1").arg(Save.DateTime.date().month())); 495 | xml_write.writeAttribute("day",QString("%1").arg(Save.DateTime.date().day())); 496 | xml_write.writeEndElement();//date 497 | xml_write.writeStartElement(QString("time")); 498 | xml_write.writeAttribute("hour",QString("%1").arg(Save.DateTime.time().hour())); 499 | xml_write.writeAttribute("minute",QString("%1").arg(Save.DateTime.time().minute())); 500 | xml_write.writeAttribute("second",QString("%1").arg(Save.DateTime.time().second())); 501 | xml_write.writeEndElement();//time 502 | xml_write.writeStartElement("data"); 503 | xml_write.writeCharacters(QString(tmpdata.toBase64())); 504 | xml_write.writeEndElement();//data 505 | xml_write.writeEndElement();//mandatory 506 | xml_write.writeStartElement(QString("optional")); 507 | xml_write.writeEndElement();//optional 508 | xml_write.writeEndElement();//Sega Saturn Save 509 | xml_write.writeEndDocument(); 510 | 511 | } 512 | -------------------------------------------------------------------------------- /fileiosettingsdialog.cpp: -------------------------------------------------------------------------------- 1 | #include "fileiosettingsdialog.h" 2 | #include "ui_fileiosettingsdialog.h" 3 | 4 | FileIOSettingsDialog::FileIOSettingsDialog(FileIOSettingsType *settings, QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::FileIOSettingsDialog) 7 | { 8 | m_pSettings = settings; 9 | ui->setupUi(this); 10 | ui->FileIOModeComboBox->addItem(tr("SH2 mode (dummy byte before each byte)")); 11 | ui->FileIOModeComboBox->addItem(tr("Raw mode")); 12 | ui->ClusterSizeComboBox->addItem(QString("512")); 13 | ui->ClusterSizeComboBox->addItem(QString("256")); 14 | ui->ClusterSizeComboBox->addItem(QString("64")); 15 | ui->ClusterSizeComboBox->addItem(tr("Custom")); 16 | m_Settings = *m_pSettings; //get detected values 17 | if (RAW_IO_MODE == m_Settings.IOMode) 18 | ui->FileIOModeComboBox->setCurrentIndex(1); 19 | else 20 | ui->FileIOModeComboBox->setCurrentIndex(0); 21 | if (CLUSTER_512 == m_Settings.IOClusterSize) 22 | ui->ClusterSizeComboBox->setCurrentIndex(0); 23 | else if (CLUSTER_256 == m_Settings.IOClusterSize) 24 | ui->ClusterSizeComboBox->setCurrentIndex(1); 25 | else if (CLUSTER_64 == m_Settings.IOClusterSize) 26 | ui->ClusterSizeComboBox->setCurrentIndex(2); 27 | else if (CLUSTER_CUSTOM == m_Settings.IOClusterSize) 28 | { 29 | ui->ClusterSizeComboBox->setCurrentIndex(3); 30 | ui->CustomClusterSizeSpinBox->setValue(m_Settings.iIOCustomClusterSize); 31 | } 32 | if (m_Settings.bIOModeChangeable) 33 | { 34 | ui->label->setDisabled(false); 35 | ui->FileIOModeComboBox->setDisabled(false); 36 | } 37 | else 38 | { 39 | ui->label->setDisabled(true); 40 | ui->FileIOModeComboBox->setDisabled(true); 41 | } 42 | if (m_Settings.bClusterSizeChangeable) 43 | { 44 | ui->label_2->setDisabled(false); 45 | ui->ClusterSizeComboBox->setDisabled(false); 46 | if (CLUSTER_CUSTOM == m_Settings.IOClusterSize) 47 | { 48 | ui->label_3->setDisabled(false); 49 | ui->CustomClusterSizeSpinBox->setDisabled(false); 50 | } 51 | else 52 | { 53 | ui->label_3->setDisabled(true); 54 | ui->CustomClusterSizeSpinBox->setDisabled(true); 55 | } 56 | } 57 | else 58 | { 59 | ui->label_2->setDisabled(true); 60 | ui->ClusterSizeComboBox->setDisabled(true); 61 | ui->label_3->setDisabled(true); 62 | ui->CustomClusterSizeSpinBox->setDisabled(true); 63 | } 64 | this->setWindowTitle(this->windowTitle().append(" ").append(APP_VERSION)); 65 | } 66 | 67 | FileIOSettingsDialog::~FileIOSettingsDialog() 68 | { 69 | delete ui; 70 | } 71 | 72 | void FileIOSettingsDialog::on_FileIOModeComboBox_currentIndexChanged(int index) 73 | { 74 | switch (index) 75 | { 76 | case 0: 77 | m_Settings.IOMode = SH2_IO_MODE; 78 | break; 79 | case 1: 80 | m_Settings.IOMode = RAW_IO_MODE; 81 | break; 82 | } 83 | } 84 | 85 | void FileIOSettingsDialog::on_ClusterSizeComboBox_currentIndexChanged(int index) 86 | { 87 | ui->label_3->setDisabled(true); 88 | ui->CustomClusterSizeSpinBox->setDisabled(true); 89 | switch (index) 90 | { 91 | case 0: 92 | m_Settings.IOClusterSize = CLUSTER_512; 93 | break; 94 | case 1: 95 | m_Settings.IOClusterSize = CLUSTER_256; 96 | break; 97 | case 2: 98 | m_Settings.IOClusterSize = CLUSTER_64; 99 | break; 100 | case 3: 101 | m_Settings.IOClusterSize = CLUSTER_CUSTOM; 102 | ui->label_3->setDisabled(false); 103 | ui->CustomClusterSizeSpinBox->setDisabled(false); 104 | break; 105 | } 106 | } 107 | 108 | void FileIOSettingsDialog::on_CustomClusterSizeSpinBox_valueChanged(int arg1) 109 | { 110 | m_Settings.iIOCustomClusterSize = arg1; 111 | } 112 | 113 | void FileIOSettingsDialog::on_buttonBox_accepted() 114 | { 115 | m_pSettings[0] = m_Settings; 116 | } 117 | -------------------------------------------------------------------------------- /fileiosettingsdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef FILEIOSETTINGSDIALOG_H 2 | #define FILEIOSETTINGSDIALOG_H 3 | 4 | #include 5 | #include "config.h" 6 | #include "mainwindow.h" 7 | 8 | namespace Ui { 9 | class FileIOSettingsDialog; 10 | } 11 | 12 | class FileIOSettingsDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit FileIOSettingsDialog(FileIOSettingsType *settings, QWidget *parent = 0); 18 | ~FileIOSettingsDialog(); 19 | 20 | private slots: 21 | void on_FileIOModeComboBox_currentIndexChanged(int index); 22 | 23 | void on_ClusterSizeComboBox_currentIndexChanged(int index); 24 | 25 | void on_CustomClusterSizeSpinBox_valueChanged(int arg1); 26 | 27 | void on_buttonBox_accepted(); 28 | 29 | private: 30 | Ui::FileIOSettingsDialog *ui; 31 | FileIOSettingsType * m_pSettings; 32 | FileIOSettingsType m_Settings; 33 | }; 34 | 35 | #endif // FILEIOSETTINGSDIALOG_H 36 | -------------------------------------------------------------------------------- /fileiosettingsdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FileIOSettingsDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 180 11 | 12 | 13 | 14 | Sega Saturn RAM Backup parser 15 | 16 | 17 | 18 | 19 | 30 20 | 140 21 | 341 22 | 32 23 | 24 | 25 | 26 | Qt::Horizontal 27 | 28 | 29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 30 | 31 | 32 | 33 | 34 | 35 | 30 36 | 20 37 | 341 38 | 121 39 | 40 | 41 | 42 | 43 | QFormLayout::AllNonFixedFieldsGrow 44 | 45 | 46 | 47 | 48 | FIle I/O mode 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Cluster size 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 64 69 | 70 | 71 | 8192 72 | 73 | 74 | 16 75 | 76 | 77 | 256 78 | 79 | 80 | 81 | 82 | 83 | 84 | Custom cluster size 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | buttonBox 95 | accepted() 96 | FileIOSettingsDialog 97 | accept() 98 | 99 | 100 | 248 101 | 254 102 | 103 | 104 | 157 105 | 274 106 | 107 | 108 | 109 | 110 | buttonBox 111 | rejected() 112 | FileIOSettingsDialog 113 | reject() 114 | 115 | 116 | 316 117 | 260 118 | 119 | 120 | 286 121 | 274 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /game_to_cart.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\__repo\ss_save_parser\game_to_cart_xpm[] = { 3 | "71 23 240 2", 4 | " c None", 5 | ". c #1A2127", 6 | "+ c #1B2228", 7 | "@ c #1A2327", 8 | "# c #383E42", 9 | "$ c #252D32", 10 | "% c #1A1C1D", 11 | "& c #4A4A4A", 12 | "* c #A5A5A5", 13 | "= c #192C3D", 14 | "- c #007EED", 15 | "; c #008BFF", 16 | "> c #0280F3", 17 | ", c #2592F1", 18 | "' c #038BFF", 19 | ") c #008AFF", 20 | "! c #066FCF", 21 | "~ c #162C3F", 22 | "{ c #142C41", 23 | "] c #0676DB", 24 | "^ c #14314A", 25 | "/ c #F2F2F2", 26 | "( c #262626", 27 | "_ c #939393", 28 | ": c #1E3344", 29 | "< c #056ECC", 30 | "[ c #0086FF", 31 | "} c #0F497F", 32 | "| c #C5AC81", 33 | "1 c #5BA3DA", 34 | "2 c #0084FD", 35 | "3 c #0085FE", 36 | "4 c #0089FF", 37 | "5 c #132F48", 38 | "6 c #B6B6B6", 39 | "7 c #CECECE", 40 | "8 c #9E9E9E", 41 | "9 c #666666", 42 | "0 c #2A4257", 43 | "a c #0569C1", 44 | "b c #0F4A81", 45 | "c c #C0AB85", 46 | "d c #A0BEC9", 47 | "e c #0084FC", 48 | "f c #0084FE", 49 | "g c #0B5596", 50 | "h c #263640", 51 | "i c #0000FF", 52 | "j c #DADADA", 53 | "k c #545454", 54 | "l c #9C9C9C", 55 | "m c #1D354C", 56 | "n c #0767BE", 57 | "o c #056AC7", 58 | "p c #5997C9", 59 | "q c #0987FA", 60 | "r c #0086FE", 61 | "s c #0080FC", 62 | "t c #8EC8F9", 63 | "u c #8FC8F9", 64 | "v c #49A6F8", 65 | "w c #0083FE", 66 | "x c #122535", 67 | "y c #D4E3FF", 68 | "z c #C2C2C2", 69 | "A c #213746", 70 | "B c #076FCD", 71 | "C c #B0D8F8", 72 | "D c #FFFFFF", 73 | "E c #E0F2FE", 74 | "F c #44A5FB", 75 | "G c #0081FE", 76 | "H c #008DFF", 77 | "I c #112433", 78 | "J c #223646", 79 | "K c #0382F6", 80 | "L c #018BFF", 81 | "M c #0187FF", 82 | "N c #FDFEFE", 83 | "O c #A4A3A3", 84 | "P c #156AB7", 85 | "Q c #AAD8FE", 86 | "R c #3E5263", 87 | "S c #E6E6E6", 88 | "T c #373938", 89 | "U c #282A29", 90 | "V c #292A2A", 91 | "W c #252626", 92 | "X c #191A1A", 93 | "Y c #0B5799", 94 | "Z c #F9FBFB", 95 | "` c #929292", 96 | " . c #085EAC", 97 | ".. c #C5E6FF", 98 | "+. c #464847", 99 | "@. c #0D4C83", 100 | "#. c #0088FF", 101 | "$. c #2091F3", 102 | "%. c #1F91F4", 103 | "&. c #0B85F2", 104 | "*. c #FEFFFF", 105 | "=. c #A1A1A1", 106 | "-. c #2970AF", 107 | ";. c #203D52", 108 | ">. c #1A1C19", 109 | ",. c #1E201F", 110 | "'. c #0D4478", 111 | "). c #0085FF", 112 | "!. c #0286FD", 113 | "~. c #FFE5A7", 114 | "{. c #FFE1A4", 115 | "]. c #FFE0A3", 116 | "^. c #FDF8EC", 117 | "/. c #FFFCF1", 118 | "(. c #FFEBC0", 119 | "_. c #FFEBB0", 120 | ":. c #464337", 121 | "<. c #112737", 122 | "[. c #0A68BC", 123 | "}. c #0A64B4", 124 | "|. c #0C64B6", 125 | "1. c #B5A47F", 126 | "2. c #F9DEA9", 127 | "3. c #F9DDA6", 128 | "4. c #C6B18A", 129 | "5. c #4C4940", 130 | "6. c #363737", 131 | "7. c #393B39", 132 | "8. c #3B3839", 133 | "9. c #3B3938", 134 | "0. c #3B3A37", 135 | "a. c #3A3837", 136 | "b. c #1F201F", 137 | "c. c #7F735B", 138 | "d. c #998A6C", 139 | "e. c #998869", 140 | "f. c #95866A", 141 | "g. c #95866B", 142 | "h. c #96886B", 143 | "i. c #32312A", 144 | "j. c #47494B", 145 | "k. c #AA9B7D", 146 | "l. c #69604D", 147 | "m. c #131614", 148 | "n. c #0A5DA6", 149 | "o. c #A29374", 150 | "p. c #A19272", 151 | "q. c #605849", 152 | "r. c #141616", 153 | "s. c #121413", 154 | "t. c #313332", 155 | "u. c #4C4E4D", 156 | "v. c #AEA081", 157 | "w. c #4F493B", 158 | "x. c #D0D0D0", 159 | "y. c #CDCDCD", 160 | "z. c #03213C", 161 | "A. c #FEE4AE", 162 | "B. c #F8DDA8", 163 | "C. c #8E8066", 164 | "D. c #909091", 165 | "E. c #D2D2D2", 166 | "F. c #3D3E3D", 167 | "G. c #3D3E3F", 168 | "H. c #1D1D1B", 169 | "I. c #F6F7F7", 170 | "J. c #33312B", 171 | "K. c #FDE1AD", 172 | "L. c #8E8167", 173 | "M. c #B1B1B2", 174 | "N. c #4C4D4D", 175 | "O. c #363636", 176 | "P. c #ECECEC", 177 | "Q. c #F3F3F3", 178 | "R. c #181A1A", 179 | "S. c #464336", 180 | "T. c #877B63", 181 | "U. c #A6A7A7", 182 | "V. c #3B3C3C", 183 | "W. c #2B2C2C", 184 | "X. c #E0E0E0", 185 | "Y. c #DDDDDD", 186 | "Z. c #0D2133", 187 | "`. c #191D1D", 188 | " + c #152431", 189 | ".+ c #191C1B", 190 | "++ c #181919", 191 | "@+ c #1C1E1D", 192 | "#+ c #AAAAAA", 193 | "$+ c #0B0D0C", 194 | "%+ c #131413", 195 | "&+ c #018AFF", 196 | "*+ c #172329", 197 | "=+ c #0B5A9F", 198 | "-+ c #3C3B39", 199 | ";+ c #171B19", 200 | ">+ c #21181A", 201 | ",+ c #661018", 202 | "'+ c #6F3D42", 203 | ")+ c #5B5B5B", 204 | "!+ c #131716", 205 | "~+ c #8C0F19", 206 | "{+ c #7E468E", 207 | "]+ c #1E1617", 208 | "^+ c #AE0A1B", 209 | "/+ c #CB081D", 210 | "(+ c #8B686B", 211 | "_+ c #646A69", 212 | ":+ c #4A5251", 213 | "<+ c #2E2E2E", 214 | "[+ c #BB091D", 215 | "}+ c #FF001C", 216 | "|+ c #FC0010", 217 | "1+ c #B5B5B5", 218 | "2+ c #9D0A1B", 219 | "3+ c #59141B", 220 | "4+ c #C13D48", 221 | "5+ c #C91B2C", 222 | "6+ c #BC081C", 223 | "7+ c #3B2627", 224 | "8+ c #383838", 225 | "9+ c #2E2E2F", 226 | "0+ c #FF031E", 227 | "a+ c #FF021D", 228 | "b+ c #FCEFF0", 229 | "c+ c #F81C2F", 230 | "d+ c #FB031D", 231 | "e+ c #E9041E", 232 | "f+ c #6F111A", 233 | "g+ c #CA0A1E", 234 | "h+ c #FF011C", 235 | "i+ c #F8031C", 236 | "j+ c #2F2929", 237 | "k+ c #2F3030", 238 | "l+ c #0F1B1A", 239 | "m+ c #050707", 240 | "n+ c #171C1B", 241 | "o+ c #121C1A", 242 | "p+ c #0E1B19", 243 | "q+ c #212423", 244 | " . + + @ + + + + + + # $ % & & & & & & & & & & & & & & & & & & & & & & & & & & & * ", 245 | " = - ; ; > , ' ) ) ) ) ! ~ { ] ^ & / / / / / / / / / / / / / / / / / / / / / / / / / / / ( _ ", 246 | " : < [ } | 1 2 3 3 3 [ 4 4 4 5 & 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 ( 9 * ", 247 | " 0 a b c d e 3 3 f f f 3 [ g h i & / / 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 j 7 / / ( k l ", 248 | " m n o p q r 3 s t u v w 3 ) x i i & 6 6 / 7 y y y y y y y y y y y y y y y y y y y z / 6 6 ( k l ", 249 | " A B 3 3 3 3 3 3 C D D E F G H I i i i & / / 7 7 y y y y y y y y y y y y y y y y y y y z j / / ( k l ", 250 | " J K L L M 3 3 3 3 N D D O P Q R i i i i & 6 6 / 7 / S S S S S S S S S S S S S S S S S / z / 6 6 ( k l ", 251 | "T U V W X Y 3 3 3 r Z D D ` ...+. i i i i i & / / 7 7 / / / / / / / / / / / / / / / / / / / z j / / ( k l ", 252 | " @.#.3 3 $.%.&.*.D =.-.;.>.,. i i i i i i & 6 6 / 7 / S S S S S S S S S S S S S S S S S / z / 6 6 ( k l ", 253 | " '.#.r ).!.~.{.].^.^./.(._.:. i i i i i i i i i i i i i i i & j z 7 7 / / / / / / / / / / / / / / / / / / / z 7 7 8 ( k l ", 254 | " <.[.}.}.}.|.1.2.2.3.3.3.2.4.5. i i i i i i i i i i i i i i i i & j z 7 7 / S S S S S S S S S S S S S S S S S / z 7 7 8 ( k l ", 255 | " 6.7.8.9.0.a.b.c.d.e.f.g.h.d.i. i i i i i i i i i i i i i i i i & j z 7 7 / / / / / / / / / / / / / / / / / / / z 7 7 8 ( k l ", 256 | " j.k.l.m.n.o.p.q.r.s.t. i i i i i i i i i i i i i i i & j z 7 7 / S S S S S S S S S S S S S S S S S / z 7 7 8 ( k l ", 257 | " u.v.w.x.y.z.A.B.C.D.E.F. i i i i i i & j z 7 7 / / / / / / / / / / / / / / / / / / / z 7 7 8 ( k l ", 258 | " G.H.I.D D D J.K.L.M.D N. i i i i i & j z 7 z z z z z z z z z z z z z z z z z z z z z 7 7 8 ( k l ", 259 | " O.P.D D Q.R.S.T.U.V. i i i i & j z 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 ( k l ", 260 | " W.X.Y.Z.`. +.+++@+ i i i & j z 7 7 7 7 7 7 7 7 7 #+/ #+/ #+/ 7 7 7 7 7 7 7 7 7 8 ( k l ", 261 | " $+%+&+*+=+-+ i i & j z 7 7 7 7 7 7 7 7 #+/ #+/ #+/ 7 7 7 7 7 7 7 7 7 7 8 ( k l ", 262 | " s.;+#.>+,+'+ i & j z 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 ( k l ", 263 | " )+!+~+{+]+^+/+(+_+:+ & j z z z z z z z z z z z z z z z z z z z z z z z z z 8 ( k l ", 264 | " <+[+}+|+1+2+3+4+5+6+7+ * ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 8+9 * ", 265 | " 9+0+a+b+c+d+e+f+g+h+i+j+ _ 9 k k k k k k k k k k k k k k k k k k k k k k k k k 9 _ ", 266 | " k+l+l+m+l+l+l+n+o+l+p+q+ * l l l l l l l l l l l l l l l l l l l l l l l l l * "}; 267 | -------------------------------------------------------------------------------- /imagemapwindow.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "imagemapwindow.h" 8 | #include "ui_imagemapwindow.h" 9 | #include "math.h" 10 | 11 | #define CELL_SIZE 10 12 | 13 | MyLittleScene::MyLittleScene(QWidget *parent, ImageMapWindow * mappy) : 14 | QGraphicsScene(parent) 15 | { 16 | pMap = mappy; 17 | } 18 | 19 | void MyLittleScene::mousePressEvent(QGraphicsSceneMouseEvent * event) 20 | { 21 | int iX = event->scenePos().x(); 22 | int iY = event->scenePos().y(); 23 | //getting cluster number out if ix,iy 24 | int iClusterNumber = (iY/CELL_SIZE)*pMap->iMapWidth + (iX/CELL_SIZE); 25 | //search for hits in the current list 26 | int iFoundRow = -1; 27 | for (int i=0; iSavesList->size(); i++) 28 | { 29 | if (pMap->SavesList->at(i).iStartCluster == iClusterNumber) 30 | iFoundRow = i; 31 | for (int j=0;jSavesList->at(i).SAT.size()-1;j++) 32 | { 33 | if (pMap->SavesList->at(i).SAT.at(j)==iClusterNumber) 34 | iFoundRow = i; 35 | } 36 | } 37 | 38 | int iPrevRow = pMap->iCurrentRow; 39 | pMap->iCurrentRow = iFoundRow; 40 | pMap->ui->listWidget->setCurrentRow(iFoundRow); 41 | pMap->UpdateData(iPrevRow); 42 | pMap->UpdateData(pMap->iCurrentRow); 43 | return; 44 | } 45 | 46 | ImageMapWindow::ImageMapWindow(QWidget *parent, QList *pSavesList, Config *pTheConfig) : 47 | QDialog(parent), 48 | ui(new Ui::ImageMapWindow) 49 | { 50 | iCurrentRow=-1; 51 | SavesList = pSavesList; 52 | TheConfig = pTheConfig; 53 | scene = new MyLittleScene(this,this); 54 | ui->setupUi(this); 55 | QTimer *timer = new QTimer(this); 56 | connect(timer, SIGNAL(timeout()), this, SLOT(blink())); 57 | timer->start(120); 58 | } 59 | 60 | ImageMapWindow::~ImageMapWindow() 61 | { 62 | delete ui; 63 | } 64 | 65 | void ImageMapWindow::UpdateData() 66 | { 67 | QListWidgetItem * item; 68 | ui->listWidget->clear(); 69 | for (int i=0;isize();i++) 70 | { 71 | item = new QListWidgetItem(QString(SavesList->at(i).Name)); 72 | ui->listWidget->addItem(item); 73 | } 74 | ui->listWidget->setCurrentRow(iCurrentRow); 75 | QDesktopWidget desky; 76 | QRect mainScreenSize = desky.screenGeometry(desky.primaryScreen()); 77 | //we'll try to make our image look quad or 2:1 until we hit 2/3 of screen width limit 78 | //after that we just increase height 79 | //single block size is 5x5 pixel, with 1 pixel of black border, so it's 6x6 80 | int iHorizontalLimit = mainScreenSize.width() / ((CELL_SIZE*3)/2); // 1/3 screen reserve 81 | int iClustersNumber = TheConfig->m_iFileSize/TheConfig->m_iClusterSize; 82 | iMapWidth = sqrtf(iClustersNumber); 83 | if (iMapWidth > iHorizontalLimit) iMapWidth = iHorizontalLimit; 84 | iMapHeight = iClustersNumber/iMapWidth + 1; 85 | //clear 86 | scene->clear(); 87 | //draw grid 88 | for (int i=0;i<=iMapWidth;i++) 89 | scene->addLine(QLine(i*CELL_SIZE,0,i*CELL_SIZE,iMapHeight*CELL_SIZE)); 90 | for (int i=0;i<=iMapHeight;i++) 91 | scene->addLine(QLine(0,i*CELL_SIZE,iMapWidth*CELL_SIZE,i*CELL_SIZE)); 92 | QColor color; 93 | //colour map 94 | for (int i=0;isize();i++) 95 | { 96 | //generating a new color 97 | color.setHsv(((800*i)/SavesList->size())%255, 98 | 255, 99 | 255-((800*i)/SavesList->size())/5); 100 | //colouring save content 101 | //first cluster 102 | int iX = SavesList->at(i).iStartCluster%iMapWidth; 103 | int iY = SavesList->at(i).iStartCluster/iMapWidth; 104 | scene->addRect(QRect(iX*CELL_SIZE+1,iY*CELL_SIZE+1,CELL_SIZE-2,CELL_SIZE-2),QPen(color),QBrush(color,Qt::SolidPattern)); 105 | scene->addRect(QRect(iX*CELL_SIZE+3,iY*CELL_SIZE+3,CELL_SIZE-6,CELL_SIZE-6),QPen(Qt::white),QBrush(Qt::white,Qt::SolidPattern)); 106 | //other clusters 107 | for (int j=0;jat(i).SAT.size()-1;j++) 108 | { 109 | iX = SavesList->at(i).SAT.at(j)%iMapWidth; 110 | iY = SavesList->at(i).SAT.at(j)/iMapWidth; 111 | scene->addRect(QRect(iX*CELL_SIZE+1,iY*CELL_SIZE+1,CELL_SIZE-2,CELL_SIZE-2),QPen(color),QBrush(color,Qt::SolidPattern)); 112 | } 113 | //list 114 | //ui->listWidget->item(i)->setBackground(QBrush(color,Qt::SolidPattern)); 115 | QImage img(QSize(10,10),QImage::Format_RGB32); 116 | img.fill(color); 117 | ui->listWidget->item(i)->setIcon(QIcon(QPixmap::fromImage(img))); 118 | } 119 | 120 | scene->setSceneRect(0,0,iMapWidth*CELL_SIZE,iMapHeight*CELL_SIZE); 121 | ui->graphicsView->setScene(scene); 122 | //ui->graphicsView->setCacheMode(QGraphicsView::CacheNone); 123 | this->resize(mainScreenSize.width()-100,mainScreenSize.height()-100);//set size to full screen 124 | if ((iMapHeight * ((CELL_SIZE*3)/2) ) < mainScreenSize.height()) 125 | this->resize(iMapWidth*CELL_SIZE + ui->listWidget->width() + 50,iMapHeight*CELL_SIZE + 50); 126 | else 127 | this->resize(iMapWidth*CELL_SIZE + ui->listWidget->width() + 50,mainScreenSize.height()-100); 128 | this->setGeometry((mainScreenSize.width()-this->width())/2, 129 | (mainScreenSize.height()-this->height())/2, 130 | this->width(), 131 | this->height()); 132 | } 133 | 134 | void ImageMapWindow::UpdateData(int iIndex) 135 | { 136 | QColor color; 137 | //sanity check 138 | if (iIndex < 0 ) return; 139 | if (SavesList->size() < iIndex) return; 140 | //generating a new color 141 | color.setHsv(((800*iIndex)/SavesList->size())%255, 142 | 255, 143 | 255-((800*iIndex)/SavesList->size())/5); 144 | //colouring save content 145 | //first cluster 146 | int iX = SavesList->at(iIndex).iStartCluster%iMapWidth; 147 | int iY = SavesList->at(iIndex).iStartCluster/iMapWidth; 148 | scene->addRect(QRect(iX*CELL_SIZE+1,iY*CELL_SIZE+1,CELL_SIZE-2,CELL_SIZE-2),QPen(color),QBrush(color,Qt::SolidPattern)); 149 | scene->addRect(QRect(iX*CELL_SIZE+3,iY*CELL_SIZE+3,CELL_SIZE-6,CELL_SIZE-6),QPen(Qt::white),QBrush(Qt::white,Qt::SolidPattern)); 150 | //other clusters 151 | for (int j=0;jat(iIndex).SAT.size()-1;j++) 152 | { 153 | iX = SavesList->at(iIndex).SAT.at(j)%iMapWidth; 154 | iY = SavesList->at(iIndex).SAT.at(j)/iMapWidth; 155 | scene->addRect(QRect(iX*CELL_SIZE+1,iY*CELL_SIZE+1,CELL_SIZE-2,CELL_SIZE-2),QPen(color),QBrush(color,Qt::SolidPattern)); 156 | } 157 | //list 158 | //ui->listWidget->item(iIndex)->setBackground(QBrush(color,Qt::SolidPattern)); 159 | QImage img(QSize(10,10),QImage::Format_RGB32); 160 | img.fill(color); 161 | ui->listWidget->item(iIndex)->setIcon(QIcon(QPixmap::fromImage(img))); 162 | } 163 | 164 | void ImageMapWindow::on_listWidget_currentRowChanged(int currentRow) 165 | { 166 | int iPrevRow = iCurrentRow; 167 | iCurrentRow = currentRow; 168 | UpdateData(iPrevRow); 169 | UpdateData(iCurrentRow); 170 | } 171 | 172 | void ImageMapWindow::blink() 173 | { 174 | int iX,iY; 175 | if (iBlink==0) 176 | { 177 | iBlink = 1; 178 | if (iCurrentRow>=0) 179 | { 180 | iX = SavesList->at(iCurrentRow).iStartCluster%iMapWidth; 181 | iY = SavesList->at(iCurrentRow).iStartCluster/iMapWidth; 182 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1),QPen(Qt::white)); 183 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::white)); 184 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::white)); 185 | scene->addLine(QLine(iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::white)); 186 | for (int j=0;jat(iCurrentRow).SAT.size()-1;j++) 187 | { 188 | iX = SavesList->at(iCurrentRow).SAT.at(j)%iMapWidth; 189 | iY = SavesList->at(iCurrentRow).SAT.at(j)/iMapWidth; 190 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1),QPen(Qt::white)); 191 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::white)); 192 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::white)); 193 | scene->addLine(QLine(iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::white)); 194 | } 195 | } 196 | } 197 | else 198 | { 199 | iBlink = 0; 200 | if (iCurrentRow>=0) 201 | { 202 | iX = SavesList->at(iCurrentRow).iStartCluster%iMapWidth; 203 | iY = SavesList->at(iCurrentRow).iStartCluster/iMapWidth; 204 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1),QPen(Qt::black)); 205 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::black)); 206 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::black)); 207 | scene->addLine(QLine(iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::black)); 208 | for (int j=0;jat(iCurrentRow).SAT.size()-1;j++) 209 | { 210 | iX = SavesList->at(iCurrentRow).SAT.at(j)%iMapWidth; 211 | iY = SavesList->at(iCurrentRow).SAT.at(j)/iMapWidth; 212 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1),QPen(Qt::black)); 213 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::black)); 214 | scene->addLine(QLine(iX*CELL_SIZE+1,iY*CELL_SIZE+1,iX*CELL_SIZE+1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::black)); 215 | scene->addLine(QLine(iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+1,iX*CELL_SIZE+CELL_SIZE-1,iY*CELL_SIZE+CELL_SIZE-1),QPen(Qt::black)); 216 | } 217 | } 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /imagemapwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEMAPWINDOW_H 2 | #define IMAGEMAPWINDOW_H 3 | 4 | #include 5 | #include 6 | #include "config.h" 7 | 8 | class ImageMapWindow; 9 | 10 | class MyLittleScene : public QGraphicsScene 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit MyLittleScene(QWidget *parent = 0, ImageMapWindow * mappy = 0); 15 | 16 | protected : 17 | void mousePressEvent(QGraphicsSceneMouseEvent * event); 18 | 19 | private: 20 | ImageMapWindow * pMap; 21 | }; 22 | 23 | 24 | namespace Ui { 25 | class ImageMapWindow; 26 | } 27 | class ImageMapWindow : public QDialog 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | explicit ImageMapWindow(QWidget *parent = 0, QList *pSavesList = 0, Config *pTheConfig = 0); 33 | ~ImageMapWindow(); 34 | void UpdateData(); 35 | void UpdateData(int iIndex); 36 | int iMapWidth; 37 | int iCurrentRow; 38 | QList *SavesList; 39 | Ui::ImageMapWindow *ui; 40 | 41 | private slots: 42 | void on_listWidget_currentRowChanged(int currentRow); 43 | void blink(); 44 | 45 | private: 46 | Config * TheConfig; 47 | MyLittleScene * scene; 48 | int iMapHeight; 49 | int iBlink; 50 | }; 51 | 52 | #endif // IMAGEMAPWINDOW_H 53 | -------------------------------------------------------------------------------- /imagemapwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ImageMapWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 333 10 | 331 11 | 12 | 13 | 14 | Image Map 15 | 16 | 17 | 18 | 19 | 20 | Qt::ScrollBarAlwaysOn 21 | 22 | 23 | Qt::ScrollBarAlwaysOff 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /import.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | bool ProbeMemCardPlus(QFile * file_in) 9 | { 10 | //MemCardPlus contains "MEMORY CARTRIDGE" id at 0x50 11 | file_in->seek(0); 12 | QByteArray cbuf = file_in->read(256); 13 | if (QByteArray(cbuf,96).right(16).startsWith("MEMORY CARTRIDGE")) 14 | return true; 15 | else 16 | return false; 17 | } 18 | 19 | bool ProbeEMS8Meg(QFile * file_in) 20 | { 21 | //EMS 8 Meg card contains "NEW 8 MEG RAM CARD+" id at 0x60 and is compatible with MemCardPlus 22 | file_in->seek(0); 23 | QByteArray cbuf = file_in->read(256); 24 | if (QByteArray(cbuf,115).right(19).startsWith("NEW 8 MEG RAM CARD+")) 25 | return true; 26 | else 27 | return false; 28 | } 29 | 30 | bool ProbeActionReplay(QFile * file_in) 31 | { 32 | //ActionReplay contains "ACTION REPLAY +U" id at 0x50 33 | file_in->seek(0); 34 | QByteArray cbuf = file_in->read(256); 35 | if (QByteArray(cbuf,96).right(16).startsWith("ACTION REPLAY")) 36 | return true; 37 | else 38 | return false; 39 | } 40 | 41 | ImportResult ImportMemCardPlus(QByteArray *hugeram, QFile * file_in, int iClusterSize) 42 | { 43 | char cbuf[256]; 44 | char cbuf_prev[256]; 45 | SaveType tmpSave; 46 | int iLastUsedCluster=2; 47 | //searching every 256 bytes 48 | file_in->seek(0); 49 | file_in->read(cbuf_prev,256); 50 | int iFileSize = file_in->size(); 51 | while (iFileSize - file_in->pos() > 256) 52 | { 53 | //read next 256 bytes 54 | file_in->read(cbuf,40); 55 | //check if save 56 | if ( (cbuf_prev[255]==-1) && (cbuf_prev[254]==-1) && (cbuf[0]!=-1) && (cbuf[22]==0) && (cbuf[23]==0)) 57 | { 58 | //check passed, inserting 59 | //datel format is compression-key-based 60 | //key is a unique 16-bit value at offset 34 in save 61 | //it never appears in original save (datel searches this value from 0x0000 to 0xFFFF 62 | // most of the time it's 0x000X or 0x001X) 63 | //RLE sequences are 48-bit: 64 | //0xKKKK 0xXXXX 0xYYYY - write YYYY copies of XXXX, KKKK is key 65 | tmpSave.iBytes = (unsigned char)cbuf[31]+0x100*(unsigned char)cbuf[30]+0x10000*(unsigned char)cbuf[29]+0x1000000*(unsigned char)cbuf[28]; 66 | int iCompressionKey = (unsigned char)cbuf[35]+0x100*(unsigned char)cbuf[34]; 67 | int iCompressedBytes = (unsigned char)cbuf[39]+0x100*(unsigned char)cbuf[38]+0x10000*(unsigned char)cbuf[37]+0x1000000*(unsigned char)cbuf[36]; 68 | int iDecompressedSize = 0; 69 | //check if we have enough space at the end of file 70 | //making a brutal check for inserting size: 71 | //each ClusterSize-4 requires additional 6 bytes (2 for SAT, 4 for header) 72 | //plus 36 additional (34 header, 2 zero-sat-entry) 73 | //if that won't fit into remaining clusters, boil out 74 | int iClustersRequired = (tmpSave.iBytes)/(iClusterSize-4); 75 | int iBytesRequired = tmpSave.iBytes+iClustersRequired*6+36; 76 | iClustersRequired = iBytesRequired/(iClusterSize-4); 77 | if ((iFileSize/iClusterSize - iLastUsedCluster) <= iClustersRequired) 78 | { 79 | //no space left in image to decompress into 80 | QMessageBox msgBox; 81 | msgBox.setText(QObject::tr("Not enough space in image to insert ")+QString(tmpSave.Name)+QObject::tr(" and possibly some other saves. Please retry with a bigger image size.")); 82 | msgBox.exec(); 83 | return ImportOk; 84 | } 85 | tmpSave.iStartCluster = iLastUsedCluster+1; 86 | 87 | //check done, go on 88 | hugeram[0][tmpSave.iStartCluster*iClusterSize] = 0x80; 89 | hugeram[0][tmpSave.iStartCluster*iClusterSize+1] = 0x0; 90 | hugeram[0][tmpSave.iStartCluster*iClusterSize+2] = 0x0; 91 | hugeram[0][tmpSave.iStartCluster*iClusterSize+3] = 0x0;//making up counter 92 | hugeram->replace(tmpSave.iStartCluster*iClusterSize+4,11,QByteArray(&cbuf[0],11));//name 93 | hugeram[0][tmpSave.iStartCluster*iClusterSize+15] = cbuf[11];//lang code 94 | hugeram->replace(tmpSave.iStartCluster*iClusterSize+16,10,QByteArray(&cbuf[12],10));//comment 95 | hugeram->replace(tmpSave.iStartCluster*iClusterSize+26,4,QByteArray(&cbuf[24],4));//date 96 | hugeram->replace(tmpSave.iStartCluster*iClusterSize+30,4,QByteArray(&cbuf[28],4));//size 97 | //calculate sat 98 | int iSatSize = 1; 99 | tmpSave.Name = QByteArray(&cbuf[0],11); 100 | while ( (30 + iSatSize*2 + 2 + tmpSave.iBytes)/(iClusterSize-4) > iSatSize) 101 | iSatSize++; 102 | //fill new sat 103 | tmpSave.SAT.clear(); 104 | for (int i=0;iread(cbuf,2); 137 | ic+=2; 138 | if ((unsigned char)cbuf[1]+0x100*(unsigned char)cbuf[0] == iCompressionKey) 139 | { 140 | //it's an RLE sequence! 141 | file_in->read(cbuf,4); 142 | ic+=4; 143 | for (int j=0;j<((unsigned char)cbuf[3]+0x100*(unsigned char)cbuf[2]);j++) 144 | { 145 | hugeram[0][iPointer] = cbuf[0]; 146 | iPointer++; 147 | hugeram[0][iPointer] = cbuf[1]; 148 | iPointer++; 149 | iDecompressedSize+=2; 150 | //if we catch cluster boundary while executing RLE sequence, insert sys header 151 | if (iPointer % iClusterSize == 0) 152 | { 153 | hugeram[0][iPointer] = 0; 154 | hugeram[0][iPointer+1] = 0; 155 | hugeram[0][iPointer+2] = 0; 156 | hugeram[0][iPointer+3] = 0;//make up counter 157 | iPointer+=4; 158 | } 159 | } 160 | } 161 | else 162 | { 163 | hugeram[0][iPointer] = cbuf[0]; 164 | iPointer++; 165 | hugeram[0][iPointer] = cbuf[1]; //this might be wrong for odd-sized saves, but cluster end is unused anyway, so who cares? 166 | iPointer++; 167 | iDecompressedSize+=2; 168 | } 169 | } 170 | if (iDecompressedSize != tmpSave.iBytes) 171 | { 172 | //decompression result is different 173 | QMessageBox msgBox; 174 | msgBox.setText(QObject::tr("Decompression error for ")+QString(tmpSave.Name)+QObject::tr(". Size should be %2, but decompressed into %3").arg(tmpSave.iBytes).arg(iDecompressedSize)); 175 | msgBox.exec(); 176 | } 177 | int iPos = file_in->pos() % 256; 178 | for (int i=0;iread(&cbuf_prev[iPos],256-iPos); 181 | iLastUsedCluster+=tmpSave.SAT.size(); 182 | } 183 | else 184 | { 185 | //not a save, just some 256 bytes of whatever 186 | //we readed already 40 bytes, 216 to go 187 | file_in->read(&cbuf[40],216); 188 | for (int i=0;i<256;i++) cbuf_prev[i] = cbuf[i]; 189 | } 190 | } 191 | return ImportOk; 192 | } 193 | 194 | ImportResult ImportEMS8Meg(QByteArray *hugeram, QFile * file_in, int iClusterSize) 195 | { 196 | //same as MemCardPlus. probably. 197 | return ImportMemCardPlus(hugeram,file_in,iClusterSize); 198 | } 199 | 200 | ImportResult ImportActionReplay(QByteArray *hugeram, QFile * file_in) 201 | { 202 | char cbuf[256]; 203 | //AR actually holds the full cart image in RLE-compressed format 204 | //so we need to import it as-is, and then convert to user-provided 205 | //cluster size and image size 206 | //ok, off we go 207 | //int iFileSize = file_in->size(); 208 | //parsing sequences 209 | int iHeadersEnd = 0x20000; 210 | file_in->seek(iHeadersEnd); 211 | //check if it's an uncompressed AR image 212 | file_in->read(cbuf,16);//get 16 bytes 213 | file_in->seek(iHeadersEnd);//return to start 214 | if (QByteArray(cbuf).startsWith("BackUpRam Format")) 215 | { 216 | //this is an uncompressed image, probably unpacked by Pseudo Saturn Kai, copy as-is 217 | QByteArray b = file_in->readAll(); 218 | hugeram->replace(0,b.size(),b); 219 | } 220 | else 221 | { 222 | //compressed AR image 223 | bool bHeaderFound; 224 | int iPackedSize=-1; 225 | int iUnpackedSize=-1; 226 | unsigned char cActionReplayKey; 227 | unsigned char cActionReplayKey2; 228 | bool bKey2Used = false; 229 | do 230 | { 231 | bHeaderFound = false; 232 | file_in->read(cbuf,5); 233 | if (QByteArray(cbuf).startsWith("RLE01")) 234 | { 235 | //RLE01 header, parsing 236 | bHeaderFound = true; 237 | file_in->read(cbuf,1); 238 | cActionReplayKey = (unsigned char)cbuf[0]; 239 | file_in->read(cbuf,4); 240 | iPackedSize = 0x1000000*(unsigned char)cbuf[0] + 0x10000*(unsigned char)cbuf[1] + 241 | 0x100*(unsigned char)cbuf[2] + (unsigned char)cbuf[3]; 242 | iHeadersEnd+=10;//size of RLE01 header 243 | } 244 | else if (QByteArray(cbuf).startsWith("DEF02")) 245 | { 246 | //DEF02 header, parsing 247 | bHeaderFound = true; 248 | file_in->read(cbuf,1); 249 | cActionReplayKey2 = (unsigned char)cbuf[0]; 250 | bKey2Used = true; 251 | file_in->read(cbuf,4); 252 | iUnpackedSize = 0x1000000*(unsigned char)cbuf[0] + 0x10000*(unsigned char)cbuf[1] + 253 | 0x100*(unsigned char)cbuf[2] + (unsigned char)cbuf[3]; 254 | iHeadersEnd+=10;//size of RLE01 header 255 | } 256 | }while (bHeaderFound); 257 | 258 | file_in->seek(iHeadersEnd); 259 | 260 | //now brutally unpacking it as a full image 261 | int iPointer = 0; 262 | while (file_in->pos() < (0x20000+iPackedSize)) 263 | { 264 | //AR format is compression-key-based 265 | //key is a 8-bit value stored at the card beginning 266 | //if it appears in uncompessed save, it is encoded as KK 00 267 | //RLE sequences are 24-bit: 268 | //0xKK 0xXX 0xYY - write XX copies of YY, KK is key 269 | file_in->read(cbuf,1); 270 | if ((unsigned char)cbuf[0] == cActionReplayKey) 271 | { 272 | //it's an RLE sequence! which one? 273 | file_in->read(&(cbuf[1]),1); 274 | if ((unsigned char)cbuf[1] == 0x00) 275 | { 276 | //it's a KK 00 sequence, inserting single KK character 277 | hugeram[0][iPointer] = cbuf[0];//inserting KK 278 | iPointer++; 279 | } 280 | else 281 | { 282 | //it's a KK XX YY sequence 283 | file_in->read(&(cbuf[2]),1); 284 | for (int j=0;j<((unsigned char)cbuf[1]);j++) 285 | { 286 | hugeram[0][iPointer] = cbuf[2]; 287 | iPointer++; 288 | } 289 | } 290 | } 291 | else if (bKey2Used && ((unsigned char)cbuf[0] == cActionReplayKey2)) 292 | { 293 | //it's a key2 RLE sequence 294 | file_in->read(&(cbuf[1]),1); 295 | if ((unsigned char)cbuf[1] == 0x00) 296 | { 297 | //it's a KK 00 sequence, inserting single KK character 298 | hugeram[0][iPointer] = cbuf[0];//inserting KK 299 | iPointer++; 300 | } 301 | else 302 | { 303 | //it's a KK XX YY DD sequence 304 | //DD is an unknown field. 305 | //DD could be a dummy data, redundacy data, checksum, or something else 306 | //but the fact is DD is not needed for decompression 307 | file_in->read(&(cbuf[2]),2); 308 | for (int j=0;j<((unsigned char)cbuf[1]);j++) 309 | { 310 | hugeram[0][iPointer] = cbuf[2]; 311 | iPointer++; 312 | } 313 | } 314 | } 315 | else 316 | { 317 | //it's not an RLE sequence, just a databyte 318 | hugeram[0][iPointer] = cbuf[0];//inserting databyte 319 | iPointer++; 320 | } 321 | } 322 | } 323 | 324 | //add header 325 | for (int i=0;i<4;i++) 326 | hugeram->replace(16*i,16,QByteArray("BackUpRam Format")); 327 | 328 | return ImportOk; 329 | 330 | } 331 | -------------------------------------------------------------------------------- /import.h: -------------------------------------------------------------------------------- 1 | #ifndef IMPORT_H 2 | #define IMPORT_H 3 | 4 | #include "mainwindow.h" 5 | 6 | enum ProbeResult {ProbeOk,ProbeFailed}; 7 | enum ImportResult {ImportOk,ImportFailed}; 8 | 9 | bool ProbeMemCardPlus(QFile * file_in); 10 | bool ProbeEMS8Meg(QFile * file_in); 11 | bool ProbeActionReplay(QFile * file_in); 12 | 13 | ImportResult ImportMemCardPlus(QByteArray *hugeram, QFile * file_in, int iClusterSize); 14 | ImportResult ImportEMS8Meg(QByteArray *hugeram, QFile * file_in, int iClusterSize); 15 | ImportResult ImportActionReplay(QByteArray *hugeram, QFile * file_in); 16 | 17 | #endif // IMPORT_H 18 | 19 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | MainWindow w; 8 | w.show(); 9 | 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "setupwindow.h" 9 | #include "imagemapwindow.h" 10 | #include "config.h" 11 | 12 | enum FileIOMode {SH2_IO_MODE,RAW_IO_MODE}; 13 | enum FileIOClusterSize {CLUSTER_512,CLUSTER_256,CLUSTER_64,CLUSTER_CUSTOM}; 14 | enum SortDiretion {SORT_ASCENDING,SORT_DESCENDING,SORT_NONE}; 15 | 16 | typedef struct MyIOSettings{ 17 | FileIOMode IOMode; 18 | FileIOClusterSize IOClusterSize; 19 | int iIOCustomClusterSize; 20 | bool bIOModeChangeable; 21 | bool bClusterSizeChangeable; 22 | } FileIOSettingsType; 23 | 24 | typedef struct MyNewSettings{ 25 | FileIOClusterSize IOClusterSize; 26 | int iIOCustomClusterSize; 27 | int iImageSize; 28 | } NewSettingsType; 29 | 30 | namespace Ui { 31 | class MainWindow; 32 | } 33 | 34 | class MainWindow : public QMainWindow 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | explicit MainWindow(QWidget *parent = 0); 40 | ~MainWindow(); 41 | 42 | private slots: 43 | void Sort_Order_Changed(int logicalIndex); 44 | 45 | void Setup_Accepted(); 46 | 47 | void on_SetupButton_clicked(); 48 | 49 | void on_RepackButton_clicked(); 50 | 51 | void RepackImage(int iOldClusterSize, int iNewClusterSize); 52 | 53 | void on_InsertButton_clicked(); 54 | 55 | void on_ExtractButton_clicked(); 56 | 57 | void on_DeleteButton_clicked(); 58 | 59 | void on_LoadButton_clicked(); 60 | 61 | void on_SaveButton_clicked(); 62 | 63 | void on_NewButton_clicked(); 64 | 65 | void on_ImageMapButton_clicked(); 66 | 67 | private: 68 | Ui::MainWindow *ui; 69 | SetupWindow *SetupWin; 70 | SetupWindow *SetupWinExtract; 71 | SetupWindow *SetupWinInsert; 72 | ImageMapWindow *ImageMapWin; 73 | Config *TheConfig; 74 | FileIOSettingsType IOSettings; 75 | NewSettingsType NewSettings; 76 | void ParseHugeRAM(); 77 | void InsertSaves(); 78 | void InsertBinarySave(QFile *file_in, bool bSingle); 79 | void InsertBUPSave(QFile *file_in, bool bSingle); 80 | void InsertXMLSave(QFile *file_in, bool bSingle); 81 | bool GlobalBinaryInsertChecks(); 82 | void ExtractSaves(int iStart,int iEnd); 83 | void ExtractBinarySave(QFile *file_in, SaveType Save, bool bSingle); 84 | void ExtractBUPSave(QFile *file_in, SaveType Save, bool bSingle); 85 | void ExtractXMLSave(QFile *file_in, SaveType Save, bool bSingle); 86 | bool GlobalBinaryExtractChecks(); 87 | }; 88 | 89 | #endif // MAINWINDOW_H 90 | -------------------------------------------------------------------------------- /mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 753 10 | 418 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | Sega Saturn RAM Backup parser 21 | 22 | 23 | 24 | 25 | 0 26 | 0 27 | 28 | 29 | 30 | 31 | 999999 32 | 999999 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | New 42 | 43 | 44 | 45 | 46 | 47 | 48 | Open 49 | 50 | 51 | 52 | 53 | 54 | 55 | Save 56 | 57 | 58 | 59 | 60 | 61 | 62 | Change cluster size 63 | 64 | 65 | 66 | 67 | 68 | 69 | Qt::Horizontal 70 | 71 | 72 | 73 | 40 74 | 20 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | Download 83 | 84 | 85 | 86 | 87 | 88 | 89 | Upload 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | Extract 101 | 102 | 103 | 104 | 105 | 106 | 107 | Insert 108 | 109 | 110 | 111 | 112 | 113 | 114 | Edit 115 | 116 | 117 | 118 | 119 | 120 | 121 | Delete 122 | 123 | 124 | 125 | 126 | 127 | 128 | View map 129 | 130 | 131 | 132 | 133 | 134 | 135 | Qt::Vertical 136 | 137 | 138 | 139 | 20 140 | 40 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | Setup 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | Usage: 163 | 164 | 165 | 166 | 167 | 168 | 169 | 24 170 | 171 | 172 | 173 | 174 | 175 | 176 | Qt::Horizontal 177 | 178 | 179 | 180 | 40 181 | 20 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | Image size: 190 | 191 | 192 | 193 | 194 | 195 | 196 | 0 197 | 198 | 199 | 200 | 201 | 202 | 203 | Qt::Horizontal 204 | 205 | 206 | 207 | 40 208 | 20 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | Cluster size: 217 | 218 | 219 | 220 | 221 | 222 | 223 | 0 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | Current file : None 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | -------------------------------------------------------------------------------- /map.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\GIT\ss_save_parser\map_xpm[] = { 3 | "73 23 20 1", 4 | " c #000000", 5 | ". c #FFFFFF", 6 | "+ c #F7AD00", 7 | "@ c #F7B500", 8 | "# c #00E444", 9 | "$ c #C2AF00", 10 | "% c #007C38", 11 | "& c #007C3C", 12 | "* c #007B40", 13 | "= c #FE2200", 14 | "- c #FA6800", 15 | "; c #77BC00", 16 | "> c #00AD68", 17 | ", c #2C8500", 18 | "' c #288500", 19 | ") c #612A00", 20 | "! c #F89D00", 21 | "~ c #E3F300", 22 | "{ c #47EB00", 23 | "] c #0088D7", 24 | " ", 25 | " ... ... ... ... +++ +++ ... @@@ @@@ @@@ @@@ @@@ @@@ ... ... ... ### ### ", 26 | " ... ... ... ... +++ +++ ... @@@ @@@ @@@ @@@ @@@ @@@ ... ... ... ### ### ", 27 | " ... ... ... ... +++ +++ ... @@@ @@@ @@@ @@@ @@@ @@@ ... ... ... ### ### ", 28 | " ", 29 | " $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ ", 30 | " $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ ", 31 | " $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ $$$ ", 32 | " ", 33 | " %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% ... &&& &&& ", 34 | " %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% ... &&& &&& ", 35 | " %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% ... &&& &&& ", 36 | " ", 37 | " *** *** *** *** *** *** *** *** *** *** *** ... === ... --- --- --- ... ", 38 | " *** *** *** *** *** *** *** *** *** *** *** ... === ... --- --- --- ... ", 39 | " *** *** *** *** *** *** *** *** *** *** *** ... === ... --- --- --- ... ", 40 | " ", 41 | " ... ... ;;; ... ... ... >>> ... ... ... ... ... ... ... ,,, ... ''' ''' ", 42 | " ... ... ;;; ... ... ... >>> ... ... ... ... ... ... ... ,,, ... ''' ''' ", 43 | " ... ... ;;; ... ... ... >>> ... ... ... ... ... ... ... ,,, ... ''' ''' ", 44 | " ", 45 | " ))) ))) ... !!! !!! !!! !!! !!! ... ~~~ ~~~ ~~~ ... {{{ ... ... ... ]]] ", 46 | " ))) ))) ... !!! !!! !!! !!! !!! ... ~~~ ~~~ ~~~ ... {{{ ... ... ... ]]] "}; 47 | -------------------------------------------------------------------------------- /masqurin_highwizard.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\Parser_Qt\SS_Backup_RAM_Parser\masqurin_highwizard_xpm[] = { 3 | "64 64 248 2", 4 | " c None", 5 | ". c #ECC59B", 6 | "+ c #FFCE7F", 7 | "@ c #FFEA9F", 8 | "# c #FFFFC6", 9 | "$ c #FFFFDE", 10 | "% c #FFFFD6", 11 | "& c #FFFFB5", 12 | "* c #FFCF9D", 13 | "= c #D1AA56", 14 | "- c #B77452", 15 | "; c #84523D", 16 | "> c #92462D", 17 | ", c #77372C", 18 | "' c #774231", 19 | ") c #90563D", 20 | "! c #BB8F61", 21 | "~ c #D0C271", 22 | "{ c #696060", 23 | "] c #151C33", 24 | "^ c #313352", 25 | "/ c #424252", 26 | "( c #716979", 27 | "_ c #FFF3A9", 28 | ": c #FFFFAD", 29 | "< c #A0947D", 30 | "[ c #FFFFCE", 31 | "} c #FFFFEF", 32 | "| c #FFFFBD", 33 | "1 c #FFE18F", 34 | "2 c #EFAA6F", 35 | "3 c #D67B4A", 36 | "4 c #AD5A3D", 37 | "5 c #7E4939", 38 | "6 c #6E5239", 39 | "7 c #6F5047", 40 | "8 c #937547", 41 | "9 c #8D7157", 42 | "0 c #4E4B5D", 43 | "a c #543F26", 44 | "b c #925E30", 45 | "c c #D19045", 46 | "d c #E79046", 47 | "e c #AF633F", 48 | "f c #8C4239", 49 | "g c #6E4139", 50 | "h c #A46B3D", 51 | "i c #BF7A4A", 52 | "j c #523929", 53 | "k c #2F2925", 54 | "l c #1C2950", 55 | "m c #353D5A", 56 | "n c #F7F7BD", 57 | "o c #EECCB2", 58 | "p c #192041", 59 | "q c #39465E", 60 | "r c #FFEC8C", 61 | "s c #FFDA84", 62 | "t c #FFC56C", 63 | "u c #FFAD5A", 64 | "v c #F5A953", 65 | "w c #F89550", 66 | "x c #F78C41", 67 | "y c #FF9C4A", 68 | "z c #FFA552", 69 | "A c #EB984A", 70 | "B c #976140", 71 | "C c #94483B", 72 | "D c #E17E47", 73 | "E c #88332F", 74 | "F c #CA7652", 75 | "G c #8C462D", 76 | "H c #403A2A", 77 | "I c #9E999E", 78 | "J c #E4E39B", 79 | "K c #42314A", 80 | "L c #252030", 81 | "M c #4A3B3F", 82 | "N c #917C75", 83 | "O c #CDA176", 84 | "P c #A48B58", 85 | "Q c #FFAE68", 86 | "R c #EF9C4A", 87 | "S c #EB8442", 88 | "T c #E27742", 89 | "U c #BB5E39", 90 | "V c #C95B35", 91 | "W c #C9693B", 92 | "X c #FFB96A", 93 | "Y c #733529", 94 | "Z c #673B2D", 95 | "` c #B97A3C", 96 | " . c #FFAD52", 97 | ".. c #FFF99C", 98 | "+. c #FFFBA9", 99 | "@. c #FFE7B9", 100 | "#. c #C4AAA8", 101 | "$. c #EA8258", 102 | "%. c #E76B42", 103 | "&. c #F47F45", 104 | "*. c #EF8C46", 105 | "=. c #A0563D", 106 | "-. c #E7925A", 107 | ";. c #94502D", 108 | ">. c #D76B3B", 109 | ",. c #5A3931", 110 | "'. c #EC7836", 111 | "). c #A37F44", 112 | "!. c #D6C9CE", 113 | "~. c #F49957", 114 | "{. c #BD6740", 115 | "]. c #C1684A", 116 | "^. c #A76043", 117 | "/. c #AE4E31", 118 | "(. c #FFC57B", 119 | "_. c #9F352A", 120 | ":. c #2E332A", 121 | "<. c #393139", 122 | "[. c #23251E", 123 | "}. c #2D273E", 124 | "|. c #FFFFE7", 125 | "1. c #CBC0B3", 126 | "2. c #FB9045", 127 | "3. c #9F4C39", 128 | "4. c #7D5431", 129 | "5. c #664A2F", 130 | "6. c #856E43", 131 | "7. c #FFDEB5", 132 | "8. c #D58F62", 133 | "9. c #7B4229", 134 | "0. c #844A29", 135 | "a. c #FFFFFF", 136 | "b. c #FFF7EF", 137 | "c. c #40251F", 138 | "d. c #5F271E", 139 | "e. c #C65035", 140 | "f. c #633929", 141 | "g. c #D76331", 142 | "h. c #DF7335", 143 | "i. c #F17342", 144 | "j. c #FFF1B7", 145 | "k. c #CDBF97", 146 | "l. c #5E4231", 147 | "m. c #D47D3C", 148 | "n. c #FFFFF7", 149 | "o. c #FFF98C", 150 | "p. c #5C3525", 151 | "q. c #844231", 152 | "r. c #DA6E46", 153 | "s. c #291012", 154 | "t. c #4A3427", 155 | "u. c #391010", 156 | "v. c #706345", 157 | "w. c #322211", 158 | "x. c #3E3425", 159 | "y. c #623923", 160 | "z. c #C9773C", 161 | "A. c #844A21", 162 | "B. c #F3E06B", 163 | "C. c #AF5F2C", 164 | "D. c #FFF7E7", 165 | "E. c #41272B", 166 | "F. c #A56856", 167 | "G. c #CAA590", 168 | "H. c #EFA78F", 169 | "I. c #E6CE6C", 170 | "J. c #9C4629", 171 | "K. c #E27857", 172 | "L. c #FFE7DE", 173 | "M. c #FFDECE", 174 | "N. c #FFCEC6", 175 | "O. c #F8A89F", 176 | "P. c #E88C6F", 177 | "Q. c #F5946C", 178 | "R. c #FFD6C6", 179 | "S. c #FFE7CE", 180 | "T. c #FFE7D6", 181 | "U. c #FFC8B7", 182 | "V. c #FFB9B5", 183 | "W. c #FFB9A9", 184 | "X. c #CA7965", 185 | "Y. c #F4DED0", 186 | "Z. c #FFDEC6", 187 | "`. c #FFEFDE", 188 | " + c #FFD6CE", 189 | ".+ c #F99C41", 190 | "++ c #FFD6BD", 191 | "@+ c #FFD2B9", 192 | "#+ c #FFDEBD", 193 | "$+ c #FFE7C6", 194 | "%+ c #4E2722", 195 | "&+ c #FFBD97", 196 | "*+ c #393142", 197 | "=+ c #B14C39", 198 | "-+ c #F1CECB", 199 | ";+ c #C77658", 200 | ">+ c #342320", 201 | ",+ c #A7452C", 202 | "'+ c #57403D", 203 | ")+ c #F7F3DE", 204 | "!+ c #FFF7DA", 205 | "~+ c #4B2715", 206 | "{+ c #733A1F", 207 | "]+ c #503B50", 208 | "^+ c #8C3D20", 209 | "/+ c #181C20", 210 | "(+ c #181810", 211 | "_+ c #080808", 212 | ":+ c #424239", 213 | "<+ c #464A2E", 214 | "[+ c #39394A", 215 | "}+ c #FBDADE", 216 | "|+ c #853C20", 217 | "1+ c #DBDED6", 218 | "2+ c #645B31", 219 | "3+ c #08140C", 220 | "4+ c #001010", 221 | "5+ c #000810", 222 | "6+ c #39424A", 223 | "7+ c #422D39", 224 | "8+ c #42394A", 225 | "9+ c #394239", 226 | "0+ c #FFEFCE", 227 | "a+ c #121008", 228 | "b+ c #313146", 229 | "c+ c #2B3B50", 230 | "d+ c #E46037", 231 | "e+ c #FFF4CE", 232 | "f+ c #332952", 233 | "g+ c #1E121E", 234 | "h+ c #DF5533", 235 | "i+ c #FFDEDA", 236 | "j+ c #3F373F", 237 | "k+ c #42424A", 238 | "l+ c #04081C", 239 | "m+ c #FFED6E", 240 | "n+ c #101220", 241 | "o+ c #120A1B", 242 | "p+ c #423152", 243 | "q+ c #39425A", 244 | "r+ c #080018", 245 | "s+ c #C93F2B", 246 | "t+ c #DC472B", 247 | "u+ c #37273C", 248 | "v+ c #393973", 249 | "w+ c #203C5F", 250 | "x+ c #FFD6DE", 251 | "y+ c #292F52", 252 | " ", 253 | " . + @ # $ % % $ # & # * = - ; > , ' ) ! ~ . & & { ] ] ^ ^ / ( _ : & & & < ", 254 | " # [ # $ $ [ [ [ % } } } | | 1 2 3 4 5 6 7 8 9 0 a b c d 3 e f g 5 h i i j k l m 9 n | | o { p ] q ", 255 | " & : _ r r s + + t u v w x y z A B C b ; e D v ! 8 E e u u u w F G 5 4 A s v b H I | # J K p L M ; N O P { ", 256 | " + Q R y w S S x D T D S S T U 4 - = Q v V W v s X h Y 5 D R w y d 4 Z Y = & t d < I { # # N L g ` .X r ..+.[ $ @.#.( ", 257 | " x x D $.%.D d &.y w *.D =.' 5 ) e X X + u $.e x A -.h ;.i d S >.A Q d E ,.= r Q '.N n & < 0 ` i B 8 6 6 6 ).).= . | % !.( ", 258 | " T *.w w y ~.w D {.` C ' g ; ].^.f i 2 X t z /.e (.+ @ * X w X _ * 1 s (._.' + (.` O | t 6 :.<.[.l }. P +.|.1. ", 259 | " y 2.D T F {.4 f ' Z Z g B *.&.3.4 U B = ~.i (.n % & | @ ~.1 # @ 4.5.6. .2.' 4.u P 7.= b h c c 8. 0 q < $ ", 260 | " e 4 f 5 ' ' 9.' C g 0.3.i X T C 4 %.C ;.i s $ a.# ..& ..(.b.|.8 c.j d.c z e.5 ).. ).S d ~.z ~.z t i { ", 261 | " Y f.5 ' ; 3.C =.f.f 3 g.].s h.=.4 i./.).j.a.a.$ ..% } s # } k.d.l.5.g =.u w =.b ). .d ; ) d v d w 1 (. q ", 262 | " 5 C C 3.e W W 3.C m.w W {.(.>.=.4 V i r n.|.r o.$ a.: S |.# 4., 5 a 5.p.A ~.q.{.z ^.f.Z ,.Z i X 1 h.1 _ ` ", 263 | " e ].V m.i.'.W ' ;.v y r.{.(.>.3.3.c _ [ |.s u n.a.: ` . n.~ s.5.5 Z l.l.3 ~.=.z b Z l.l.5.l.,.c 1 * 2 +._ 2 ", 264 | " g.T T i.$.U 9.t.; u u >.{.t >.3.B @ | # (.2.# a.# ` u.+.# v.t.,.4.5 Z g B D z ^.Z ' g f.5.q.g Z v : _ ..| : 2 ", 265 | " D &.*.2.U Z a G =.~.u 3 {.(.V 4.X +.: X x 1 } $ X w.H | J c.' x.:.f.a Z f.c 3 ' f.,.y.5 5 5 a H z.+.| +.: $ | ~. ", 266 | " D *.w ^.5.t.B h.> z.X D W u /.).& @ + S Q # } @ A.L 9.| . p.{.) g 6 x.t.l.d ' t.t.j H t.a j Z H B B.| # ..} % +.8. ", 267 | " S D C.C ) ' W &.q.3.z ~.>.W B u s Q h.x 1 D.# = E.B F.+ . G.H.$.3 r.^.g 5 ; 5.) - - ; ^.5 E.l.5 5 *.: a.# $ a.& & I. ", 268 | " S 5 e 2.4 B x D J.;.i z F b i t u h.m.~.| |.1 b 9 K.{.I.. L.M.N.O.H.K.K.F ^.- F K.r.K.P.$.- l.l.g m.r } $ [ a.& ..@ N ", 269 | " ' 4 &.d Z e *.%.U C =.w 4 B X u m.r.*.(.[ # (.Z $.Q.- c (.R.M.S.T.U.V.P.3 F Q.O.O.W.P.].K.P.X.5 :.^. .$ a.: # +.+.k.| N ", 270 | " =.x w =.x.=.T S %./.=.W {.d z d e.D z (.| : 2 ) P.H.X.z.2 Y.Z.Z.S.`.T.N.V.W. +S.T.D. +P.F F P.Q.g 6 .+% a.: : & +.).k.[ 6 ", 271 | " w y ` f.t.;.h.D T >./.C h w y r.W 2.X s _ & ! r.H.W.H.U c N.M.++N.++ +S.T.M.M.R.Z.@+`.W.X.3 F $.8.,.m.& } ......& 3 6 n @ }. ", 272 | " *.r., H 5 3.].T T h.U > 3 z r.V D A (.+ @ J B K.W.U.P.z.3 @+M.R.++#+Z.Z.Z.$+N.++Z.R.S.T.P.].K.X.$.7 C.& |._ : & # Q s.N [ P ", 273 | " T f.t.%+h S C T T '.U 4 A y U 4 S w + + @ 1 4 H.a.|.O.! g.&+T.S.S.S.R.M.S.R.T.Z.R.++R.T.H.F K.K.P.B C.j.} 1 ..& | -.5.*+o & ", 274 | " ; x.,.t.e S f W S T U 3.*.d =+z.D S s * 1 @ f ! 1.-+o O.g.D $+S.@+@+R.@+@+M.@+Z.++R.7.M.&+X.F ;+$.F.=.r % (.r & [ -.e L ( n ", 275 | " k j a Y W A C ^.S &.U 4 *.F h 3 *.S (.+ 1 ~ M j Z 4.! P 3.B D.} T.Z.M.S. +$+M.M.M.R.M.T.V.F K.X.$.F.9.@ % w X & [ 2 m.j p k. ", 276 | " >+l.t.5 D &.=.) >.&.{.3.R =.,+d *.$.+ s * < K.F ^.f 3.,+j '+P H.)+T.Z.R.#+N.#+R.U.S.T.} T.H.3 8.$.;+;.+ : *.u +.& ! d 4.p < ", 277 | " a l.x.' r.*.3 3.4 i.>.^.c G G ~.S D (.+ + P 3 - - F.F.B 5 5.Y y.< $ R.@+M.@+Z.++!+`.#.O N {.3.G ' - ].+ _ *.u @ n 9 i h p N ", 278 | " C p.x.q.T w S e ; T >.e 3 p.4.u w D Q (.t ! B ) ) =.) ; F.p.F.g ~+. `. +Z.M.Z.T.o v.{+{+Y 5 6 5 '+'+B X s d ~.t j.'+` ` p { ", 279 | " V 9.k Z m.w &.U G {.T 4 B t.9.v *.D Q + 2 { ) ; '+6 l.B 7 ; B 8.G ! Y.#+N.++Z.S.#.f.3.) 0.; ; 6 e ; 6.X + S *.+ J ]+` i ", 280 | " ,+^+w.t.3.2.w T C C.T 4 ; a 5 z -.S ~.t ~ w./+[.(+(+_+(+H F.7 - K.O.M.M.#+R.Z.T.U.X.B ) F.- - - 9 F.=.Q (.T *.X < <.- z. ", 281 | " 9 ; f.p.J.W '.'.e ; z.{.; j G ~.-.D ~.X -.0 :+>+k <+I <.L [.:+' K.++`.S.Z.Z.M.R.P.- 5 F.B ; 7 ) ;+7 i u Q D *.u 8 [+- h ", 282 | " }+T.M.Y.I < - F {.|+U =.9.j 5 d *.*.-.R X 1+>+x.w.:.a.a.2+0 _+'+. R.Z.@+R.++Z.Z.K.4 7 x.L 3+3+4+g g ].v -.D A R '+l i ) ", 283 | " R.G.#.7.`.} } }+I v.=.e 5 l.G F ~.*.D w Q 1.[.B 8 5+n.n.( n.#.{ I S.S.Z.R.S.R.T. +G.>+L [.I v.0 6+'+c z T D ~.c 7+l - B ", 284 | " G.Y.G.X.P 9 o S.b.D.< 3.9., C b -.-.T D u < H 4.F.%+G.v.1.n.a.`.N R.Z.R.#+R.#+R.} #.3+:+(+a.#.|.1+6.D w >.*.u e 8+l - 5. ", 285 | " |+k.a.W.X.]./.b < +Z.K.l.{ U 9.8.d D r.*.v 7 x.6 ` h 9+I } a.0+U.@+R.Z.M.#+R.#+D.I w.6.a+I !.a.1+3 2.].D z .' b+c+B 6 ", 286 | " ^+G.|.b.N.F.W r.h N - F.( d+0.B R *.r.r.u G.'+k '+b 7 I a.} Z.T.S.Z.T.R.R.Z.R.|.#.>+8.M {+e+a.P m.{.z.w u ` f+q ^ g '+ ", 287 | " G I |.|.L.9 =.r.F ^.'+6.i.=+9.].*.D V ~.h :+N M.#.I o $+R.U.R.7.R.U.M.$+ +7.T.G.[.h i 4.N N d+4 q.-.z x g+] L }.k ", 288 | " A.o n.`.F.5 3 P.^.4.%.>.5 ) D z F W A +n.n.n.} M.M.Z.M.$+T.Z.T.S.o R.M.S.b.#.< '+{ 9.V r., 3 .+d 9 { ( { ( :. ", 289 | " k.n.V.].; ^.F.e d+d+>., F '.T $.r.* b.} } !+T.Z. +#+R.Z. +W.O.6.. Z.N.@+T.Z.!.H.D >.g e y R #.}+|.|.D.1. ", 290 | " ! D.P.K.F ; ) g.>.T 5 ;+4 S H.}+&+H.0+|.D.S.M.$+R.Z.R.* O.P.;+7 o )+S.#+T.T.H.W q.; w z.v.I G.@+T.< ", 291 | " 0.G.-.P.$.^.h+>.S q.^.- 4 m.@+D.!+@+`.D.M.0+M.Z.T.W.W.P.P.$.f.. L.R.N.T.W.! O ) W h.< ( ) ! #.( ", 292 | " , q.F.- ) >.d+D e.^.;+^.C.8.S.|.T.0+S.$+N.R.R.Z.++@+O.H.P.G.-+Z.Z.Z.M.$.8.V.Q.].; o U.#+1.t. ", 293 | " H 9.Z 5 >.h+A d ; ;+K.F C.;+#+S.S.S.M.S.M.Z.R.Z.M.T.L.`.i+R.R.Z.`.Q.W.W.i C.( G.{.X.7 L ", 294 | " x.7+y.' W h+-.X q.- K.8.H.O P.U.S.M.S.@+++R.Z.T.S.S.T.$+Z.Z.++Z.U.R.W.! X.{ 9 { ", 295 | " K A.' e >.T t A ; K.$.P.W.W.&+ +++++R.M.#+ +o o o -+@+S.Z.i+Z.M.S. +i+-+! ;. ", 296 | " j+q.' q.%.h.t (.0.F.K.8.H.M.T.M.S.M.T.Z.T.0+0 k+0 v.#.++M.#+R.@+N.$+b.< d ` ", 297 | " *+q.f.G U d+*.+ v ' F K.P.U.S.R.Z.++#+N.++R.#+M.@.T.Z.R.@+M.#+Z.S.} I > y ` ", 298 | " b+c.q.v.).d+h.1 1 B 9 K.8.H.M.Z.R.++ +S.M.T.H.K.P.&+}+$+M.++ +0+} N <.=+y c ", 299 | " K c I.B.= U V u | ~ 5 ].$.P.U.`.Z.R.$+M.++T.W.O.@+ +@+R.@+Z.0+T.N l+) d+w v ]+ ", 300 | " ).m+m+~ 2+6.>.*.@ & 9 c.^.-.H.&+M.Z.@+R.Z.@+M.Z.M.Z.R.Z.T.|.Y.E.L C h+-.s l. ", 301 | " ;.o.o.).2+<+<+>.g.* % ~ >+>+5 8.Q.U.!+`.$+M.Z.#+M.Z.R.0+`.$ N L }. ^.d+v s v. ", 302 | " h $ % 2+H H 2+` g.z : !+- 3+:.a - O O.S.S.M.Z.M.@+R.!+|.o 0 L 4 h+2 _ ). ", 303 | " o.} 6.H 9+H B >.d j.$ 7.) c.[.[.6 F.O o )+`.D.$ D.`.{ ] <. - h+X _ ~ ", 304 | " = |.B.(+k x.<+r.S _ % @ - - B t./+w.l.{+8 < 1.. G.n+o+p+m q+ B d+t [ @. ", 305 | " 6.B.# P 3+:.<+3 '.* % | O F $.;+; x.k [.[.c.w.a+r+~ I.2+ ^.h.X % } N ", 306 | " s+6.B.m+I.l+[.8 h.j.a.|.O.F K.K.P.$.; Z x.[.a G.( 8 m+m+= B i.X # a.. ", 307 | " h+c.v.I.m+B.P 6.V @ a.% * _.J.,+V r.$.$.X.e ! |.< x.<+P m+B.{ =.&.t # |.|.( ", 308 | " h+, %+a ).m+m+P V @.a.$ & ,+_.3.,+_.e.h+t+h+h+s+t+6 <+H 6.m+$ I ; w ._ [ a.k. ", 309 | " l u+e.3.Y t.%+v.B.v t+@ a.| & =+,+3.C /.e.e.e.e.h+e.h+q.<+<+<+v.B.a.N '+d w t $ } )+'+ ", 310 | " u+2+h+f G C y.y.' m.g.@.n.# | F._._.=+=+=+=+t+h+V h+h+,.<+v.2+x.6.|.|.P :.! S (.% [ } N ", 311 | " }.P ..s+E f q.t.f E >.t+n a.: | I.).e._.s+e.=+e.e.h+e.h+,.9+<+v.<+a k.a.J H - A u % @.j.#. ", 312 | " L P |.;+E G E P 4.E W >._ a.: | I.I.I.~ r.s+s+s+s+e.s+t+j 9+<+2+2+H ~ a.J x.7 y u % U.&+1+{ ", 313 | " [.v+^ h J m+q.,.E m+' q.V d+% a.| @ 6.).B.m+: O X.V.V.H.H.O.k :.<+2+<+x.k.n.~ H ^ i .# &+-.!+{ ", 314 | " u+( I I p+6.m+).d.E s 5.f >.T # } : _ ' %+j c o.a.@ O + + +V.8.a :.:+l.8 $ |.h ,.w+) X | * 8.% I ", 315 | " }.<. I #.I !.( w+9 B.8 u.1 ,., =+u e+} # . _.4 g >+8 ..a.~ = x+`.W.P.P.H /+).o.[ = _.7+y+; .+r &+z.e+#. "}; 316 | -------------------------------------------------------------------------------- /new.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\__repo\ss_save_parser\new_xpm[] = { 3 | "47 64 95 2", 4 | " c None", 5 | ". c #0F0F0F", 6 | "+ c #2D2D2D", 7 | "@ c #363636", 8 | "# c #323232", 9 | "$ c #313131", 10 | "% c #303030", 11 | "& c #2F2F2F", 12 | "* c #2E2E2E", 13 | "= c #2C2C2C", 14 | "- c #2B2B2B", 15 | "; c #2A2A2A", 16 | "> c #282828", 17 | ", c #272727", 18 | "' c #262626", 19 | ") c #252525", 20 | "! c #242424", 21 | "~ c #232323", 22 | "{ c #1A1A1A", 23 | "] c #0E0E0E", 24 | "^ c #6E6E6E", 25 | "/ c #636363", 26 | "( c #4B4B4B", 27 | "_ c #464646", 28 | ": c #454545", 29 | "< c #444444", 30 | "[ c #434343", 31 | "} c #424242", 32 | "| c #404040", 33 | "1 c #3F3F3F", 34 | "2 c #3E3E3E", 35 | "3 c #3C3C3C", 36 | "4 c #3A3A3A", 37 | "5 c #383838", 38 | "6 c #343434", 39 | "7 c #101010", 40 | "8 c #646464", 41 | "9 c #131313", 42 | "0 c #333333", 43 | "a c #353535", 44 | "b c #575757", 45 | "c c #FFFFFF", 46 | "d c #1E1E1E", 47 | "e c #292929", 48 | "f c #222222", 49 | "g c #545454", 50 | "h c #171717", 51 | "i c #1F1F1F", 52 | "j c #151515", 53 | "k c #0D0D0D", 54 | "l c #1C1C1C", 55 | "m c #0C0C0C", 56 | "n c #555555", 57 | "o c #141414", 58 | "p c #191919", 59 | "q c #161616", 60 | "r c #0A0A0A", 61 | "s c #121212", 62 | "t c #0B0B0B", 63 | "u c #080808", 64 | "v c #202020", 65 | "w c #111111", 66 | "x c #090909", 67 | "y c #070707", 68 | "z c #535353", 69 | "A c #1D1D1D", 70 | "B c #060606", 71 | "C c #525252", 72 | "D c #1B1B1B", 73 | "E c #515151", 74 | "F c #010101", 75 | "G c #4F4F4F", 76 | "H c #181818", 77 | "I c #000000", 78 | "J c #212121", 79 | "K c #4E4E4E", 80 | "L c #4A4A4A", 81 | "M c #020202", 82 | "N c #484848", 83 | "O c #393939", 84 | "P c #373737", 85 | "Q c #A5A5A5", 86 | "R c #F2F2F2", 87 | "S c #939393", 88 | "T c #B6B6B6", 89 | "U c #CECECE", 90 | "V c #9E9E9E", 91 | "W c #666666", 92 | "X c #DADADA", 93 | "Y c #9C9C9C", 94 | "Z c #D4E3FF", 95 | "` c #C2C2C2", 96 | " . c #E6E6E6", 97 | ".. c #050505", 98 | "+. c #AAAAAA", 99 | ". + @ # # # # # # # # # $ % & * * + = - ; > , ' ) ! ~ ~ ! { ] ", 100 | "~ ^ / ( _ _ _ _ _ _ : < < [ } | 1 2 3 3 4 5 @ 6 # $ $ 4 1 2 ; 7 ", 101 | ") 8 , 9 0 5 a ' . ", 102 | "~ b . c c c c c c c c c c c c c c c c c c c c c c c c + ; d e f ] ", 103 | "~ g . c c c c c c c c c c c c c c c c c c c c c c c c ; h . ~ i ] ", 104 | "~ g ] c c c c c c c c c c c c c c c c c c c c c c c c > j k d l m ", 105 | "~ n ] c c c c c c c c c c c c c c c c c c c c c c c c ' o c k p p m ", 106 | "~ n ] c c c c c c c c c c c c c c c c c c c c c c c c ! 9 c c m h q r ", 107 | "~ n ] c c c c c c c c c c c c c c c c c c c c c c c c f s c c c t o 9 u ", 108 | "~ n ] c c c c c c c c c c c c c c c c c c c c c c c c v w c c c c r 9 s u ", 109 | "~ g ] c c c c c c c c c c c c c c c c c c c c c c c c i 7 c c c c c x o s y ", 110 | "~ z ] c c c c c c c c c c c c c c c c c c c c c c c c A . c c c c c c u o s B ", 111 | "~ C ] c c c c c c c c c c c c c c c c c c c c c c c c D ] c c c c c c c u o w B ", 112 | "f E k c c c c c c c c c c c c c c c c c c c c c c c c p ] c c c c c c c c u s x F ", 113 | "f G ] c c c c c c c c c c c c c c c c c c c c c c c c H k c c c c c c c c c I I I I ", 114 | "J K . c c c c c c c c c c c c c c c c c c c c c c c c q m c c c c c c c c c c I I I I ", 115 | "v ( ] c c c c c c c c c c c c c c c c c c c c c c c c j 7 I I I I ", 116 | "v L k c c c c c c c c c c c c c c c c c c c c c c c c 9 q . B M F I I I I I I I I I I I I I ", 117 | "v N k c c c c c c c c c c c c c c c c c c c c c c c c r m y M I I I I I I I I I I I I I I I ", 118 | "d : k c c c c c c c c c c c c c c c c c c c c c c c c I I I ", 119 | "A [ m c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 120 | "l | t c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 121 | "l 2 t c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 122 | "D 3 m c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 123 | "{ O t c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 124 | "p P t c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 125 | "p 6 r c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 126 | "H $ r c c c c c c c L L L L L L L L L L L L L L L L L L L L L L L L L L L Q c c c c c c I I ", 127 | "h * r c c c c c c L R R R R R R R R R R R R R R R R R R R R R R R R R R R ' S c c c c c I I ", 128 | "q = r c c c c c c L T U U U U U U U U U U U U U U U U U U U U U U U U U V ' W Q c c c c I I ", 129 | "j ; x c c c c c c L R R U U U U U U U U U U U U U U U U U U U U U X U R R ' g Y c c c c I I ", 130 | "o , x c c c c c c L T T R U Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z ` R T T ' g Y c c c c I I ", 131 | "o ) u c c c c c c L R R U U Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z ` X R R ' g Y c c c c I I ", 132 | "9 ~ u c c c c c c L T T R U R . . . . . . . . . . . . . . . . .R ` R T T ' g Y c c c c I I ", 133 | "s J u c c c c c c L R R U U R R R R R R R R R R R R R R R R R R R ` X R R ' g Y c c c c I I ", 134 | "w i y c c c c c c L T T R U R . . . . . . . . . . . . . . . . .R ` R T T ' g Y c c c c I I ", 135 | "7 A y c c c c c c L X ` U U R R R R R R R R R R R R R R R R R R R ` U U V ' g Y c c c c I I ", 136 | ". D y c c c c c c L X ` U U R . . . . . . . . . . . . . . . . .R ` U U V ' g Y c c c c I I ", 137 | "] p y c c c c c c L X ` U U R R R R R R R R R R R R R R R R R R R ` U U V ' g Y c c c c I I ", 138 | "] o M c c c c c c L X ` U U R . . . . . . . . . . . . . . . . .R ` U U V ' g Y c c c c I I ", 139 | "r ..I c c c c c c L X ` U U R R R R R R R R R R R R R R R R R R R ` U U V ' g Y c c c c I I ", 140 | "M I I c c c c c c L X ` U ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` U U V ' g Y c c c c I I ", 141 | "I I I c c c c c c L X ` U U U U U U U U U U U U U U U U U U U U U U U U V ' g Y c c c c I I ", 142 | "I I I c c c c c c L X ` U U U U U U U U U +.R +.R +.R U U U U U U U U U V ' g Y c c c c I I ", 143 | "I I I c c c c c c L X ` U U U U U U U U +.R +.R +.R U U U U U U U U U U V ' g Y c c c c I I ", 144 | "I I I c c c c c c L X ` U U U U U U U U U U U U U U U U U U U U U U U U V ' g Y c c c c I I ", 145 | "I I I c c c c c c L X ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` V ' g Y c c c c I I ", 146 | "I I I c c c c c c Q ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 5 W Q c c c c I I ", 147 | "I I I c c c c c c c S W g g g g g g g g g g g g g g g g g g g g g g g g g W S c c c c c I I ", 148 | "I I I c c c c c c c c Q Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Q c c c c c c I I ", 149 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 150 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 151 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 152 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 153 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 154 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 155 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 156 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 157 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 158 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 159 | "I I I c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c I I ", 160 | "I I I I I I ", 161 | "I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I ", 162 | "I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I "}; 163 | -------------------------------------------------------------------------------- /newdialog.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "newdialog.h" 3 | #include "ui_newdialog.h" 4 | 5 | NewDialog::NewDialog(NewSettingsType *settings,QWidget *parent) : 6 | QDialog(parent), 7 | ui(new Ui::NewDialog) 8 | { 9 | m_pSettings = settings; 10 | ui->setupUi(this); 11 | ui->ClusterSizeComboBox->addItem(QString("512")); 12 | ui->ClusterSizeComboBox->addItem(QString("256")); 13 | ui->ClusterSizeComboBox->addItem(QString("64")); 14 | ui->ClusterSizeComboBox->addItem(tr("Custom")); 15 | m_Settings = *m_pSettings; //get detected values 16 | if (CLUSTER_512 == m_Settings.IOClusterSize) 17 | { 18 | ui->ClusterSizeComboBox->setCurrentIndex(0); 19 | ui->ImageSizeSpinBox->setValue(512);//just a prediction 20 | } 21 | else if (CLUSTER_256 == m_Settings.IOClusterSize) 22 | { 23 | ui->ClusterSizeComboBox->setCurrentIndex(1); 24 | ui->ImageSizeSpinBox->setValue(512);//just a prediction 25 | } 26 | else if (CLUSTER_64 == m_Settings.IOClusterSize) 27 | { 28 | ui->ClusterSizeComboBox->setCurrentIndex(2); 29 | ui->ImageSizeSpinBox->setValue(32);//just a prediction 30 | } 31 | else if (CLUSTER_CUSTOM == m_Settings.IOClusterSize) 32 | { 33 | ui->ClusterSizeComboBox->setCurrentIndex(3);\ 34 | ui->ImageSizeSpinBox->setValue(512);//just a prediction 35 | } 36 | if (CLUSTER_CUSTOM == m_Settings.IOClusterSize) 37 | { 38 | ui->label_3->setDisabled(false); 39 | ui->CustomClusterSizeSpinBox->setDisabled(false); 40 | } 41 | else 42 | { 43 | ui->label_3->setDisabled(true); 44 | ui->CustomClusterSizeSpinBox->setDisabled(true); 45 | } 46 | this->setWindowTitle(this->windowTitle().append(" ").append(APP_VERSION)); 47 | } 48 | 49 | NewDialog::~NewDialog() 50 | { 51 | delete ui; 52 | } 53 | 54 | void NewDialog::on_ClusterSizeComboBox_currentIndexChanged(int index) 55 | { 56 | ui->label_3->setDisabled(true); 57 | ui->CustomClusterSizeSpinBox->setDisabled(true); 58 | switch (index) 59 | { 60 | case 0: 61 | m_Settings.IOClusterSize = CLUSTER_512; 62 | break; 63 | case 1: 64 | m_Settings.IOClusterSize = CLUSTER_256; 65 | break; 66 | case 2: 67 | m_Settings.IOClusterSize = CLUSTER_64; 68 | break; 69 | case 3: 70 | m_Settings.IOClusterSize = CLUSTER_CUSTOM; 71 | ui->label_3->setDisabled(false); 72 | ui->CustomClusterSizeSpinBox->setDisabled(false); 73 | break; 74 | } 75 | } 76 | 77 | void NewDialog::on_buttonBox_accepted() 78 | { 79 | m_Settings.iImageSize = ui->ImageSizeSpinBox->value(); 80 | m_Settings.iIOCustomClusterSize = ui->CustomClusterSizeSpinBox->value(); 81 | m_pSettings[0] = m_Settings; 82 | } 83 | 84 | void NewDialog::on_ImageSizeSpinBox_editingFinished() 85 | { 86 | if (ui->ImageSizeSpinBox->value() > 16384) 87 | { 88 | QMessageBox msgBox; 89 | msgBox.setText(tr("Image size is too big. Saturn's hard limit is 16MBytes (128MBit) ")); 90 | msgBox.exec(); 91 | ui->ImageSizeSpinBox->setValue(16384); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /newdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef NEWDIALOG_H 2 | #define NEWDIALOG_H 3 | 4 | #include 5 | #include "config.h" 6 | #include "mainwindow.h" 7 | 8 | namespace Ui { 9 | class NewDialog; 10 | } 11 | 12 | class NewDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit NewDialog(NewSettingsType *settings, QWidget *parent = 0); 18 | ~NewDialog(); 19 | 20 | private slots: 21 | void on_ClusterSizeComboBox_currentIndexChanged(int index); 22 | 23 | void on_buttonBox_accepted(); 24 | 25 | 26 | void on_ImageSizeSpinBox_editingFinished(); 27 | 28 | private: 29 | Ui::NewDialog *ui; 30 | NewSettingsType * m_pSettings; 31 | NewSettingsType m_Settings; 32 | }; 33 | 34 | #endif // NEWDIALOG_H 35 | -------------------------------------------------------------------------------- /newdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | NewDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 178 11 | 12 | 13 | 14 | Sega Saturn RAM Backup parser 15 | 16 | 17 | 18 | 19 | 40 20 | 130 21 | 341 22 | 32 23 | 24 | 25 | 26 | Qt::Horizontal 27 | 28 | 29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 30 | 31 | 32 | 33 | 34 | 35 | 29 36 | 9 37 | 351 38 | 101 39 | 40 | 41 | 42 | 43 | 44 | 45 | Cluster size 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Custom cluster size 56 | 57 | 58 | 59 | 60 | 61 | 62 | 1 63 | 64 | 65 | 8192 66 | 67 | 68 | 16 69 | 70 | 71 | 256 72 | 73 | 74 | 75 | 76 | 77 | 78 | Image size in KiB 79 | 80 | 81 | 82 | 83 | 84 | 85 | 1 86 | 87 | 88 | 99999999 89 | 90 | 91 | 512 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | buttonBox 102 | accepted() 103 | NewDialog 104 | accept() 105 | 106 | 107 | 248 108 | 254 109 | 110 | 111 | 157 112 | 274 113 | 114 | 115 | 116 | 117 | buttonBox 118 | rejected() 119 | NewDialog 120 | reject() 121 | 122 | 123 | 316 124 | 260 125 | 126 | 127 | 286 128 | 274 129 | 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /open.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\__repo\ss_save_parser\open_xpm[] = { 3 | "64 48 163 2", 4 | " c None", 5 | ". c #2A2A2A", 6 | "+ c #2C2C2C", 7 | "@ c #292929", 8 | "# c #24262A", 9 | "$ c #202329", 10 | "% c #2D2D2C", 11 | "& c #272727", 12 | "* c #D4A756", 13 | "= c #FEC561", 14 | "- c #FDC561", 15 | "; c #DCAD59", 16 | "> c #28292B", 17 | ", c #F1BC5E", 18 | "' c #F2BD5E", 19 | ") c #A0814A", 20 | "! c #2B2B2B", 21 | "~ c #F9C260", 22 | "{ c #564B37", 23 | "] c #282828", 24 | "^ c #E7B55C", 25 | "/ c #2A2B2C", 26 | "( c #AC894D", 27 | "_ c #26282A", 28 | ": c #F8C160", 29 | "< c #866F43", 30 | "[ c #22252A", 31 | "} c #F4BE5F", 32 | "| c #F0BC5E", 33 | "1 c #D8AA58", 34 | "2 c #D9AA58", 35 | "3 c #DAAB58", 36 | "4 c #A4844B", 37 | "5 c #27292B", 38 | "6 c #F5BF5F", 39 | "7 c #212429", 40 | "8 c #FCC461", 41 | "9 c #FFC762", 42 | "0 c #F7C060", 43 | "a c #997C48", 44 | "b c #2E2D2C", 45 | "c c #1F2329", 46 | "d c #262626", 47 | "e c #A7864B", 48 | "f c #26272A", 49 | "g c #1F2228", 50 | "h c #FBC360", 51 | "i c #38352F", 52 | "j c #27282B", 53 | "k c #B69451", 54 | "l c #FFD669", 55 | "m c #FFD569", 56 | "n c #B79552", 57 | "o c #C09851", 58 | "p c #26282B", 59 | "q c #3D3930", 60 | "r c #FFD368", 61 | "s c #FFCB65", 62 | "t c #1F2229", 63 | "u c #68583B", 64 | "v c #2B2B2C", 65 | "w c #9C804A", 66 | "x c #FFCC65", 67 | "y c #BD9954", 68 | "z c #ECB95D", 69 | "A c #F7C563", 70 | "B c #4A4A4A", 71 | "C c #A5A5A5", 72 | "D c #FFD067", 73 | "E c #5B4F38", 74 | "F c #987B48", 75 | "G c #68593C", 76 | "H c #FFCF66", 77 | "I c #F2F2F2", 78 | "J c #939393", 79 | "K c #E9BB5F", 80 | "L c #FBC361", 81 | "M c #403B31", 82 | "N c #C6A056", 83 | "O c #B6B6B6", 84 | "P c #CECECE", 85 | "Q c #9E9E9E", 86 | "R c #666666", 87 | "S c #FFCD66", 88 | "T c #867044", 89 | "U c #C99F54", 90 | "V c #25272A", 91 | "W c #36342F", 92 | "X c #DADADA", 93 | "Y c #545454", 94 | "Z c #9C9C9C", 95 | "` c #715E3E", 96 | " . c #927948", 97 | ".. c #D4E3FF", 98 | "+. c #C2C2C2", 99 | "@. c #B19050", 100 | "#. c #292A2B", 101 | "$. c #F0C061", 102 | "%. c #FFD268", 103 | "&. c #4D4535", 104 | "*. c #2A2B2B", 105 | "=. c #5F523A", 106 | "-. c #E6E6E6", 107 | ";. c #DDB15C", 108 | ">. c #232529", 109 | ",. c #FAC360", 110 | "'. c #484033", 111 | "). c #BD9953", 112 | "!. c #7A6641", 113 | "~. c #D1A556", 114 | "{. c #23262A", 115 | "]. c #302F2D", 116 | "^. c #FFD167", 117 | "/. c #F3BE5F", 118 | "(. c #796440", 119 | "_. c #897345", 120 | ":. c #A4874C", 121 | "<. c #2A2A2B", 122 | "[. c #E8BA5F", 123 | "}. c #413C32", 124 | "|. c #A9874C", 125 | "1. c #554B37", 126 | "2. c #D0A758", 127 | "3. c #514735", 128 | "4. c #B49251", 129 | "5. c #FFCE66", 130 | "6. c #6D5D3D", 131 | "7. c #222529", 132 | "8. c #F8C563", 133 | "9. c #F3BD5E", 134 | "0. c #816A42", 135 | "a. c #816C43", 136 | "b. c #987D49", 137 | "c. c #2E2E2D", 138 | "d. c #DFB35D", 139 | "e. c #37342F", 140 | "f. c #B18D4E", 141 | "g. c #4C4435", 142 | "h. c #AAAAAA", 143 | "i. c #C39E55", 144 | "j. c #FFCA63", 145 | "k. c #594D37", 146 | "l. c #AB8C4E", 147 | "m. c #60533A", 148 | "n. c #EEBA5D", 149 | "o. c #27282A", 150 | "p. c #EEBE60", 151 | "q. c #222429", 152 | "r. c #967947", 153 | "s. c #2B2C2C", 154 | "t. c #786541", 155 | "u. c #8B7446", 156 | "v. c #D6AC5A", 157 | "w. c #383838", 158 | "x. c #2F2E2D", 159 | "y. c #433D32", 160 | "z. c #A2854C", 161 | "A. c #534A37", 162 | "B. c #FBC864", 163 | "C. c #E2B65E", 164 | "D. c #776540", 165 | "E. c #FFD86A", 166 | "F. c #705F3E", 167 | " . . + + + + + + + + + + + + + + + + + + + + + + + . @ ", 168 | ". + # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ # % & ", 169 | ". # * = - - - - - - - - - - - - - - - - - - - - - = ; > + ", 170 | "+ $ = , , , , , , , , , , , , , , , , , , , , , , , ' ) > ! ", 171 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , ~ { + ] ", 172 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , ^ / + ", 173 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , ( _ ! ! + + + + + + + + + + + + + + + + + + + + + ! ", 174 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , : < [ # # # # # # # # # # # # # # # # # # # # # # > + ", 175 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , , } | 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 4 5 @ ", 176 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 6 7 . ", 177 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , } 7 . ", 178 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , } 7 . ", 179 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , } 7 . ", 180 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , } 7 . ", 181 | "+ $ - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , } 7 . ", 182 | "+ $ - , , , , , , , , , ' 8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 $ . ", 183 | "+ $ - , , , , , , , , 0 a b c $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % + + + + + . d ", 184 | "+ $ - , , , , , , , , e f _ g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g _ % ", 185 | "+ $ - , , , , , , , h i j k l m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m l n 5 . ", 186 | "+ $ - , , , , , , , o p q r s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s r t + ", 187 | "+ $ - , , , , , , 6 u v w x s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s y > @ ", 188 | "+ $ - , , , , , , z # [ A s s s s s B B B B B B B B B B B B B B B B B B B B B B B B B B B C s s s s s s s s s s s s s s D E + ", 189 | "+ $ - , , , , , , F v G H s s s s B I I I I I I I I I I I I I I I I I I I I I I I I I I I d J s s s s s s s s s s s s s K 7 ! ", 190 | "+ $ - , , , , , L M _ N s s s s s B O P P P P P P P P P P P P P P P P P P P P P P P P P Q d R C s s s s s s s s s s s S T + @ ", 191 | "+ $ - , , , , , U V W r s s s s s B I I P P P P P P P P P P P P P P P P P P P P P X P I I d Y Z s s s s s s s s s s s H + + ", 192 | "+ $ - , , , , } ` v .x s s s s s B O O I P ......................................+.I O O d Y Z s s s s s s s s s s s @.#.@ ", 193 | "+ $ - , , , , , _ 7 $.s s s s s s B I I P P ......................................+.X I I d Y Z s s s s s s s s s s %.&.+ ", 194 | "+ $ - , , , , ) *.=.D s s s s s s B O O I P I -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.I +.I O O d Y Z s s s s s s s s s s ;.>.! ", 195 | "+ $ - , , , ,.'.> ).s s s s s s s B I I P P I I I I I I I I I I I I I I I I I I I +.X I I d Y Z s s s s s s s s s S !.+ ] ", 196 | "+ $ - , , , ~.{.].^.s s s s s s s B O O I P I -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.I +.I O O d Y Z s s s s s s s s s s j + ", 197 | "+ $ - , , /.(.+ _.x s s s s s s s B X +.P P I I I I I I I I I I I I I I I I I I I +.P P Q d Y Z s s s s s s s s s :.<.@ ", 198 | "+ $ - , , 6 <.7 [.s s s s s s s s B X +.P P I -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.I +.P P Q d Y Z s s s s s s s s r }.+ ", 199 | "+ $ - , , |.#.1.^.s s s s s s s s B X +.P P I I I I I I I I I I I I I I I I I I I +.P P Q d Y Z s s s s s s s s 2.V ! ", 200 | "+ $ - , ~ 3.#.4.s s s s s s s s s B X +.P P I -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.I +.P P Q d Y Z s s s s s s s 5.6.+ ] ", 201 | "+ $ - , 3 7.v H s s s s s s s s s B X +.P P I I I I I I I I I I I I I I I I I I I +.P P Q d Y Z s s s s s s s 8.>.! ", 202 | "+ $ - 9.0.+ a.S s s s s s s s s s B X +.P +.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.P P Q d Y Z s s s s s s x b.v . ", 203 | "+ $ - : c.7.d.s s s s s s s s s s B X +.P P P P P P P P P P P P P P P P P P P P P P P P Q d Y Z s s s s s s %.e.+ ", 204 | "+ $ - f.> g.%.s s s s s s s s s s B X +.P P P P P P P P P h.I h.I h.I P P P P P P P P P Q d Y Z s s s s s s i.j . ", 205 | "+ $ j.k.<.l.s s s s s s s s s s s B X +.P P P P P P P P h.I h.I h.I P P P P P P P P P P Q d Y Z s s s s s D m.+ ", 206 | "+ $ n.7.o.x s s s s s s s s s s s B X +.P P P P P P P P P P P P P P P P P P P P P P P P Q d Y Z s s s s s p.q.. ", 207 | "+ 7 r.s.t.S s s s s s s s s s s s B X +.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.Q d Y Z s s s s x u.+ . ", 208 | "+ <.M # v.s s s s s s s s s s s s C d d d d d d d d d d d d d d d d d d d d d d d d d d d w.R C s s s s ^.x.+ ", 209 | "+ + + y.r s s s s s s s s s s s s s J R Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y R J s s s s s k > @ ", 210 | "+ + / z.s s s s s s s s s s s s s s s C Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z C s s s s s ^.A.+ ", 211 | "+ + # B.s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s C.q.! ", 212 | "+ + D.E.m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m F.+ & ", 213 | "+ + _ g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g *.! ", 214 | "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ "}; 215 | -------------------------------------------------------------------------------- /parselib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | QDateTime GetDateTimeFromRaw4Byte(QByteArray buf) 7 | { 8 | QDateTime d; 9 | qint64 tim = 0; 10 | if (buf.size() < 4) return QDateTime::fromMSecsSinceEpoch(tim,Qt::UTC); ; 11 | d.setDate(QDate(1980,1,1)); 12 | d.setTime(QTime(0,0,0,0)); 13 | tim = d.toMSecsSinceEpoch(); 14 | tim += (qint64)60000*((unsigned char)(buf.at(0))*0x1000000 15 | + (unsigned char)(buf.at(1))*0x10000 16 | + (unsigned char)(buf.at(2))*0x100 17 | + (unsigned char)(buf.at(3))); 18 | return QDateTime::fromMSecsSinceEpoch(tim,Qt::UTC); 19 | } 20 | 21 | QByteArray GetRaw4ByteFromDateTime(QDateTime dt) 22 | { 23 | char buf[4]; 24 | qint64 tim = 0; 25 | QDateTime d; 26 | d.setDate(QDate(1980,1,1)); 27 | d.setTime(QTime(0,0,0,0)); 28 | tim = (dt.toMSecsSinceEpoch() - d.toMSecsSinceEpoch() )/60000 + dt.offsetFromUtc()/60 ; 29 | buf[0] = tim/0x1000000; 30 | buf[1] = (tim%0x1000000)/0x10000; 31 | buf[2] = (tim%0x10000)/0x100; 32 | buf[3] = tim % 0x100; 33 | return QByteArray(buf,4); 34 | } 35 | 36 | QDateTime GetDateTimeFromSSF4Byte(QByteArray buf) 37 | { 38 | QDateTime d; 39 | qint64 tim = 0; 40 | if (buf.size() < 4) return QDateTime::fromMSecsSinceEpoch(tim,Qt::UTC); ; 41 | d.setDate(QDate(1980,1,1)); 42 | d.setTime(QTime(0,0,0,0)); 43 | d=d.addYears(((unsigned char)buf.at(3))*2); 44 | d=d.addYears((((unsigned char)buf.at(2))&0x80)/0x80); 45 | d=d.addMonths(((((unsigned char)buf.at(2))&0x78)/0x8)-1); 46 | d=d.addDays((((unsigned char)buf.at(2))&0x7)*4); 47 | d=d.addDays(((((unsigned char)buf.at(1))&0xC0)/0x40)-1); 48 | d=d.addSecs(((((unsigned char)buf.at(1))&0x3E)/0x2)*60*60);//hours 49 | d=d.addSecs(((((unsigned char)buf.at(1))&0x01)*32)*60);//minutes 50 | d=d.addSecs(((((unsigned char)buf.at(0))&0xF8)/0x08)*60);//minutes 51 | return d; 52 | } 53 | 54 | QByteArray GetSSF4ByteFromDateTime(QDateTime dt) 55 | { 56 | char buf[4]; 57 | //qint64 tim = 0; 58 | QDateTime d; 59 | d.setDate(QDate(1980,1,1)); 60 | d.setTime(QTime(0,0,0,0)); 61 | //tim = (dt.toMSecsSinceEpoch() - d.toMSecsSinceEpoch() )/60000 + dt.offsetFromUtc()/60 ; 62 | buf[3] = (dt.date().year()-1980)/2; 63 | buf[2] = 0x80*((dt.date().year()-1980)%2); 64 | buf[2] |= 0x08*(dt.date().month()+1); 65 | buf[2] |= ((dt.date().day()+1)/4); 66 | buf[1] |= 0x40*((dt.date().day()+1)%4); 67 | buf[1] |= 0x02*(dt.time().hour()); 68 | buf[1] |= (dt.time().minute()/32); 69 | buf[0] |= 0x08*(dt.time().minute()%32); 70 | return QByteArray(buf,4); 71 | } 72 | 73 | 74 | ParseResult ParseHeader(QByteArray buf, SaveType *save) 75 | { 76 | if (buf.size() < 34 ) return DataTooShort; 77 | if ((buf.at(0) & 0x80) == 0) return NotAHeader; 78 | save->cCounter = (unsigned char)buf.at(3); 79 | save->Name = buf.mid(4,11); 80 | save->cLanguageCode = (unsigned char)buf.at(15); 81 | save->Comment = buf.mid(16,10); 82 | save->DateTimeRaw = buf.mid(26,4); 83 | /*save->DateTime.setDate(QDate(1980,1,1)); 84 | save->DateTime.setTime(QTime(0,0,0,0)); 85 | qint64 tim = save->DateTime.toMSecsSinceEpoch(); 86 | tim += (qint64)60000*((unsigned char)(buf.at(26))*0x1000000 87 | + (unsigned char)(buf.at(27))*0x10000 88 | + (unsigned char)(buf.at(28))*0x100 89 | + (unsigned char)(buf.at(29))); 90 | save->DateTime = QDateTime::fromMSecsSinceEpoch(tim,Qt::UTC); 91 | */ 92 | save->DateTime = GetDateTimeFromRaw4Byte(save->DateTimeRaw); 93 | 94 | save->iBytes = (unsigned char)(buf.at(30))*0x1000000 95 | + (unsigned char)(buf.at(31))*0x10000 96 | + (unsigned char)(buf.at(32))*0x100 97 | + (unsigned char)(buf.at(33)); 98 | //exact formula for blocks is yet to be found 99 | //but since blocks are in-bios unit only, maybe it doesn't matter 100 | //save->iBlocks = save->iBytes/64+1; 101 | //if (save->iBytes%64>32) save->iBlocks++; 102 | //using formula from Sega Saturn Technical Bulletin #9 for now 103 | save->iBlocks = ceil((32.0+save->iBytes)/64.0); 104 | 105 | //some sanity checks 106 | if (save->iBytes > 1024*1024) return NotAHeader; //is there a save bigger than 1M? 107 | if (save->iBytes <= 0) return NotAHeader; //now that's too negative 108 | if (save->DateTime.date().year() > 2500) return NotAHeader; //someone playing Saturn in 26th century? I love you! 109 | if (save->DateTime.date().year() < 1900) return NotAHeader; //now that's too negative 110 | return ParseOk; 111 | } 112 | 113 | ParseResult ParseSAT(QByteArray * hugeram, SaveType *save, int iClusterSize) 114 | { 115 | //okay, now SAT stuff 116 | //calculating SAT size 117 | int iCurrentCluster = save->iStartCluster; 118 | int iCurrentClusterIndex = 0; 119 | int iCurrentPointer = 34; 120 | short sCurrentEntry = 1; //any nonzero will do 121 | save->SAT.clear(); 122 | while (sCurrentEntry) 123 | { 124 | if (iCurrentPointer >= iClusterSize)//we hit end of cluster 125 | { 126 | iCurrentPointer = 4;//skipping header of the next cluster 127 | iCurrentClusterIndex++; 128 | iCurrentCluster = save->SAT.at(iCurrentClusterIndex-1); 129 | } 130 | sCurrentEntry = (unsigned char)(hugeram->at(iCurrentCluster*iClusterSize+iCurrentPointer))*0x100 131 | + (unsigned char)(hugeram->at(iCurrentCluster*iClusterSize+iCurrentPointer+1)); 132 | save->SAT.append(sCurrentEntry); 133 | iCurrentPointer+=2; 134 | } 135 | return ParseOk; 136 | } 137 | -------------------------------------------------------------------------------- /parselib.h: -------------------------------------------------------------------------------- 1 | #ifndef PARSELIB_H 2 | #define PARSELIB_H 3 | 4 | #include "mainwindow.h" 5 | 6 | enum ParseResult {ParseOk,NotAHeader,DataTooShort}; 7 | 8 | QDateTime GetDateTimeFromRaw4Byte(QByteArray buf); 9 | QByteArray GetRaw4ByteFromDateTime(QDateTime dt); 10 | QDateTime GetDateTimeFromSSF4Byte(QByteArray buf); 11 | QByteArray GetSSF4ByteFromDateTime(QDateTime dt); 12 | 13 | ParseResult ParseHeader(QByteArray buf, SaveType *save); 14 | ParseResult ParseSAT(QByteArray *hugeram, SaveType *save, int iClusterSize); 15 | 16 | #endif // PARSELIB_H 17 | 18 | -------------------------------------------------------------------------------- /resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | masqurin_highwizard.xpm 4 | sys_header_start.xpm 5 | sys_header_counter.xpm 6 | blue_arrow.xpm 7 | save.xpm 8 | open.xpm 9 | new.xpm 10 | cart_to_game.xpm 11 | game_to_cart.xpm 12 | map.xpm 13 | 14 | 15 | -------------------------------------------------------------------------------- /save.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\__repo\ss_save_parser\save_xpm[] = { 3 | "64 64 668 2", 4 | " c None", 5 | ". c #C9C9C9", 6 | "+ c #888786", 7 | "@ c #757473", 8 | "# c #757474", 9 | "$ c #757476", 10 | "% c #767473", 11 | "& c #737372", 12 | "* c #6E6E6E", 13 | "= c #696969", 14 | "- c #6B6B6B", 15 | "; c #6C6C6C", 16 | "> c #6D6D6D", 17 | ", c #6A6A6A", 18 | "' c #747473", 19 | ") c #777674", 20 | "! c #706F6D", 21 | "~ c #999999", 22 | "{ c #62696E", 23 | "] c #473F3B", 24 | "^ c #2D4E69", 25 | "/ c #2D5B81", 26 | "( c #2B5C84", 27 | "_ c #2B5C85", 28 | ": c #2B5B87", 29 | "< c #2B5A84", 30 | "[ c #3B4957", 31 | "} c #4E4E4D", 32 | "| c #818181", 33 | "1 c #828282", 34 | "2 c #808080", 35 | "3 c #7F7F7F", 36 | "4 c #7E7E7E", 37 | "5 c #7D7D7D", 38 | "6 c #717171", 39 | "7 c #434343", 40 | "8 c #424242", 41 | "9 c #414141", 42 | "0 c #404040", 43 | "a c #5A5B5A", 44 | "b c #7C7C7D", 45 | "c c #7C7D7C", 46 | "d c #807F80", 47 | "e c #474645", 48 | "f c #394C67", 49 | "g c #295E86", 50 | "h c #275A82", 51 | "i c #2D587B", 52 | "j c #414142", 53 | "k c #837F7B", 54 | "l c #BDBEBE", 55 | "m c #46403B", 56 | "n c #1F72B5", 57 | "o c #058CFA", 58 | "p c #0290FF", 59 | "q c #028FFF", 60 | "r c #028EFF", 61 | "s c #2A608C", 62 | "t c #646260", 63 | "u c #FFFFFF", 64 | "v c #D3D3D3", 65 | "w c #383838", 66 | "x c #8D8E8E", 67 | "y c #FCFEFD", 68 | "z c #F2F3F3", 69 | "A c #4B4A49", 70 | "B c #2269AC", 71 | "C c #0094FF", 72 | "D c #058FFA", 73 | "E c #0093FF", 74 | "F c #1B71B8", 75 | "G c #363A42", 76 | "H c #837B77", 77 | "I c #6F6E6D", 78 | "J c #335C7D", 79 | "K c #008EFF", 80 | "L c #0C8AF1", 81 | "M c #038CFB", 82 | "N c #038CFA", 83 | "O c #038BFC", 84 | "P c #038BFD", 85 | "Q c #028AFA", 86 | "R c #038AF9", 87 | "S c #2C5E89", 88 | "T c #615F5D", 89 | "U c #F8F8F8", 90 | "V c #FDFDFD", 91 | "W c #FEFEFE", 92 | "X c #FCFCFC", 93 | "Y c #FBFBFB", 94 | "Z c #FAFAFA", 95 | "` c #F9F9F9", 96 | " . c #CECECE", 97 | ".. c #878988", 98 | "+. c #F3F5F4", 99 | "@. c #EAEBEA", 100 | "#. c #4C4A48", 101 | "$. c #2964A0", 102 | "%. c #0090FD", 103 | "&. c #008DFC", 104 | "*. c #088BF6", 105 | "=. c #018BFB", 106 | "-. c #1870BE", 107 | ";. c #383E45", 108 | ">. c #81807B", 109 | ",. c #5D5A56", 110 | "'. c #2369A3", 111 | "). c #0090FF", 112 | "!. c #008DFE", 113 | "~. c #008DFF", 114 | "{. c #018DFD", 115 | "]. c #028BFA", 116 | "^. c #2B5F88", 117 | "/. c #F9F9FA", 118 | "(. c #F7F7F7", 119 | "_. c #CCCCCC", 120 | ":. c #393939", 121 | "<. c #40403F", 122 | "[. c #8B8D8C", 123 | "}. c #F1F3F2", 124 | "|. c #ECEEED", 125 | "1. c #F8F9F9", 126 | "2. c #494846", 127 | "3. c #2067A6", 128 | "4. c #028CFE", 129 | "5. c #018DFF", 130 | "6. c #0490FF", 131 | "7. c #1975C0", 132 | "8. c #3F3834", 133 | "9. c #7E807E", 134 | "0. c #236AA6", 135 | "a. c #008EFE", 136 | "b. c #038BFA", 137 | "c. c #2C5F87", 138 | "d. c #615F5C", 139 | "e. c #FAFBFB", 140 | "f. c #FEFDFF", 141 | "g. c #F6F6F6", 142 | "h. c #CBCBCB", 143 | "i. c #8C8E8D", 144 | "j. c #F0F2F1", 145 | "k. c #F8FAF9", 146 | "l. c #1F68A5", 147 | "m. c #028CFF", 148 | "n. c #028AF8", 149 | "o. c #018EFC", 150 | "p. c #1E72B3", 151 | "q. c #3A3D40", 152 | "r. c #808180", 153 | "s. c #236AA5", 154 | "t. c #0091FF", 155 | "u. c #028BFB", 156 | "v. c #2C5F89", 157 | "w. c #FAFBFC", 158 | "x. c #FEFDFE", 159 | "y. c #F5F5F5", 160 | "z. c #1F68A4", 161 | "A. c #028DFE", 162 | "B. c #018EFD", 163 | "C. c #018FFD", 164 | "D. c #058EF8", 165 | "E. c #1879C1", 166 | "F. c #4D3F31", 167 | "G. c #7B7E82", 168 | "H. c #236BA6", 169 | "I. c #018FFC", 170 | "J. c #028DFB", 171 | "K. c #2B608B", 172 | "L. c #615F5E", 173 | "M. c #1F69A3", 174 | "N. c #028DFD", 175 | "O. c #0290FB", 176 | "P. c #1675BC", 177 | "Q. c #3B3C3C", 178 | "R. c #828384", 179 | "S. c #0190FC", 180 | "T. c #038EFC", 181 | "U. c #2C618B", 182 | "V. c #F4F4F4", 183 | "W. c #F3F3F3", 184 | "X. c #008EFD", 185 | "Y. c #0492FB", 186 | "Z. c #058DF6", 187 | "`. c #306287", 188 | " + c #424A50", 189 | ".+ c #008FFF", 190 | "++ c #0190FD", 191 | "@+ c #0491FC", 192 | "#+ c #2A6087", 193 | "$+ c #605E5D", 194 | "%+ c #F3F4F4", 195 | "&+ c #F2F4F3", 196 | "*+ c #C8C8C8", 197 | "=+ c #1F6AA4", 198 | "-+ c #0092FF", 199 | ";+ c #028FFE", 200 | ">+ c #018FFE", 201 | ",+ c #286598", 202 | "'+ c #484A4B", 203 | ")+ c #0492FC", 204 | "!+ c #2A6086", 205 | "~+ c #296699", 206 | "{+ c #494947", 207 | "]+ c #246BA6", 208 | "^+ c #0190FF", 209 | "/+ c #0191FD", 210 | "(+ c #0491FB", 211 | "_+ c #2A5F87", 212 | ":+ c #F2F3F2", 213 | "<+ c #0390FF", 214 | "[+ c #0191FF", 215 | "}+ c #246CA6", 216 | "|+ c #0091FE", 217 | "1+ c #0192FF", 218 | "2+ c #0292FC", 219 | "3+ c #0390FB", 220 | "4+ c #295E88", 221 | "5+ c #F4F5F4", 222 | "6+ c #EFF1F0", 223 | "7+ c #F1F2F1", 224 | "8+ c #C6C6C6", 225 | "9+ c #206BA5", 226 | "0+ c #0491FF", 227 | "a+ c #2A6699", 228 | "b+ c #EEF0EF", 229 | "c+ c #206AA5", 230 | "d+ c #494A47", 231 | "e+ c #0095FF", 232 | "f+ c #0193FF", 233 | "g+ c #0192FC", 234 | "h+ c #2A6089", 235 | "i+ c #EDEFEE", 236 | "j+ c #EFF0EF", 237 | "k+ c #C3C3C3", 238 | "l+ c #3F3F3F", 239 | "m+ c #888A89", 240 | "n+ c #0391FF", 241 | "o+ c #296797", 242 | "p+ c #4B4845", 243 | "q+ c #0493FC", 244 | "r+ c #605E5C", 245 | "s+ c #EBEDEC", 246 | "t+ c #E5E5E5", 247 | "u+ c #515151", 248 | "v+ c #505050", 249 | "w+ c #B1B3B2", 250 | "x+ c #4B4844", 251 | "y+ c #0493FB", 252 | "z+ c #2A6189", 253 | "A+ c #ECECEC", 254 | "B+ c #EBECEB", 255 | "C+ c #EAEAEA", 256 | "D+ c #EAEBEB", 257 | "E+ c #EAECEB", 258 | "F+ c #F9FBFA", 259 | "G+ c #1F6BA5", 260 | "H+ c #0392FE", 261 | "I+ c #286797", 262 | "J+ c #5E5A57", 263 | "K+ c #256DA6", 264 | "L+ c #0096FF", 265 | "M+ c #0293FC", 266 | "N+ c #296089", 267 | "O+ c #5E5C5B", 268 | "P+ c #F1F2F2", 269 | "Q+ c #FAFCFB", 270 | "R+ c #1D6CA5", 271 | "S+ c #0493FE", 272 | "T+ c #286696", 273 | "U+ c #4C4945", 274 | "V+ c #0294FD", 275 | "W+ c #296088", 276 | "X+ c #F8F9F8", 277 | "Y+ c #F1F1F1", 278 | "Z+ c #ECEFED", 279 | "`+ c #474744", 280 | " @ c #1E6CA5", 281 | ".@ c #5B5955", 282 | "+@ c #246FA8", 283 | "@@ c #0097FF", 284 | "#@ c #0295FF", 285 | "$@ c #0294FF", 286 | "%@ c #0295FE", 287 | "&@ c #0194FE", 288 | "*@ c #2172AA", 289 | "=@ c #4B4745", 290 | "-@ c #CFD1D2", 291 | ";@ c #FCFEFF", 292 | ">@ c #FCFFFF", 293 | ",@ c #FBFEFF", 294 | "'@ c #FAFDFF", 295 | ")@ c #FAFBFF", 296 | "!@ c #F9FAFE", 297 | "~@ c #F8FAFD", 298 | "{@ c #F8F8FC", 299 | "]@ c #F7F8FC", 300 | "^@ c #F5F6F9", 301 | "/@ c #F4F5F8", 302 | "(@ c #F3F4F8", 303 | "_@ c #F1F3F6", 304 | ":@ c #F2F3F6", 305 | "<@ c #EEF1F5", 306 | "[@ c #EDF1F3", 307 | "}@ c #ECF0F3", 308 | "|@ c #EBEEF1", 309 | "1@ c #EBEFF1", 310 | "2@ c #EAEFF1", 311 | "3@ c #E9EFF1", 312 | "4@ c #EBEFF2", 313 | "5@ c #EBEDEB", 314 | "6@ c #C1C3C1", 315 | "7@ c #413E3D", 316 | "8@ c #1E76B6", 317 | "9@ c #0293FE", 318 | "0@ c #276796", 319 | "a@ c #4D4945", 320 | "b@ c #5A5955", 321 | "c@ c #2470A8", 322 | "d@ c #0098FF", 323 | "e@ c #0297FC", 324 | "f@ c #0A94F4", 325 | "g@ c #385162", 326 | "h@ c #414140", 327 | "i@ c #3B3A38", 328 | "j@ c #3F3934", 329 | "k@ c #3E3833", 330 | "l@ c #3D3732", 331 | "m@ c #3C3631", 332 | "n@ c #3E3933", 333 | "o@ c #3F3A34", 334 | "p@ c #3D3933", 335 | "q@ c #3C3933", 336 | "r@ c #3F3933", 337 | "s@ c #30383E", 338 | "t@ c #44433E", 339 | "u@ c #2B506A", 340 | "v@ c #0794F5", 341 | "w@ c #0695F7", 342 | "x@ c #0195FF", 343 | "y@ c #0196FF", 344 | "z@ c #0197FF", 345 | "A@ c #0396FF", 346 | "B@ c #0196FE", 347 | "C@ c #0893F6", 348 | "D@ c #177AC0", 349 | "E@ c #216FA5", 350 | "F@ c #1E70AA", 351 | "G@ c #1F71AB", 352 | "H@ c #1F71AA", 353 | "I@ c #2070AA", 354 | "J@ c #2070AB", 355 | "K@ c #2170AB", 356 | "L@ c #226FAA", 357 | "M@ c #1B79BC", 358 | "N@ c #0691F4", 359 | "O@ c #0296FD", 360 | "P@ c #0096FC", 361 | "Q@ c #0496FF", 362 | "R@ c #276896", 363 | "S@ c #276997", 364 | "T@ c #5B5A56", 365 | "U@ c #236FA7", 366 | "V@ c #0099FF", 367 | "W@ c #2B6797", 368 | "X@ c #484B45", 369 | "Y@ c #5C5B57", 370 | "Z@ c #236FA6", 371 | "`@ c #2C6697", 372 | " # c #464C45", 373 | ".# c #2370A6", 374 | "+# c #009AFF", 375 | "@# c #2371A6", 376 | "## c #009DFF", 377 | "$# c #0099FD", 378 | "%# c #2C6797", 379 | "&# c #049AFF", 380 | "*# c #0199FB", 381 | "=# c #0199FE", 382 | "-# c #019AFE", 383 | ";# c #0298FE", 384 | "># c #0299FF", 385 | ",# c #019AFF", 386 | "'# c #2C6794", 387 | ")# c #464C46", 388 | "!# c #009AFE", 389 | "~# c #009CFF", 390 | "{# c #079FF7", 391 | "]# c #009BFF", 392 | "^# c #0199FC", 393 | "/# c #0099F9", 394 | "(# c #009BFE", 395 | "_# c #2C6894", 396 | ":# c #5C5A56", 397 | "<# c #2371A7", 398 | "[# c #0198F9", 399 | "}# c #148FE3", 400 | "|# c #315D7B", 401 | "1# c #2E5C79", 402 | "2# c #2E5D79", 403 | "3# c #2D5C78", 404 | "4# c #305C7C", 405 | "5# c #138BDA", 406 | "6# c #029BFD", 407 | "7# c #029BFE", 408 | "8# c #5D5855", 409 | "9# c #2373A8", 410 | "0# c #009EFF", 411 | "a# c #019CFC", 412 | "b# c #207CBA", 413 | "c# c #433D39", 414 | "d# c #656565", 415 | "e# c #606060", 416 | "f# c #616161", 417 | "g# c #5B5B5B", 418 | "h# c #1E77B3", 419 | "i# c #029DFD", 420 | "j# c #47423D", 421 | "k# c #474846", 422 | "l# c #2373A7", 423 | "m# c #009FFF", 424 | "n# c #019DFC", 425 | "o# c #1F7BBA", 426 | "p# c #46403C", 427 | "q# c #444342", 428 | "r# c #1C76B3", 429 | "s# c #019DFD", 430 | "t# c #474C47", 431 | "u# c #2374A8", 432 | "v# c #009DFE", 433 | "w# c #029CFD", 434 | "x# c #1F7BB9", 435 | "y# c #EDEDED", 436 | "z# c #444243", 437 | "A# c #1B77B3", 438 | "B# c #019CFF", 439 | "C# c #2D6995", 440 | "D# c #474D47", 441 | "E# c #2374A7", 442 | "F# c #00A0FF", 443 | "G# c #4A4A4A", 444 | "H# c #A5A5A5", 445 | "I# c #1B77B2", 446 | "J# c #019FFD", 447 | "K# c #1F7DBB", 448 | "L# c #453F3B", 449 | "M# c #F2F2F2", 450 | "N# c #262626", 451 | "O# c #939393", 452 | "P# c #464443", 453 | "Q# c #1B77B0", 454 | "R# c #2C6995", 455 | "S# c #464B47", 456 | "T# c #B6B6B6", 457 | "U# c #9E9E9E", 458 | "V# c #666666", 459 | "W# c #00A1FF", 460 | "X# c #443F3A", 461 | "Y# c #DADADA", 462 | "Z# c #545454", 463 | "`# c #9C9C9C", 464 | " $ c #EBEBEB", 465 | ".$ c #474545", 466 | "+$ c #1C78AF", 467 | "@$ c #019EFF", 468 | "#$ c #2C6994", 469 | "$$ c #464C47", 470 | "%$ c #2375A8", 471 | "&$ c #D4E3FF", 472 | "*$ c #C2C2C2", 473 | "=$ c #E9E9E9", 474 | "-$ c #474547", 475 | ";$ c #1C79AF", 476 | ">$ c #019EFD", 477 | ",$ c #2B6994", 478 | "'$ c #454C47", 479 | ")$ c #00A2FF", 480 | "!$ c #E8E8E8", 481 | "~$ c #464445", 482 | "{$ c #019FFC", 483 | "]$ c #2475A8", 484 | "^$ c #00A3FF", 485 | "/$ c #02A1FF", 486 | "($ c #01A3FF", 487 | "_$ c #01A1FD", 488 | ":$ c #1E7FBA", 489 | "<$ c #E6E6E6", 490 | "[$ c #454245", 491 | "}$ c #1C7AB1", 492 | "|$ c #01A1FC", 493 | "1$ c #2C6A94", 494 | "2$ c #00A5FF", 495 | "3$ c #01A2FF", 496 | "4$ c #01A2FD", 497 | "5$ c #1D7FBA", 498 | "6$ c #443E39", 499 | "7$ c #E7E7E7", 500 | "8$ c #1D7BB2", 501 | "9$ c #01A2FC", 502 | "0$ c #01A1FF", 503 | "a$ c #2376A8", 504 | "b$ c #00A6FF", 505 | "c$ c #01A3FD", 506 | "d$ c #443E3A", 507 | "e$ c #454345", 508 | "f$ c #1E7BB2", 509 | "g$ c #01A3FC", 510 | "h$ c #2B6A95", 511 | "i$ c #03A1FF", 512 | "j$ c #00A7FE", 513 | "k$ c #1784BB", 514 | "l$ c #473E3A", 515 | "m$ c #444244", 516 | "n$ c #2C6B95", 517 | "o$ c #464D46", 518 | "p$ c #04A1FF", 519 | "q$ c #1684BB", 520 | "r$ c #2C6A95", 521 | "s$ c #F0F0F0", 522 | "t$ c #E4E4E4", 523 | "u$ c #1D7CB1", 524 | "v$ c #01A4FC", 525 | "w$ c #2B6C95", 526 | "x$ c #464C48", 527 | "y$ c #2477A8", 528 | "z$ c #00A7FF", 529 | "A$ c #473D3A", 530 | "B$ c #E3E3E3", 531 | "C$ c #434243", 532 | "D$ c #1D7DB0", 533 | "E$ c #02A6FB", 534 | "F$ c #464C49", 535 | "G$ c #F0F1F0", 536 | "H$ c #F3F4F3", 537 | "I$ c #EFEFEF", 538 | "J$ c #434244", 539 | "K$ c #2377A8", 540 | "L$ c #00A8FF", 541 | "M$ c #00A4FE", 542 | "N$ c #03A4FF", 543 | "O$ c #00A9FD", 544 | "P$ c #1785B9", 545 | "Q$ c #483E3A", 546 | "R$ c #AAAAAA", 547 | "S$ c #E2E2E2", 548 | "T$ c #444345", 549 | "U$ c #1C7DB0", 550 | "V$ c #00A4FF", 551 | "W$ c #EFF2F1", 552 | "X$ c #E0E0E0", 553 | "Y$ c #434344", 554 | "Z$ c #00A9FF", 555 | "`$ c #01A5FF", 556 | " % c #01A6FF", 557 | ".% c #03A5FF", 558 | "+% c #1785B8", 559 | "@% c #EFF0F0", 560 | "#% c #1D7DB1", 561 | "$% c #02A7FC", 562 | "%% c #04A5FF", 563 | "&% c #00AAFE", 564 | "*% c #1684B8", 565 | "=% c #463C39", 566 | "-% c #EEEFEE", 567 | ";% c #EDEEEE", 568 | ">% c #1E7EB2", 569 | ",% c #03A8FC", 570 | "'% c #473D39", 571 | ")% c #EDEEED", 572 | "!% c #2379A8", 573 | "~% c #00ACFF", 574 | "{% c #00A8FD", 575 | "]% c #03A7FF", 576 | "^% c #00ACFD", 577 | "/% c #1685BB", 578 | "(% c #ECEDEC", 579 | "_% c #EEEEEE", 580 | ":% c #DCDEDD", 581 | "<% c #1F7EB1", 582 | "[% c #01A7FC", 583 | "}% c #01A8FF", 584 | "|% c #2A6D95", 585 | "1% c #474D4B", 586 | "2% c #2379A9", 587 | "3% c #1685BC", 588 | "4% c #454445", 589 | "5% c #01A7FB", 590 | "6% c #2B6D95", 591 | "7% c #595556", 592 | "8% c #247BA5", 593 | "9% c #03ABFF", 594 | "0% c #04AAFC", 595 | "a% c #F5F6F6", 596 | "b% c #EBECEC", 597 | "c% c #ECEDED", 598 | "d% c #EBEDED", 599 | "e% c #EDEDEC", 600 | "f% c #1E7FB0", 601 | "g% c #01A9FB", 602 | "h% c #03A8FE", 603 | "i% c #296C8F", 604 | "j% c #484C4E", 605 | "k% c #6A696B", 606 | "l% c #32678B", 607 | "m% c #00AEFF", 608 | "n% c #05A7FE", 609 | "o% c #473F3A", 610 | "p% c #F5F7F6", 611 | "q% c #EBEEEC", 612 | "r% c #444444", 613 | "s% c #1D7FAF", 614 | "t% c #01ABFB", 615 | "u% c #00A8FE", 616 | "v% c #03A8F8", 617 | "w% c #00A6FD", 618 | "x% c #30667F", 619 | "y% c #4E5158", 620 | "z% c #ACACA9", 621 | "A% c #404343", 622 | "B% c #1895D6", 623 | "C% c #01A8FE", 624 | "D% c #01ABFC", 625 | "E% c #04ABFF", 626 | "F% c #0E99DC", 627 | "G% c #3F484A", 628 | "H% c #868B8F", 629 | "I% c #504B49", 630 | "J% c #3C4554", 631 | "K% c #29709B", 632 | "L% c #1E7BB3", 633 | "M% c #1D7BB4", 634 | "N% c #1C7FB6", 635 | "O% c #1984B4", 636 | "P% c #226A91", 637 | "Q% c #45403D", 638 | "R% c #A9AAA9", 639 | "S% c #A8A8A8", 640 | "T% c #A7A8A8", 641 | "U% c #A7A7A8", 642 | "V% c #A7A8A7", 643 | "W% c #A6A7A7", 644 | "X% c #A7A7A7", 645 | "Y% c #9D9E9E", 646 | "Z% c #47413D", 647 | "`% c #296889", 648 | " & c #1881B8", 649 | ".& c #1E7CB4", 650 | "+& c #1F7EB5", 651 | "@& c #256F97", 652 | "#& c #3A424B", 653 | "$& c #605957", 654 | "%& c #78837C", 655 | "&& c #49483F", 656 | "*& c #45473B", 657 | "=& c #45473A", 658 | "-& c #46463F", 659 | ";& c #523C30", 660 | ">& c #46433F", 661 | ",& c #464544", 662 | "'& c #3D3D3D", 663 | ")& c #3E3E3E", 664 | "!& c #3A3939", 665 | "~& c #424548", 666 | "{& c #494338", 667 | "]& c #4B4039", 668 | "^& c #45463B", 669 | "/& c #47453B", 670 | "(& c #4B4942", 671 | "_& c #7B837E", 672 | " . + @ @ # $ $ # % & * = - ; ; ; ; ; ; ; ; ; ; ; ; ; ; - - ; ; ; ; ; ; - ; > * * * * * * * - , - , ; ' @ ) ! ~ ", 673 | " { ] ^ / ( _ : : < < [ } | 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 | | 2 3 3 4 3 5 6 7 8 9 9 9 9 9 9 0 a b c d e f g h i j k ", 674 | "l m n o p p q q q r r s t u u u u u u u u u u u u u u u u u u u u u u u u v w 9 8 8 8 8 8 8 0 x y z u A B C D E F G H ", 675 | "I J K L M N O P P Q R S T U V W W W W W W W W W W W W W W W V X Y Z ` U Z .w 8 8 8 8 8 8 8 0 ..+.@.` #.$.%.&.*.=.-.;.>. ", 676 | ",.'.).!.~.~.~.~.~.{.].^.T /.W W W W W W W W W W W W W W W W V X Z ` U (.U _.:.7 8 8 8 8 8 8 <.[.}.|.1.2.3.).4.~.5.6.7.8.9. ", 677 | ",.0.).a.~.~.~.~.~.{.b.c.d.e.f.W W W W W W W W W W W W W W W X Z ` U (.g.(.h.:.7 8 8 8 8 8 8 <.i.j.|.k.2.l.).m.~.~.n.o.p.q.r. ", 678 | ",.s.t.a.K K K K K &.u.v.T w.x.W W W W W W W W W W W W W V V Y Z U (.g.y.g.h.w 7 8 8 8 8 8 8 <.i.j.|.k.2.z.).A.K K B.C.D.E.F.G. ", 679 | ",.H.t.a.a.a.a.a.a.I.J.K.L.Z W W W W W W W W W W W W W V X Y Z ` U g.g.y.g.. w 7 8 8 8 8 8 8 <.i.j.|.k.2.M.t.N.a.a.a.a.&.O.P.Q.R.", 680 | ",.H.t.a.a.a.a.a.a.S.T.U.T Z W W W W W W W W W W W W W X Z Z ` U g.y.V.W.V.. w 7 8 8 8 8 8 8 <.i.j.|.k.2.M.t.N.a.a.a.a.X.Y.Z.`. +", 681 | ",.H.t..+.+.+.+.+.+++@+#+$+Y W W W W W W W W W W W W X Y Z ` U (.y.V.%+&++.*+:.8 8 8 8 8 8 8 <.i.j.|.k.2.=+-+;+.+.+.+.+>+)..+,+'+", 682 | ",.H.t..+.+.+.+.+.+++)+!+$+Y W W W W W W W W W W W X Y Z ` ` (.g.y.W.z }.z *+:.8 8 8 8 8 8 8 <.i.j.|.k.2.=+-+;+.+.+.+.+.+.+.+~+{+", 683 | ",.]+-+).).^+^+^+^+/+(+_+$+Y W W W W W W W W u W X Y Z ` U (.g.y.%+:+}.j.}.*+:.8 8 8 8 8 8 8 <.i.j.|.k.2.=+E <+[+^+^+^+^+^+[+~+{+", 684 | ",.}+C |+1+1+1+1+1+2+3+4+$+Y W W W W W W W u W V Y Z ` ` (.(.g.5+&+}.j.6+7+8+:.8 8 8 8 8 8 8 <.i.j.|.k.2.9+E 0+1+1+1+1+1+1+1+a+{+", 685 | ",.}+C |+1+1+1+1+1+2+3+4+$+Y W W W W W W W W V Y Z ` U (.g.y.V.W.}.6+6+b+6+8+:.8 8 8 8 8 8 8 <.i.j.|.k.2.c+E 0+1+1+1+1+1+1+1+a+d+", 686 | ",.}+e+f+1+1+1+1+1+g+Y.h+$+Y W W W W W u W V Y Y ` U (.(.y.5+%+}.j.6+b+i+j+k+:.0 8 8 8 8 8 8 l+m+}.|.k.2.c+E n+-+1+1+1+1+1+1+o+p+", 687 | ",.}+e+f+-+-+-+-+-+g+q+h+r+Y W W W W W W V Y Z ` ` (.g.g.V.&+}.j.6+b+i+|.s+t+u+v+u+u+u+u+u+u+v+w++.s+k.2.c+E n+-+-+-+-+-+-+-+o+x+", 688 | ",.}+e+f+f+f+f+f+f+g+y+z+r+Z W W W u W V X Y ` U (.g.y.y.W.:+j.6+b+i+|.s+s+A+B+C+D+D+D+D+D+D+D+|.E+E+F+2.G+e+H+f+f+f+f+f+f+f+I+p+", 689 | "J+K+L+-+f+f+f+f+f+M+3+N+O+Z W W u W V X X Z ` (.(.g.y.V.W.P+6+b+b+|.|.s+s+s+s+s+s+s+s+s+s+s+s+s+s+|.Q+{+R+L+S+f+f+f+f+f+f+f+T+U+", 690 | "J+K+L+-+f+f+f+f+f+V+)+W+O+Z W W W V Y Y Z X+(.g.y.V.W.W.Y+6+b+Z+|.s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+k.`+ @L+S+f+f+f+f+f+f+f+T+U+", 691 | ".@+@@@e+#@$@$@$@$@%@&@*@=@-@;@>@,@'@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@3@3@3@3@3@3@3@3@3@3@3@|@4@5@6@7@8@@@9@#@$@$@$@$@$@#@0@a@", 692 | "b@c@d@L+#@#@#@#@#@e@d@f@g@h@i@j@j@j@j@k@l@l@m@m@j@j@j@k@k@n@o@o@n@n@p@q@q@q@q@q@q@q@q@q@q@q@q@n@r@s@t@u@v@w@x@#@#@#@#@#@#@#@0@a@", 693 | "b@c@d@L+y@y@y@y@y@z@A@B@C@D@E@F@F@G@G@H@H@H@H@H@G@G@G@G@G@I@J@J@K@K@J@J@J@J@J@J@J@J@J@J@J@J@J@J@J@L@M@N@O@P@Q@y@y@y@y@y@y@y@R@a@", 694 | "b@c@d@L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+S@a@", 695 | "b@c@d@L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+S@a@", 696 | "T@U@V@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@W@X@", 697 | "Y@Z@V@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`@ #", 698 | "Y@.#+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@d@`@ #", 699 | "Y@@###$#V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@%# #", 700 | "Y@@###$#V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@V@%# #", 701 | "Y@@###$#+#+#&#$#*#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#-#;#>#,#+#+#+#+#'#)#", 702 | "Y@@###$#!#!#~#{#]#~#########################################################################################]#^#/#(#!#!#!#!#_#)#", 703 | ":#<###$#!#!#+#[#}#|#1#2#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#3#1#2#1#4#5#6#7#!#!#!#(#_#)#", 704 | "8#9###]#]#]#0#a#b#c#d#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#f#g#7 h#i#]#]#]#]#]#_#)#", 705 | "8#9###]#]#]#0#a#b#j#u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u W.k#h#i#]#]#]#]#]#_#)#", 706 | "8#l#m#~#~#~#0#n#o#p#u W W X W W W V W V W W W W W W W W V W W W W W W W W X W W W V Y W W W W X W W W W V A+q#r#s#~#~#~#~#~#_#t#", 707 | "8#u#m#v#~#~#m#w#x#p#u W W V W W W W W W W W W W W W W W W W W W W W W W W V W W W W W W W W W V W W W W V y#z#A#s#B#~#~#~#~#C#D#", 708 | "8#E#F#v###~#m#i#x#m u W W V W W V W G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#H#V V W W V V V y#z#I#s#B#~#~#~#~#C#t#", 709 | "8#u#F#v#v#v#F#J#K#L#u V ` X V U V G#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#N#O#X V U V ` X y#P#Q#n#s#v#v#v#v#R#S#", 710 | "8#u#F#v#v#v#F#J#K#L#u X V X X V Y G#T# . . . . . . . . . . . . . . . . . . . . . . . . .U#N#V#H#X X Y Z X y#P#Q#n#s#v#v#v#v#R#S#", 711 | "8#u#W#v#0#0#F#J#K#X#u X ` Y Z V Y G#M#M# . . . . . . . . . . . . . . . . . . . . .Y# .M#M#N#Z#`#Y V Y X Z $.$+$n#@$0#0#0#0##$$$", 712 | "8#%$W#0#0#0#W#J#K#X#u Z Z Y Y Z Z G#T#T#M# .&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$*$M#T#T#N#Z#`#Y Z Z Z Z =$-$;$>$@$0#0#0#0#,$'$", 713 | "8#%$)$0#0#0#W#J#K#X#u ` ` Y ` ` U G#M#M# . .&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$&$*$Y#M#M#N#Z#`#Z ` U ` ` !$~$;${$@$m#m#m#m#,$'$", 714 | "8#]$^$/$/$/$($_$:$X#u U Z ` Z U U G#T#T#M# .M#<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$M#*$M#T#T#N#Z#`#Z U U Z ` !$[$}$|$/$/$/$/$/$1$'$", 715 | "8#]$^$/$/$/$($_$:$X#u (.` ` U U U G#M#M# . .M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#*$Y#M#M#N#Z#`#` U (.g.` !$[$}$|$/$/$/$/$/$1$'$", 716 | "8#%$2$3$3$3$($4$5$6$u (.` U (.Y V.G#T#T#M# .M#<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$M#*$M#T#T#N#Z#`#(.Y g.Z ` 7$[$8$9$0$3$3$3$3$,$'$", 717 | "8#a$b$)$)$)$($c$5$d$u y.U U g.U (.G#Y#*$ . .M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#*$ . .U#N#Z#`#g.U U y.(.<$e$f$g$)$)$)$)$)$,$'$", 718 | "8#a$b$)$)$)$($c$5$d$u U W.U (.y.g.G#Y#*$ . .M#<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$M#*$ . .U#N#Z#`#(.y.y.g.g.<$e$f$g$)$)$)$)$)$h$'$", 719 | "8#a$b$)$^$^$i$j$k$l$W W.U V.g.g.V.G#Y#*$ . .M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#*$ . .U#N#Z#`#g.g.V.V.V.t+m$f$g$)$^$^$^$^$n$o$", 720 | "8#a$b$)$^$^$p$j$q$l$W (.W.V.g.V.y.G#Y#*$ . .M#<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$M#*$ . .U#N#Z#`#g.V.g.g.V.t+m$f$g$)$^$^$^$^$r$o$", 721 | "8#a$b$^$^$^$p$j$q$l$W V.s$V.V.M#M#G#Y#*$ . .M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#M#*$ . .U#N#Z#`#V.M#M#Y+W.t$m$u$v$^$^$^$^$^$w$x$", 722 | "8#y$z$^$^$^$p$j$q$A$V W.W.V.y.M#W.G#Y#*$ .*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$ . .U#N#Z#`#V.M#W.y.W.B$C$D$E$^$^$^$^$^$w$F$", 723 | "8#y$z$^$^$^$p$j$q$A$X V.G$V.M#W.W.G#Y#*$ . . . . . . . . . . . . . . . . . . . . . . . .U#N#Z#`#W.W.H$I$W.B$J$D$E$^$^$^$^$^$w$F$", 724 | "8#K$L$M$2$2$N$O$P$Q$Z :+}.W.:+}.7+G#Y#*$ . . . . . . . . .R$M#R$M#R$M# . . . . . . . . .U#N#Z#`#M#}.}.z M#S$T$U$E$V$2$2$2$2$w$F$", 725 | "8#K$L$M$2$2$N$O$P$Q$Z Y+W$W.7+j.G$G#Y#*$ . . . . . . . .R$M#R$M#R$M# . . . . . . . . . .U#N#Z#`#7+j.j.j.Y+X$Y$U$E$2$2$2$2$2$w$F$", 726 | "8#K$Z$`$ % %.%O$+%Q$` @%6+Y+j+6+z G#Y#*$ . . . . . . . . . . . . . . . . . . . . . . . .U#N#Z#`#@%6+P+7+I$X$Y$#%$%`$ % % % %w$F$", 727 | "8#K$Z$ % % %%%&%*%=%(.Y+b+s$G$6+-%G#Y#*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$U#N#Z#`#@%b+;%s$I$X$e$>%,% % % % % %w$F$", 728 | "8#K$Z$ % % %%%&%*%'%(.j+i+s$y#j.j.H#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#N#w V#H#)%j.j+s$I$X$e$>%,% % % % % %w$F$", 729 | "8#!%~%{%L$L$]%^%/%A$g.(%|.I$(%|.|._%O#V#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#Z#V#O#I$(%|.|.|.i+:%e$<%[%}%L$L$L$L$|%1%", 730 | "8#2%~%{%L$L$]%^%3%A$g.(%|.I$(%|.;%_%|.H#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#`#H#|.I$(%|.|.|.i+:%4%<%5%L$L$L$L$L$6%1%", 731 | "7%8%9%0%L$L$]%^%3%l$a%A+|.-%s+|.|.;%|.i+b%|.)%(%_%(%|.|.c%|.|.;%b%|.|.b%|.-%d%)%e%|._%(%|.s+s+-%s+|.|.|.i+:%4%f%g%L$L$h%Z$&%i%j%", 732 | "k%l%m%n%z$L$]%^%3%o%p%E+s+i+E+s+|.q%s+|.E+s+|.E+|.E+s+s+s+s+s+|.E+s+|.E+s+i+E+|.b%|.|.E+s+s+s+i+E+s+s+s+i+:%r%s%t%L$L$u%v%w%x%y%", 733 | "z%A%B%9%C%L$]%^%3%o%p%E+s+i+E+s+|.|.s+|.E+s+|.E+|.E+s+s+s+s+s+|.E+s+|.E+s+i+E+|.E+s+|.E+s+s+s+i+E+s+s+s+i+:%r%s%D%L$L$b$E%F%G%H%", 734 | " I%J%K%L%M%N%O%P%Q%R%S%T%U%T%T%T%T%T%T%T%T%T%V%T%V%T%T%T%T%T%T%T%T%T%T%T%U%T%V%W%W%V%V%T%T%T%U%T%T%T%T%X%Y%Z%`% &.&M%+&@&#&$& ", 735 | " %&&&*&=&-&;&>&,&'&0 '&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&)&7 !&~&{&]&^&=&/&(&_& "}; 736 | -------------------------------------------------------------------------------- /setupwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef SETUPWINDOW_H 2 | #define SETUPWINDOW_H 3 | 4 | #include 5 | #include "config.h" 6 | 7 | #define SETUPTYPE_FULL 0 8 | #define SETUPTYPE_EXTRACT 1 9 | #define SETUPTYPE_INSERT 2 10 | 11 | 12 | namespace Ui { 13 | class SetupWindow; 14 | } 15 | 16 | class SetupWindow : public QDialog 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit SetupWindow(QWidget *parent = 0, int SetupType = SETUPTYPE_FULL); 22 | ~SetupWindow(); 23 | void UpdateFromConfig(); 24 | Config *SetupConfig; 25 | void SetExtractInsertFilename(QString filename); 26 | 27 | //signals: 28 | //SetupAccepted(); 29 | 30 | private slots: 31 | void on_SetupWindow_accepted(); 32 | 33 | void on_comboBox_ExtractMode_currentIndexChanged(int index); 34 | 35 | void on_comboBox_InsertMode_currentIndexChanged(int index); 36 | 37 | void on_radioButton_pressed(); 38 | 39 | void on_radioButton_2_pressed(); 40 | 41 | void on_radioButton_3_pressed(); 42 | 43 | void on_checkBox_ExtractSys_toggled(bool checked); 44 | 45 | void on_checkBox_FillSysZeros_toggled(bool checked); 46 | 47 | void on_checkBox_ExtractName_toggled(bool checked); 48 | 49 | void on_checkBox_ExtractComment_toggled(bool checked); 50 | 51 | void on_checkBox_ExtractDateTime_toggled(bool checked); 52 | 53 | void on_checkBox_ExtractSize_toggled(bool checked); 54 | 55 | void on_checkBox_ExtractSAT_toggled(bool checked); 56 | 57 | void on_checkBox_ExtractLanguage_toggled(bool checked); 58 | 59 | void on_checkBox_ExtractSysAll_toggled(bool checked); 60 | 61 | void on_checkBox_InsertSys_toggled(bool checked); 62 | 63 | void on_checkBox_InsertSysUseCounter_toggled(bool checked); 64 | 65 | void on_checkBox_InsertName_toggled(bool checked); 66 | 67 | void on_checkBox_InsertComment_toggled(bool checked); 68 | 69 | void on_checkBox_InsertDatetime_toggled(bool checked); 70 | 71 | void on_checkBox_InsertSize_toggled(bool checked); 72 | 73 | void on_checkBox_InsertSAT_toggled(bool checked); 74 | 75 | void on_checkBox_InsertLanguage_toggled(bool checked); 76 | 77 | void on_checkBox_ShowHex_toggled(bool checked); 78 | 79 | void on_checkBox_InsertSysAll_toggled(bool checked); 80 | 81 | void on_checkBox_Ask_Every_Extract_toggled(bool checked); 82 | 83 | void on_checkBox_Ask_Every_Insert_toggled(bool checked); 84 | 85 | private: 86 | Ui::SetupWindow *ui; 87 | int iSetupType; 88 | }; 89 | 90 | #endif // SETUPWINDOW_H 91 | -------------------------------------------------------------------------------- /setupwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SetupWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 676 10 | 461 11 | 12 | 13 | 14 | Sega Saturn RAM Backup parser 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 1 24 | 25 | 26 | 27 | Common 28 | 29 | 30 | 31 | 32 | 33 | Show hex values 34 | 35 | 36 | 37 | 38 | 39 | 40 | Qt::Vertical 41 | 42 | 43 | 44 | 20 45 | 40 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | Extract 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Extraction mode 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | Legend: 77 | 78 | 79 | 80 | 81 | 82 | 83 | L1 84 | 85 | 86 | 87 | 88 | 89 | 90 | Sys header 91 | 92 | 93 | 94 | 95 | 96 | 97 | L2 98 | 99 | 100 | 101 | 102 | 103 | 104 | Start mark 105 | 106 | 107 | 108 | 109 | 110 | 111 | L3 112 | 113 | 114 | 115 | 116 | 117 | 118 | Counter 119 | 120 | 121 | 122 | 123 | 124 | 125 | L4 126 | 127 | 128 | 129 | 130 | 131 | 132 | Name 133 | 134 | 135 | 136 | 137 | 138 | 139 | L5 140 | 141 | 142 | 143 | 144 | 145 | 146 | Language 147 | 148 | 149 | 150 | 151 | 152 | 153 | L6 154 | 155 | 156 | 157 | 158 | 159 | 160 | Comment 161 | 162 | 163 | 164 | 165 | 166 | 167 | L7 168 | 169 | 170 | 171 | 172 | 173 | 174 | Date/time 175 | 176 | 177 | 178 | 179 | 180 | 181 | L8 182 | 183 | 184 | 185 | 186 | 187 | 188 | Size 189 | 190 | 191 | 192 | 193 | 194 | 195 | L9 196 | 197 | 198 | 199 | 200 | 201 | 202 | Alloc.table 203 | 204 | 205 | 206 | 207 | 208 | 209 | L10 210 | 211 | 212 | 213 | 214 | 215 | 216 | Data(not to scale) 217 | 218 | 219 | 220 | 221 | 222 | 223 | L11 224 | 225 | 226 | 227 | 228 | 229 | 230 | Empty 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | -> 240 | 241 | 242 | 243 | 244 | 245 | 246 | In file 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | Add 1st sys header 256 | 257 | 258 | 259 | 260 | 261 | 262 | Add 2.. sys headers 263 | 264 | 265 | 266 | 267 | 268 | 269 | Fill sys headers with zeros 270 | 271 | 272 | 273 | 274 | 275 | 276 | Add name 277 | 278 | 279 | 280 | 281 | 282 | 283 | Add language code 284 | 285 | 286 | 287 | 288 | 289 | 290 | Add comment 291 | 292 | 293 | 294 | 295 | 296 | 297 | Add date and time 298 | 299 | 300 | 301 | 302 | 303 | 304 | Add size in bytes 305 | 306 | 307 | 308 | 309 | 310 | 311 | Add allocation table 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | In image 321 | 322 | 323 | 324 | 325 | 326 | 327 | Sexy table here 328 | 329 | 330 | 331 | 332 | 333 | 334 | Sexy table here 335 | 336 | 337 | 338 | 339 | 340 | 341 | Ask for mode at every extract 342 | 343 | 344 | 345 | 346 | 347 | 348 | Extraction mode is ignored for .bup and .xml 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | Insert 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | Insertion mode 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | Use 1st sys header 379 | 380 | 381 | 382 | 383 | 384 | 385 | Use 2.. sys headers 386 | 387 | 388 | 389 | 390 | 391 | 392 | Use counter in sys header 393 | 394 | 395 | 396 | 397 | 398 | 399 | Use name 400 | 401 | 402 | 403 | 404 | 405 | 406 | Use language code 407 | 408 | 409 | 410 | 411 | 412 | 413 | Use comment 414 | 415 | 416 | 417 | 418 | 419 | 420 | Use date and time 421 | 422 | 423 | 424 | 425 | 426 | 427 | Use size 428 | 429 | 430 | 431 | 432 | 433 | 434 | Use allocation table 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | Legend: 446 | 447 | 448 | 449 | 450 | 451 | 452 | L1 453 | 454 | 455 | 456 | 457 | 458 | 459 | Sys header 460 | 461 | 462 | 463 | 464 | 465 | 466 | L2 467 | 468 | 469 | 470 | 471 | 472 | 473 | Start mark 474 | 475 | 476 | 477 | 478 | 479 | 480 | L3 481 | 482 | 483 | 484 | 485 | 486 | 487 | Counter 488 | 489 | 490 | 491 | 492 | 493 | 494 | L4 495 | 496 | 497 | 498 | 499 | 500 | 501 | Name 502 | 503 | 504 | 505 | 506 | 507 | 508 | L5 509 | 510 | 511 | 512 | 513 | 514 | 515 | Language 516 | 517 | 518 | 519 | 520 | 521 | 522 | L6 523 | 524 | 525 | 526 | 527 | 528 | 529 | Comment 530 | 531 | 532 | 533 | 534 | 535 | 536 | L7 537 | 538 | 539 | 540 | 541 | 542 | 543 | Date/time 544 | 545 | 546 | 547 | 548 | 549 | 550 | L8 551 | 552 | 553 | 554 | 555 | 556 | 557 | Size 558 | 559 | 560 | 561 | 562 | 563 | 564 | L9 565 | 566 | 567 | 568 | 569 | 570 | 571 | Alloc.table 572 | 573 | 574 | 575 | 576 | 577 | 578 | L10 579 | 580 | 581 | 582 | 583 | 584 | 585 | Data(not to scale) 586 | 587 | 588 | 589 | 590 | 591 | 592 | L11 593 | 594 | 595 | 596 | 597 | 598 | 599 | Empty 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | Sexy table here too 609 | 610 | 611 | 612 | 613 | 614 | 615 | Sexy table here 616 | 617 | 618 | 619 | 620 | 621 | 622 | In file 623 | 624 | 625 | 626 | 627 | 628 | 629 | In Image 630 | 631 | 632 | 633 | 634 | 635 | 636 | -> 637 | 638 | 639 | 640 | 641 | 642 | 643 | Ask for mode at every insert 644 | 645 | 646 | 647 | 648 | 649 | 650 | Insertion mode is ignored for .bup and .xml 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | Delete 659 | 660 | 661 | 662 | 663 | 664 | Deletion mode 665 | 666 | 667 | 668 | 669 | 670 | 671 | Delete only first sys header 672 | 673 | 674 | 675 | 676 | 677 | 678 | Delete all sys headers 679 | 680 | 681 | 682 | 683 | 684 | 685 | Delete entire data 686 | 687 | 688 | 689 | 690 | 691 | 692 | Qt::Vertical 693 | 694 | 695 | 696 | 20 697 | 40 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | Hardware 707 | 708 | 709 | 710 | 711 | 712 | Hardware interfaces are not supported yet. 713 | 714 | 715 | 716 | 717 | 718 | 719 | Maybe a USB cart dedicated to this software will appear later. 720 | 721 | 722 | 723 | 724 | 725 | 726 | Meanwile i'm in a search for a less cardinal solution (maybe serial port?) 727 | 728 | 729 | 730 | 731 | 732 | 733 | You are welcome to propose any hardware solution to interface Saturn. 734 | 735 | 736 | 737 | 738 | 739 | 740 | Qt::Vertical 741 | 742 | 743 | 744 | 20 745 | 40 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | Qt::Horizontal 758 | 759 | 760 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | buttonBox 770 | accepted() 771 | SetupWindow 772 | accept() 773 | 774 | 775 | 248 776 | 254 777 | 778 | 779 | 157 780 | 274 781 | 782 | 783 | 784 | 785 | buttonBox 786 | rejected() 787 | SetupWindow 788 | reject() 789 | 790 | 791 | 316 792 | 260 793 | 794 | 795 | 286 796 | 274 797 | 798 | 799 | 800 | 801 | 802 | -------------------------------------------------------------------------------- /sys_header_counter.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\_Git\ss_save_parser\sys_header_counter_xpm[] = { 3 | "10 10 3 1", 4 | " c #000000", 5 | ". c #FF0000", 6 | "+ c #FFFF00", 7 | " ", 8 | " ........ ", 9 | " ........ ", 10 | " ..++++.. ", 11 | " ..++++.. ", 12 | " ..++++.. ", 13 | " ..++++.. ", 14 | " ........ ", 15 | " ........ ", 16 | " "}; 17 | -------------------------------------------------------------------------------- /sys_header_start.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * C:\Saturn\_Git\ss_save_parser\sys_header_start_xpm[] = { 3 | "10 10 3 1", 4 | " c #000000", 5 | ". c #FF0000", 6 | "+ c #00FF00", 7 | " ", 8 | " ........ ", 9 | " ........ ", 10 | " ..++++.. ", 11 | " ..++++.. ", 12 | " ..++++.. ", 13 | " ..++++.. ", 14 | " ........ ", 15 | " ........ ", 16 | " "}; 17 | --------------------------------------------------------------------------------