cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

opcodes_cb.cpp (23681B)


      1/*
      2 * Gearboy - Nintendo Game Boy Emulator
      3 * Copyright (C) 2012  Ignacio Sanchez
      4
      5 * This program is free software: you can redistribute it and/or modify
      6 * it under the terms of the GNU General Public License as published by
      7 * the Free Software Foundation, either version 3 of the License, or
      8 * any later version.
      9
     10 * This program is distributed in the hope that it will be useful,
     11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     13 * GNU General Public License for more details.
     14
     15 * You should have received a copy of the GNU General Public License
     16 * along with this program.  If not, see http://www.gnu.org/licenses/ 
     17 * 
     18 */
     19
     20#include "Processor.h"
     21
     22void Processor::OPCodeCB0x00()
     23{
     24    // RLC B
     25    OPCodes_RLC(BC.GetHighRegister());
     26}
     27
     28void Processor::OPCodeCB0x01()
     29{
     30    // RLC C
     31    OPCodes_RLC(BC.GetLowRegister());
     32}
     33
     34void Processor::OPCodeCB0x02()
     35{
     36    // RLC D
     37    OPCodes_RLC(DE.GetHighRegister());
     38}
     39
     40void Processor::OPCodeCB0x03()
     41{
     42    // RLC E
     43    OPCodes_RLC(DE.GetLowRegister());
     44}
     45
     46void Processor::OPCodeCB0x04()
     47{
     48    // RLC H
     49    OPCodes_RLC(HL.GetHighRegister());
     50}
     51
     52void Processor::OPCodeCB0x05()
     53{
     54    // RLC L
     55    OPCodes_RLC(HL.GetLowRegister());
     56}
     57
     58void Processor::OPCodeCB0x06()
     59{
     60    // RLC (HL)
     61    OPCodes_RLC_HL();
     62}
     63
     64void Processor::OPCodeCB0x07()
     65{
     66    // RLC A
     67    OPCodes_RLC(AF.GetHighRegister());
     68}
     69
     70void Processor::OPCodeCB0x08()
     71{
     72    // RRC B
     73    OPCodes_RRC(BC.GetHighRegister());
     74}
     75
     76void Processor::OPCodeCB0x09()
     77{
     78    // RRC C
     79    OPCodes_RRC(BC.GetLowRegister());
     80}
     81
     82void Processor::OPCodeCB0x0A()
     83{
     84    // RRC D
     85    OPCodes_RRC(DE.GetHighRegister());
     86}
     87
     88void Processor::OPCodeCB0x0B()
     89{
     90    // RRC E
     91    OPCodes_RRC(DE.GetLowRegister());
     92}
     93
     94void Processor::OPCodeCB0x0C()
     95{
     96    // RRC H
     97    OPCodes_RRC(HL.GetHighRegister());
     98}
     99
    100void Processor::OPCodeCB0x0D()
    101{
    102    // RRC L
    103    OPCodes_RRC(HL.GetLowRegister());
    104}
    105
    106void Processor::OPCodeCB0x0E()
    107{
    108    // RRC (HL)
    109    OPCodes_RRC_HL();
    110}
    111
    112void Processor::OPCodeCB0x0F()
    113{
    114    // RRC A
    115    OPCodes_RRC(AF.GetHighRegister());
    116}
    117
    118void Processor::OPCodeCB0x10()
    119{
    120    // RL B
    121    OPCodes_RL(BC.GetHighRegister());
    122}
    123
    124void Processor::OPCodeCB0x11()
    125{
    126    // RL C
    127    OPCodes_RL(BC.GetLowRegister());
    128}
    129
    130void Processor::OPCodeCB0x12()
    131{
    132    // RL D
    133    OPCodes_RL(DE.GetHighRegister());
    134}
    135
    136void Processor::OPCodeCB0x13()
    137{
    138    // RL E
    139    OPCodes_RL(DE.GetLowRegister());
    140}
    141
    142void Processor::OPCodeCB0x14()
    143{
    144    // RL H
    145    OPCodes_RL(HL.GetHighRegister());
    146}
    147
    148void Processor::OPCodeCB0x15()
    149{
    150    // RL L
    151    OPCodes_RL(HL.GetLowRegister());
    152}
    153
    154void Processor::OPCodeCB0x16()
    155{
    156    // RL (HL)
    157    OPCodes_RL_HL();
    158}
    159
    160void Processor::OPCodeCB0x17()
    161{
    162    // RL A
    163    OPCodes_RL(AF.GetHighRegister());
    164}
    165
    166void Processor::OPCodeCB0x18()
    167{
    168    // RR B
    169    OPCodes_RR(BC.GetHighRegister());
    170}
    171
    172void Processor::OPCodeCB0x19()
    173{
    174    // RR C
    175    OPCodes_RR(BC.GetLowRegister());
    176}
    177
    178void Processor::OPCodeCB0x1A()
    179{
    180    // RR D
    181    OPCodes_RR(DE.GetHighRegister());
    182}
    183
    184void Processor::OPCodeCB0x1B()
    185{
    186    // RR E
    187    OPCodes_RR(DE.GetLowRegister());
    188}
    189
    190void Processor::OPCodeCB0x1C()
    191{
    192    // RR H
    193    OPCodes_RR(HL.GetHighRegister());
    194}
    195
    196void Processor::OPCodeCB0x1D()
    197{
    198    // RR L
    199    OPCodes_RR(HL.GetLowRegister());
    200}
    201
    202void Processor::OPCodeCB0x1E()
    203{
    204    // RR (HL)
    205    OPCodes_RR_HL();
    206}
    207
    208void Processor::OPCodeCB0x1F()
    209{
    210    // RR A
    211    OPCodes_RR(AF.GetHighRegister());
    212}
    213
    214void Processor::OPCodeCB0x20()
    215{
    216    // SLA B
    217    OPCodes_SLA(BC.GetHighRegister());
    218}
    219
    220void Processor::OPCodeCB0x21()
    221{
    222    // SLA C
    223    OPCodes_SLA(BC.GetLowRegister());
    224}
    225
    226void Processor::OPCodeCB0x22()
    227{
    228    // SLA D
    229    OPCodes_SLA(DE.GetHighRegister());
    230}
    231
    232void Processor::OPCodeCB0x23()
    233{
    234    // SLA E
    235    OPCodes_SLA(DE.GetLowRegister());
    236}
    237
    238void Processor::OPCodeCB0x24()
    239{
    240    // SLA H
    241    OPCodes_SLA(HL.GetHighRegister());
    242}
    243
    244void Processor::OPCodeCB0x25()
    245{
    246    // SLA L
    247    OPCodes_SLA(HL.GetLowRegister());
    248}
    249
    250void Processor::OPCodeCB0x26()
    251{
    252    // SLA (HL)
    253    OPCodes_SLA_HL();
    254}
    255
    256void Processor::OPCodeCB0x27()
    257{
    258    // SLA A
    259    OPCodes_SLA(AF.GetHighRegister());
    260}
    261
    262void Processor::OPCodeCB0x28()
    263{
    264    // SRA B
    265    OPCodes_SRA(BC.GetHighRegister());
    266}
    267
    268void Processor::OPCodeCB0x29()
    269{
    270    // SRA C
    271    OPCodes_SRA(BC.GetLowRegister());
    272}
    273
    274void Processor::OPCodeCB0x2A()
    275{
    276    // SRA D
    277    OPCodes_SRA(DE.GetHighRegister());
    278}
    279
    280void Processor::OPCodeCB0x2B()
    281{
    282    // SRA E
    283    OPCodes_SRA(DE.GetLowRegister());
    284}
    285
    286void Processor::OPCodeCB0x2C()
    287{
    288    // SRA H
    289    OPCodes_SRA(HL.GetHighRegister());
    290}
    291
    292void Processor::OPCodeCB0x2D()
    293{
    294    // SRA L
    295    OPCodes_SRA(HL.GetLowRegister());
    296}
    297
    298void Processor::OPCodeCB0x2E()
    299{
    300    // SRA (HL)
    301    OPCodes_SRA_HL();
    302}
    303
    304void Processor::OPCodeCB0x2F()
    305{
    306    // SRA A
    307    OPCodes_SRA(AF.GetHighRegister());
    308}
    309
    310void Processor::OPCodeCB0x30()
    311{
    312    // SWAP B
    313    OPCodes_SWAP_Register(BC.GetHighRegister());
    314}
    315
    316void Processor::OPCodeCB0x31()
    317{
    318    // SWAP C
    319    OPCodes_SWAP_Register(BC.GetLowRegister());
    320}
    321
    322void Processor::OPCodeCB0x32()
    323{
    324    // SWAP D
    325    OPCodes_SWAP_Register(DE.GetHighRegister());
    326}
    327
    328void Processor::OPCodeCB0x33()
    329{
    330    // SWAP E
    331    OPCodes_SWAP_Register(DE.GetLowRegister());
    332}
    333
    334void Processor::OPCodeCB0x34()
    335{
    336    // SWAP H
    337    OPCodes_SWAP_Register(HL.GetHighRegister());
    338}
    339
    340void Processor::OPCodeCB0x35()
    341{
    342    // SWAP L
    343    OPCodes_SWAP_Register(HL.GetLowRegister());
    344}
    345
    346void Processor::OPCodeCB0x36()
    347{
    348    // SWAP (HL)
    349    OPCodes_SWAP_HL();
    350}
    351
    352void Processor::OPCodeCB0x37()
    353{
    354    // SWAP A
    355    OPCodes_SWAP_Register(AF.GetHighRegister());
    356}
    357
    358void Processor::OPCodeCB0x38()
    359{
    360    // SRL B
    361    OPCodes_SRL(BC.GetHighRegister());
    362}
    363
    364void Processor::OPCodeCB0x39()
    365{
    366    // SRL C
    367    OPCodes_SRL(BC.GetLowRegister());
    368}
    369
    370void Processor::OPCodeCB0x3A()
    371{
    372    // SRL D
    373    OPCodes_SRL(DE.GetHighRegister());
    374}
    375
    376void Processor::OPCodeCB0x3B()
    377{
    378    // SRL E
    379    OPCodes_SRL(DE.GetLowRegister());
    380}
    381
    382void Processor::OPCodeCB0x3C()
    383{
    384    // SRL H
    385    OPCodes_SRL(HL.GetHighRegister());
    386}
    387
    388void Processor::OPCodeCB0x3D()
    389{
    390    // SRL L
    391    OPCodes_SRL(HL.GetLowRegister());
    392}
    393
    394void Processor::OPCodeCB0x3E()
    395{
    396    // SRL (HL)
    397    OPCodes_SRL_HL();
    398}
    399
    400void Processor::OPCodeCB0x3F()
    401{
    402    // SRL A
    403    OPCodes_SRL(AF.GetHighRegister());
    404}
    405
    406void Processor::OPCodeCB0x40()
    407{
    408    // BIT 0 B
    409    OPCodes_BIT(BC.GetHighRegister(), 0);
    410}
    411
    412void Processor::OPCodeCB0x41()
    413{
    414    // BIT 0 C
    415    OPCodes_BIT(BC.GetLowRegister(), 0);
    416}
    417
    418void Processor::OPCodeCB0x42()
    419{
    420    // BIT 0 D
    421    OPCodes_BIT(DE.GetHighRegister(), 0);
    422}
    423
    424void Processor::OPCodeCB0x43()
    425{
    426    // BIT 0 E
    427    OPCodes_BIT(DE.GetLowRegister(), 0);
    428}
    429
    430void Processor::OPCodeCB0x44()
    431{
    432    // BIT 0 H
    433    OPCodes_BIT(HL.GetHighRegister(), 0);
    434}
    435
    436void Processor::OPCodeCB0x45()
    437{
    438    // BIT 0 L
    439    OPCodes_BIT(HL.GetLowRegister(), 0);
    440}
    441
    442void Processor::OPCodeCB0x46()
    443{
    444    // BIT 0 (HL)
    445    OPCodes_BIT_HL(0);
    446}
    447
    448void Processor::OPCodeCB0x47()
    449{
    450    // BIT 0 A
    451    OPCodes_BIT(AF.GetHighRegister(), 0);
    452}
    453
    454void Processor::OPCodeCB0x48()
    455{
    456    // BIT 1 B
    457    OPCodes_BIT(BC.GetHighRegister(), 1);
    458}
    459
    460void Processor::OPCodeCB0x49()
    461{
    462    // BIT 1 C
    463    OPCodes_BIT(BC.GetLowRegister(), 1);
    464}
    465
    466void Processor::OPCodeCB0x4A()
    467{
    468    // BIT 1 D
    469    OPCodes_BIT(DE.GetHighRegister(), 1);
    470}
    471
    472void Processor::OPCodeCB0x4B()
    473{
    474    // BIT 1 E
    475    OPCodes_BIT(DE.GetLowRegister(), 1);
    476}
    477
    478void Processor::OPCodeCB0x4C()
    479{
    480    // BIT 1 H
    481    OPCodes_BIT(HL.GetHighRegister(), 1);
    482}
    483
    484void Processor::OPCodeCB0x4D()
    485{
    486    // BIT 1 L
    487    OPCodes_BIT(HL.GetLowRegister(), 1);
    488}
    489
    490void Processor::OPCodeCB0x4E()
    491{
    492    // BIT 1 (HL)
    493    OPCodes_BIT_HL(1);
    494}
    495
    496void Processor::OPCodeCB0x4F()
    497{
    498    // BIT 1 A
    499    OPCodes_BIT(AF.GetHighRegister(), 1);
    500}
    501
    502void Processor::OPCodeCB0x50()
    503{
    504    // BIT 2 B
    505    OPCodes_BIT(BC.GetHighRegister(), 2);
    506}
    507
    508void Processor::OPCodeCB0x51()
    509{
    510    // BIT 2 C
    511    OPCodes_BIT(BC.GetLowRegister(), 2);
    512}
    513
    514void Processor::OPCodeCB0x52()
    515{
    516    // BIT 2 D
    517    OPCodes_BIT(DE.GetHighRegister(), 2);
    518}
    519
    520void Processor::OPCodeCB0x53()
    521{
    522    // BIT 2 E
    523    OPCodes_BIT(DE.GetLowRegister(), 2);
    524}
    525
    526void Processor::OPCodeCB0x54()
    527{
    528    // BIT 2 H
    529    OPCodes_BIT(HL.GetHighRegister(), 2);
    530}
    531
    532void Processor::OPCodeCB0x55()
    533{
    534    // BIT 2 L
    535    OPCodes_BIT(HL.GetLowRegister(), 2);
    536}
    537
    538void Processor::OPCodeCB0x56()
    539{
    540    // BIT 2 (HL)
    541    OPCodes_BIT_HL(2);
    542}
    543
    544void Processor::OPCodeCB0x57()
    545{
    546    // BIT 2 A
    547    OPCodes_BIT(AF.GetHighRegister(), 2);
    548}
    549
    550void Processor::OPCodeCB0x58()
    551{
    552    // BIT 3 B
    553    OPCodes_BIT(BC.GetHighRegister(), 3);
    554}
    555
    556void Processor::OPCodeCB0x59()
    557{
    558    // BIT 3 C
    559    OPCodes_BIT(BC.GetLowRegister(), 3);
    560}
    561
    562void Processor::OPCodeCB0x5A()
    563{
    564    // BIT 3 D
    565    OPCodes_BIT(DE.GetHighRegister(), 3);
    566}
    567
    568void Processor::OPCodeCB0x5B()
    569{
    570    // BIT 3 E
    571    OPCodes_BIT(DE.GetLowRegister(), 3);
    572}
    573
    574void Processor::OPCodeCB0x5C()
    575{
    576    // BIT 3 H
    577    OPCodes_BIT(HL.GetHighRegister(), 3);
    578}
    579
    580void Processor::OPCodeCB0x5D()
    581{
    582    // BIT 3 L
    583    OPCodes_BIT(HL.GetLowRegister(), 3);
    584}
    585
    586void Processor::OPCodeCB0x5E()
    587{
    588    // BIT 3 (HL)
    589    OPCodes_BIT_HL(3);
    590}
    591
    592void Processor::OPCodeCB0x5F()
    593{
    594    // BIT 3 A
    595    OPCodes_BIT(AF.GetHighRegister(), 3);
    596}
    597
    598void Processor::OPCodeCB0x60()
    599{
    600    // BIT 4 B
    601    OPCodes_BIT(BC.GetHighRegister(), 4);
    602}
    603
    604void Processor::OPCodeCB0x61()
    605{
    606    // BIT 4 C
    607    OPCodes_BIT(BC.GetLowRegister(), 4);
    608}
    609
    610void Processor::OPCodeCB0x62()
    611{
    612    // BIT 4 D
    613    OPCodes_BIT(DE.GetHighRegister(), 4);
    614}
    615
    616void Processor::OPCodeCB0x63()
    617{
    618    // BIT 4 E
    619    OPCodes_BIT(DE.GetLowRegister(), 4);
    620}
    621
    622void Processor::OPCodeCB0x64()
    623{
    624    // BIT 4 H
    625    OPCodes_BIT(HL.GetHighRegister(), 4);
    626}
    627
    628void Processor::OPCodeCB0x65()
    629{
    630    // BIT 4 L
    631    OPCodes_BIT(HL.GetLowRegister(), 4);
    632}
    633
    634void Processor::OPCodeCB0x66()
    635{
    636    // BIT 4 (HL)
    637    OPCodes_BIT_HL(4);
    638}
    639
    640void Processor::OPCodeCB0x67()
    641{
    642    // BIT 4 A
    643    OPCodes_BIT(AF.GetHighRegister(), 4);
    644}
    645
    646void Processor::OPCodeCB0x68()
    647{
    648    // BIT 5 B
    649    OPCodes_BIT(BC.GetHighRegister(), 5);
    650}
    651
    652void Processor::OPCodeCB0x69()
    653{
    654    // BIT 5 C
    655    OPCodes_BIT(BC.GetLowRegister(), 5);
    656}
    657
    658void Processor::OPCodeCB0x6A()
    659{
    660    // BIT 5 D
    661    OPCodes_BIT(DE.GetHighRegister(), 5);
    662}
    663
    664void Processor::OPCodeCB0x6B()
    665{
    666    // BIT 5 E
    667    OPCodes_BIT(DE.GetLowRegister(), 5);
    668}
    669
    670void Processor::OPCodeCB0x6C()
    671{
    672    // BIT 5 H
    673    OPCodes_BIT(HL.GetHighRegister(), 5);
    674}
    675
    676void Processor::OPCodeCB0x6D()
    677{
    678    // BIT 5 L
    679    OPCodes_BIT(HL.GetLowRegister(), 5);
    680}
    681
    682void Processor::OPCodeCB0x6E()
    683{
    684    // BIT 5 (HL)
    685    OPCodes_BIT_HL(5);
    686}
    687
    688void Processor::OPCodeCB0x6F()
    689{
    690    // BIT 5 A
    691    OPCodes_BIT(AF.GetHighRegister(), 5);
    692}
    693
    694void Processor::OPCodeCB0x70()
    695{
    696    // BIT 6 B
    697    OPCodes_BIT(BC.GetHighRegister(), 6);
    698}
    699
    700void Processor::OPCodeCB0x71()
    701{
    702    // BIT 6 C
    703    OPCodes_BIT(BC.GetLowRegister(), 6);
    704}
    705
    706void Processor::OPCodeCB0x72()
    707{
    708    // BIT 6 D
    709    OPCodes_BIT(DE.GetHighRegister(), 6);
    710}
    711
    712void Processor::OPCodeCB0x73()
    713{
    714    // BIT 6 E
    715    OPCodes_BIT(DE.GetLowRegister(), 6);
    716}
    717
    718void Processor::OPCodeCB0x74()
    719{
    720    // BIT 6 H
    721    OPCodes_BIT(HL.GetHighRegister(), 6);
    722}
    723
    724void Processor::OPCodeCB0x75()
    725{
    726    // BIT 6 L
    727    OPCodes_BIT(HL.GetLowRegister(), 6);
    728}
    729
    730void Processor::OPCodeCB0x76()
    731{
    732    // BIT 6 (HL)
    733    OPCodes_BIT_HL(6);
    734}
    735
    736void Processor::OPCodeCB0x77()
    737{
    738    // BIT 6 A
    739    OPCodes_BIT(AF.GetHighRegister(), 6);
    740}
    741
    742void Processor::OPCodeCB0x78()
    743{
    744    // BIT 7 B
    745    OPCodes_BIT(BC.GetHighRegister(), 7);
    746}
    747
    748void Processor::OPCodeCB0x79()
    749{
    750    // BIT 7 C
    751    OPCodes_BIT(BC.GetLowRegister(), 7);
    752}
    753
    754void Processor::OPCodeCB0x7A()
    755{
    756    // BIT 7 D
    757    OPCodes_BIT(DE.GetHighRegister(), 7);
    758}
    759
    760void Processor::OPCodeCB0x7B()
    761{
    762    // BIT 7 E
    763    OPCodes_BIT(DE.GetLowRegister(), 7);
    764}
    765
    766void Processor::OPCodeCB0x7C()
    767{
    768    // BIT 7 H
    769    OPCodes_BIT(HL.GetHighRegister(), 7);
    770}
    771
    772void Processor::OPCodeCB0x7D()
    773{
    774    // BIT 7 L
    775    OPCodes_BIT(HL.GetLowRegister(), 7);
    776}
    777
    778void Processor::OPCodeCB0x7E()
    779{
    780    // BIT 7 (HL)
    781    OPCodes_BIT_HL(7);
    782}
    783
    784void Processor::OPCodeCB0x7F()
    785{
    786    // BIT 7 A
    787    OPCodes_BIT(AF.GetHighRegister(), 7);
    788}
    789
    790void Processor::OPCodeCB0x80()
    791{
    792    // RES 0 B
    793    OPCodes_RES(BC.GetHighRegister(), 0);
    794}
    795
    796void Processor::OPCodeCB0x81()
    797{
    798    // RES 0 C
    799    OPCodes_RES(BC.GetLowRegister(), 0);
    800}
    801
    802void Processor::OPCodeCB0x82()
    803{
    804    // RES 0 D
    805    OPCodes_RES(DE.GetHighRegister(), 0);
    806}
    807
    808void Processor::OPCodeCB0x83()
    809{
    810    // RES 0 E
    811    OPCodes_RES(DE.GetLowRegister(), 0);
    812}
    813
    814void Processor::OPCodeCB0x84()
    815{
    816    // RES 0 H
    817    OPCodes_RES(HL.GetHighRegister(), 0);
    818}
    819
    820void Processor::OPCodeCB0x85()
    821{
    822    // RES 0 L
    823    OPCodes_RES(HL.GetLowRegister(), 0);
    824}
    825
    826void Processor::OPCodeCB0x86()
    827{
    828    // RES 0 (HL)
    829    OPCodes_RES_HL(0);
    830}
    831
    832void Processor::OPCodeCB0x87()
    833{
    834    // RES 0 A
    835    OPCodes_RES(AF.GetHighRegister(), 0);
    836}
    837
    838void Processor::OPCodeCB0x88()
    839{
    840    // RES 1 B
    841    OPCodes_RES(BC.GetHighRegister(), 1);
    842}
    843
    844void Processor::OPCodeCB0x89()
    845{
    846    // RES 1 C
    847    OPCodes_RES(BC.GetLowRegister(), 1);
    848}
    849
    850void Processor::OPCodeCB0x8A()
    851{
    852    // RES 1 D
    853    OPCodes_RES(DE.GetHighRegister(), 1);
    854}
    855
    856void Processor::OPCodeCB0x8B()
    857{
    858    // RES 1 E
    859    OPCodes_RES(DE.GetLowRegister(), 1);
    860}
    861
    862void Processor::OPCodeCB0x8C()
    863{
    864    // RES 1 H
    865    OPCodes_RES(HL.GetHighRegister(), 1);
    866}
    867
    868void Processor::OPCodeCB0x8D()
    869{
    870    // RES 1 L
    871    OPCodes_RES(HL.GetLowRegister(), 1);
    872}
    873
    874void Processor::OPCodeCB0x8E()
    875{
    876    // RES 1 (HL)
    877    OPCodes_RES_HL(1);
    878}
    879
    880void Processor::OPCodeCB0x8F()
    881{
    882    // RES 1 A
    883    OPCodes_RES(AF.GetHighRegister(), 1);
    884}
    885
    886void Processor::OPCodeCB0x90()
    887{
    888    // RES 2 B
    889    OPCodes_RES(BC.GetHighRegister(), 2);
    890}
    891
    892void Processor::OPCodeCB0x91()
    893{
    894    // RES 2 C
    895    OPCodes_RES(BC.GetLowRegister(), 2);
    896}
    897
    898void Processor::OPCodeCB0x92()
    899{
    900    // RES 2 D
    901    OPCodes_RES(DE.GetHighRegister(), 2);
    902}
    903
    904void Processor::OPCodeCB0x93()
    905{
    906    // RES 2 E
    907    OPCodes_RES(DE.GetLowRegister(), 2);
    908}
    909
    910void Processor::OPCodeCB0x94()
    911{
    912    // RES 2 H
    913    OPCodes_RES(HL.GetHighRegister(), 2);
    914}
    915
    916void Processor::OPCodeCB0x95()
    917{
    918    // RES 2 L
    919    OPCodes_RES(HL.GetLowRegister(), 2);
    920}
    921
    922void Processor::OPCodeCB0x96()
    923{
    924    // RES 2 (HL)
    925    OPCodes_RES_HL(2);
    926}
    927
    928void Processor::OPCodeCB0x97()
    929{
    930    // RES 2 A
    931    OPCodes_RES(AF.GetHighRegister(), 2);
    932}
    933
    934void Processor::OPCodeCB0x98()
    935{
    936    // RES 3 B
    937    OPCodes_RES(BC.GetHighRegister(), 3);
    938}
    939
    940void Processor::OPCodeCB0x99()
    941{
    942    // RES 3 C
    943    OPCodes_RES(BC.GetLowRegister(), 3);
    944}
    945
    946void Processor::OPCodeCB0x9A()
    947{
    948    // RES 3 D
    949    OPCodes_RES(DE.GetHighRegister(), 3);
    950}
    951
    952void Processor::OPCodeCB0x9B()
    953{
    954    // RES 3 E
    955    OPCodes_RES(DE.GetLowRegister(), 3);
    956}
    957
    958void Processor::OPCodeCB0x9C()
    959{
    960    // RES 3 H
    961    OPCodes_RES(HL.GetHighRegister(), 3);
    962}
    963
    964void Processor::OPCodeCB0x9D()
    965{
    966    // RES 3 L
    967    OPCodes_RES(HL.GetLowRegister(), 3);
    968}
    969
    970void Processor::OPCodeCB0x9E()
    971{
    972    // RES 3 (HL)
    973    OPCodes_RES_HL(3);
    974}
    975
    976void Processor::OPCodeCB0x9F()
    977{
    978    // RES 3 A
    979    OPCodes_RES(AF.GetHighRegister(), 3);
    980}
    981
    982void Processor::OPCodeCB0xA0()
    983{
    984    // RES 4 B
    985    OPCodes_RES(BC.GetHighRegister(), 4);
    986}
    987
    988void Processor::OPCodeCB0xA1()
    989{
    990    // RES 4 C
    991    OPCodes_RES(BC.GetLowRegister(), 4);
    992}
    993
    994void Processor::OPCodeCB0xA2()
    995{
    996    // RES 4 D
    997    OPCodes_RES(DE.GetHighRegister(), 4);
    998}
    999
   1000void Processor::OPCodeCB0xA3()
   1001{
   1002    // RES 4 E
   1003    OPCodes_RES(DE.GetLowRegister(), 4);
   1004}
   1005
   1006void Processor::OPCodeCB0xA4()
   1007{
   1008    // RES 4 H
   1009    OPCodes_RES(HL.GetHighRegister(), 4);
   1010}
   1011
   1012void Processor::OPCodeCB0xA5()
   1013{
   1014    // RES 4 L
   1015    OPCodes_RES(HL.GetLowRegister(), 4);
   1016}
   1017
   1018void Processor::OPCodeCB0xA6()
   1019{
   1020    // RES 4 (HL)
   1021    OPCodes_RES_HL(4);
   1022}
   1023
   1024void Processor::OPCodeCB0xA7()
   1025{
   1026    // RES 4 A
   1027    OPCodes_RES(AF.GetHighRegister(), 4);
   1028}
   1029
   1030void Processor::OPCodeCB0xA8()
   1031{
   1032    // RES 5 B
   1033    OPCodes_RES(BC.GetHighRegister(), 5);
   1034}
   1035
   1036void Processor::OPCodeCB0xA9()
   1037{
   1038    // RES 5 C
   1039    OPCodes_RES(BC.GetLowRegister(), 5);
   1040}
   1041
   1042void Processor::OPCodeCB0xAA()
   1043{
   1044    // RES 5 D
   1045    OPCodes_RES(DE.GetHighRegister(), 5);
   1046}
   1047
   1048void Processor::OPCodeCB0xAB()
   1049{
   1050    // RES 5 E
   1051    OPCodes_RES(DE.GetLowRegister(), 5);
   1052}
   1053
   1054void Processor::OPCodeCB0xAC()
   1055{
   1056    // RES 5 H
   1057    OPCodes_RES(HL.GetHighRegister(), 5);
   1058}
   1059
   1060void Processor::OPCodeCB0xAD()
   1061{
   1062    // RES 5 L
   1063    OPCodes_RES(HL.GetLowRegister(), 5);
   1064}
   1065
   1066void Processor::OPCodeCB0xAE()
   1067{
   1068    // RES 5 (HL)
   1069    OPCodes_RES_HL(5);
   1070}
   1071
   1072void Processor::OPCodeCB0xAF()
   1073{
   1074    // RES 5 A
   1075    OPCodes_RES(AF.GetHighRegister(), 5);
   1076}
   1077
   1078void Processor::OPCodeCB0xB0()
   1079{
   1080    // RES 6 B
   1081    OPCodes_RES(BC.GetHighRegister(), 6);
   1082}
   1083
   1084void Processor::OPCodeCB0xB1()
   1085{
   1086    // RES 6 C
   1087    OPCodes_RES(BC.GetLowRegister(), 6);
   1088}
   1089
   1090void Processor::OPCodeCB0xB2()
   1091{
   1092    // RES 6 D
   1093    OPCodes_RES(DE.GetHighRegister(), 6);
   1094}
   1095
   1096void Processor::OPCodeCB0xB3()
   1097{
   1098    // RES 6 E
   1099    OPCodes_RES(DE.GetLowRegister(), 6);
   1100}
   1101
   1102void Processor::OPCodeCB0xB4()
   1103{
   1104    // RES 6 H
   1105    OPCodes_RES(HL.GetHighRegister(), 6);
   1106}
   1107
   1108void Processor::OPCodeCB0xB5()
   1109{
   1110    // RES 6 L
   1111    OPCodes_RES(HL.GetLowRegister(), 6);
   1112}
   1113
   1114void Processor::OPCodeCB0xB6()
   1115{
   1116    // RES 6 (HL)
   1117    OPCodes_RES_HL(6);
   1118}
   1119
   1120void Processor::OPCodeCB0xB7()
   1121{
   1122    // RES 6 A
   1123    OPCodes_RES(AF.GetHighRegister(), 6);
   1124}
   1125
   1126void Processor::OPCodeCB0xB8()
   1127{
   1128    // RES 7 B
   1129    OPCodes_RES(BC.GetHighRegister(), 7);
   1130}
   1131
   1132void Processor::OPCodeCB0xB9()
   1133{
   1134    // RES 7 C
   1135    OPCodes_RES(BC.GetLowRegister(), 7);
   1136}
   1137
   1138void Processor::OPCodeCB0xBA()
   1139{
   1140    // RES 7 D
   1141    OPCodes_RES(DE.GetHighRegister(), 7);
   1142}
   1143
   1144void Processor::OPCodeCB0xBB()
   1145{
   1146    // RES 7 E
   1147    OPCodes_RES(DE.GetLowRegister(), 7);
   1148}
   1149
   1150void Processor::OPCodeCB0xBC()
   1151{
   1152    // RES 7 H
   1153    OPCodes_RES(HL.GetHighRegister(), 7);
   1154}
   1155
   1156void Processor::OPCodeCB0xBD()
   1157{
   1158    // RES 7 L
   1159    OPCodes_RES(HL.GetLowRegister(), 7);
   1160}
   1161
   1162void Processor::OPCodeCB0xBE()
   1163{
   1164    // RES 7 (HL)
   1165    OPCodes_RES_HL(7);
   1166}
   1167
   1168void Processor::OPCodeCB0xBF()
   1169{
   1170    // RES 7 A
   1171    OPCodes_RES(AF.GetHighRegister(), 7);
   1172}
   1173
   1174void Processor::OPCodeCB0xC0()
   1175{
   1176    // SET 0 B
   1177    OPCodes_SET(BC.GetHighRegister(), 0);
   1178}
   1179
   1180void Processor::OPCodeCB0xC1()
   1181{
   1182    // SET 0 C
   1183    OPCodes_SET(BC.GetLowRegister(), 0);
   1184}
   1185
   1186void Processor::OPCodeCB0xC2()
   1187{
   1188    // SET 0 D
   1189    OPCodes_SET(DE.GetHighRegister(), 0);
   1190}
   1191
   1192void Processor::OPCodeCB0xC3()
   1193{
   1194    // SET 0 E
   1195    OPCodes_SET(DE.GetLowRegister(), 0);
   1196}
   1197
   1198void Processor::OPCodeCB0xC4()
   1199{
   1200    // SET 0 H
   1201    OPCodes_SET(HL.GetHighRegister(), 0);
   1202}
   1203
   1204void Processor::OPCodeCB0xC5()
   1205{
   1206    // SET 0 L
   1207    OPCodes_SET(HL.GetLowRegister(), 0);
   1208}
   1209
   1210void Processor::OPCodeCB0xC6()
   1211{
   1212    // SET 0 (HL)
   1213    OPCodes_SET_HL(0);
   1214}
   1215
   1216void Processor::OPCodeCB0xC7()
   1217{
   1218    // SET 0 A
   1219    OPCodes_SET(AF.GetHighRegister(), 0);
   1220}
   1221
   1222void Processor::OPCodeCB0xC8()
   1223{
   1224    // SET 1 B
   1225    OPCodes_SET(BC.GetHighRegister(), 1);
   1226}
   1227
   1228void Processor::OPCodeCB0xC9()
   1229{
   1230    // SET 1 C
   1231    OPCodes_SET(BC.GetLowRegister(), 1);
   1232}
   1233
   1234void Processor::OPCodeCB0xCA()
   1235{
   1236    // SET 1 D
   1237    OPCodes_SET(DE.GetHighRegister(), 1);
   1238}
   1239
   1240void Processor::OPCodeCB0xCB()
   1241{
   1242    // SET 1 E
   1243    OPCodes_SET(DE.GetLowRegister(), 1);
   1244}
   1245
   1246void Processor::OPCodeCB0xCC()
   1247{
   1248    // SET 1 H
   1249    OPCodes_SET(HL.GetHighRegister(), 1);
   1250}
   1251
   1252void Processor::OPCodeCB0xCD()
   1253{
   1254    // SET 1 L
   1255    OPCodes_SET(HL.GetLowRegister(), 1);
   1256}
   1257
   1258void Processor::OPCodeCB0xCE()
   1259{
   1260    // SET 1 (HL)
   1261    OPCodes_SET_HL(1);
   1262}
   1263
   1264void Processor::OPCodeCB0xCF()
   1265{
   1266    // SET 1 A
   1267    OPCodes_SET(AF.GetHighRegister(), 1);
   1268}
   1269
   1270void Processor::OPCodeCB0xD0()
   1271{
   1272    // SET 2 B
   1273    OPCodes_SET(BC.GetHighRegister(), 2);
   1274}
   1275
   1276void Processor::OPCodeCB0xD1()
   1277{
   1278    // SET 2 C
   1279    OPCodes_SET(BC.GetLowRegister(), 2);
   1280}
   1281
   1282void Processor::OPCodeCB0xD2()
   1283{
   1284    // SET 2 D
   1285    OPCodes_SET(DE.GetHighRegister(), 2);
   1286}
   1287
   1288void Processor::OPCodeCB0xD3()
   1289{
   1290    // SET 2 E
   1291    OPCodes_SET(DE.GetLowRegister(), 2);
   1292}
   1293
   1294void Processor::OPCodeCB0xD4()
   1295{
   1296    // SET 2 H
   1297    OPCodes_SET(HL.GetHighRegister(), 2);
   1298}
   1299
   1300void Processor::OPCodeCB0xD5()
   1301{
   1302    // SET 2 L
   1303    OPCodes_SET(HL.GetLowRegister(), 2);
   1304}
   1305
   1306void Processor::OPCodeCB0xD6()
   1307{
   1308    // SET 2 (HL)
   1309    OPCodes_SET_HL(2);
   1310}
   1311
   1312void Processor::OPCodeCB0xD7()
   1313{
   1314    // SET 2 A
   1315    OPCodes_SET(AF.GetHighRegister(), 2);
   1316}
   1317
   1318void Processor::OPCodeCB0xD8()
   1319{
   1320    // SET 3 B
   1321    OPCodes_SET(BC.GetHighRegister(), 3);
   1322}
   1323
   1324void Processor::OPCodeCB0xD9()
   1325{
   1326    // SET 3 C
   1327    OPCodes_SET(BC.GetLowRegister(), 3);
   1328}
   1329
   1330void Processor::OPCodeCB0xDA()
   1331{
   1332    // SET 3 D
   1333    OPCodes_SET(DE.GetHighRegister(), 3);
   1334}
   1335
   1336void Processor::OPCodeCB0xDB()
   1337{
   1338    // SET 3 E
   1339    OPCodes_SET(DE.GetLowRegister(), 3);
   1340}
   1341
   1342void Processor::OPCodeCB0xDC()
   1343{
   1344    // SET 3 H
   1345    OPCodes_SET(HL.GetHighRegister(), 3);
   1346}
   1347
   1348void Processor::OPCodeCB0xDD()
   1349{
   1350    // SET 3 L
   1351    OPCodes_SET(HL.GetLowRegister(), 3);
   1352}
   1353
   1354void Processor::OPCodeCB0xDE()
   1355{
   1356    // SET 3 (HL)
   1357    OPCodes_SET_HL(3);
   1358}
   1359
   1360void Processor::OPCodeCB0xDF()
   1361{
   1362    // SET 3 A
   1363    OPCodes_SET(AF.GetHighRegister(), 3);
   1364}
   1365
   1366void Processor::OPCodeCB0xE0()
   1367{
   1368    // SET 4 B
   1369    OPCodes_SET(BC.GetHighRegister(), 4);
   1370}
   1371
   1372void Processor::OPCodeCB0xE1()
   1373{
   1374    // SET 4 C
   1375    OPCodes_SET(BC.GetLowRegister(), 4);
   1376}
   1377
   1378void Processor::OPCodeCB0xE2()
   1379{
   1380    // SET 4 D
   1381    OPCodes_SET(DE.GetHighRegister(), 4);
   1382}
   1383
   1384void Processor::OPCodeCB0xE3()
   1385{
   1386    // SET 4 E
   1387    OPCodes_SET(DE.GetLowRegister(), 4);
   1388}
   1389
   1390void Processor::OPCodeCB0xE4()
   1391{
   1392    // SET 4 H
   1393    OPCodes_SET(HL.GetHighRegister(), 4);
   1394}
   1395
   1396void Processor::OPCodeCB0xE5()
   1397{
   1398    // SET 4 L
   1399    OPCodes_SET(HL.GetLowRegister(), 4);
   1400}
   1401
   1402void Processor::OPCodeCB0xE6()
   1403{
   1404    // SET 4 (HL)
   1405    OPCodes_SET_HL(4);
   1406}
   1407
   1408void Processor::OPCodeCB0xE7()
   1409{
   1410    // SET 4 A
   1411    OPCodes_SET(AF.GetHighRegister(), 4);
   1412
   1413}
   1414
   1415void Processor::OPCodeCB0xE8()
   1416{
   1417    // SET 5 B
   1418    OPCodes_SET(BC.GetHighRegister(), 5);
   1419}
   1420
   1421void Processor::OPCodeCB0xE9()
   1422{
   1423    // SET 5 C
   1424    OPCodes_SET(BC.GetLowRegister(), 5);
   1425}
   1426
   1427void Processor::OPCodeCB0xEA()
   1428{
   1429    // SET 5 D
   1430    OPCodes_SET(DE.GetHighRegister(), 5);
   1431}
   1432
   1433void Processor::OPCodeCB0xEB()
   1434{
   1435    // SET 5 E
   1436    OPCodes_SET(DE.GetLowRegister(), 5);
   1437}
   1438
   1439void Processor::OPCodeCB0xEC()
   1440{
   1441    // SET 5 H
   1442    OPCodes_SET(HL.GetHighRegister(), 5);
   1443}
   1444
   1445void Processor::OPCodeCB0xED()
   1446{
   1447    // SET 5 L
   1448    OPCodes_SET(HL.GetLowRegister(), 5);
   1449}
   1450
   1451void Processor::OPCodeCB0xEE()
   1452{
   1453    // SET 5 (HL)
   1454    OPCodes_SET_HL(5);
   1455}
   1456
   1457void Processor::OPCodeCB0xEF()
   1458{
   1459    // SET 5 A
   1460    OPCodes_SET(AF.GetHighRegister(), 5);
   1461}
   1462
   1463void Processor::OPCodeCB0xF0()
   1464{
   1465    // SET 6 B
   1466    OPCodes_SET(BC.GetHighRegister(), 6);
   1467}
   1468
   1469void Processor::OPCodeCB0xF1()
   1470{
   1471    // SET 6 C
   1472    OPCodes_SET(BC.GetLowRegister(), 6);
   1473}
   1474
   1475void Processor::OPCodeCB0xF2()
   1476{
   1477    // SET 6 D
   1478    OPCodes_SET(DE.GetHighRegister(), 6);
   1479}
   1480
   1481void Processor::OPCodeCB0xF3()
   1482{
   1483    // SET 6 E
   1484    OPCodes_SET(DE.GetLowRegister(), 6);
   1485}
   1486
   1487void Processor::OPCodeCB0xF4()
   1488{
   1489    // SET 6 H
   1490    OPCodes_SET(HL.GetHighRegister(), 6);
   1491}
   1492
   1493void Processor::OPCodeCB0xF5()
   1494{
   1495    // SET 6 L
   1496    OPCodes_SET(HL.GetLowRegister(), 6);
   1497}
   1498
   1499void Processor::OPCodeCB0xF6()
   1500{
   1501    // SET 6 (HL)
   1502    OPCodes_SET_HL(6);
   1503}
   1504
   1505void Processor::OPCodeCB0xF7()
   1506{
   1507    // SET 6 A
   1508    OPCodes_SET(AF.GetHighRegister(), 6);
   1509}
   1510
   1511void Processor::OPCodeCB0xF8()
   1512{
   1513    // SET 7 B
   1514    OPCodes_SET(BC.GetHighRegister(), 7);
   1515}
   1516
   1517void Processor::OPCodeCB0xF9()
   1518{
   1519    // SET 7 C
   1520    OPCodes_SET(BC.GetLowRegister(), 7);
   1521}
   1522
   1523void Processor::OPCodeCB0xFA()
   1524{
   1525    // SET 7 D
   1526    OPCodes_SET(DE.GetHighRegister(), 7);
   1527}
   1528
   1529void Processor::OPCodeCB0xFB()
   1530{
   1531    // SET 7 E
   1532    OPCodes_SET(DE.GetLowRegister(), 7);
   1533}
   1534
   1535void Processor::OPCodeCB0xFC()
   1536{
   1537    // SET 7 H
   1538    OPCodes_SET(HL.GetHighRegister(), 7);
   1539}
   1540
   1541void Processor::OPCodeCB0xFD()
   1542{
   1543    // SET 7 L
   1544    OPCodes_SET(HL.GetLowRegister(), 7);
   1545}
   1546
   1547void Processor::OPCodeCB0xFE()
   1548{
   1549    // SET 7 (HL)
   1550    OPCodes_SET_HL(7);
   1551}
   1552
   1553void Processor::OPCodeCB0xFF()
   1554{
   1555    // SET 7 A
   1556    OPCodes_SET(AF.GetHighRegister(), 7);
   1557}