@@ -1191,7 +1191,17 @@ void amiga_state::ocs_map(address_map &map)
11911191 // Sprite section
11921192// map(0x120, 0x17f).m(amiga_state::sprxpt_map));
11931193 // Color section
1194- // map(0x180, 0x1bf).m(amiga_state::colorxx_map));
1194+ map (0x180 , 0x1bf ).lrw16 (
1195+ NAME ([this ] (offs_t offset) {
1196+ return CUSTOM_REG (REG_COLOR00 + offset);
1197+ }),
1198+ NAME ([this ] (offs_t offset, u16 data) {
1199+ CUSTOM_REG (REG_COLOR00 + offset) = data;
1200+ data &= 0xfff ;
1201+ // Extra Half-Brite
1202+ CUSTOM_REG (REG_COLOR00 + offset + 32 ) = (data >> 1 ) & 0x777 ;
1203+ })
1204+ );
11951205}
11961206
11971207void amiga_state::ecs_map (address_map &map)
@@ -1229,6 +1239,8 @@ void amiga_state::aga_map(address_map &map)
12291239
12301240 map (0x10e , 0x10f ).w (FUNC (amiga_state::clxcon2_w));
12311241
1242+ map (0x180 , 0x1bf ).rw (FUNC (amiga_state::aga_palette_read), FUNC (amiga_state::aga_palette_write));
1243+
12321244 // UHRES regs
12331245 // TODO: may be shared with ECS?
12341246// map(0x1e6, 0x1e7).w(FUNC(amiga_state::bplhmod_w));
@@ -1699,26 +1711,6 @@ void amiga_state::custom_chip_w(offs_t offset, uint16_t data)
16991711 data &= ~1 ;
17001712 break ;
17011713
1702- case REG_COLOR00: case REG_COLOR01: case REG_COLOR02: case REG_COLOR03:
1703- case REG_COLOR04: case REG_COLOR05: case REG_COLOR06: case REG_COLOR07:
1704- case REG_COLOR08: case REG_COLOR09: case REG_COLOR10: case REG_COLOR11:
1705- case REG_COLOR12: case REG_COLOR13: case REG_COLOR14: case REG_COLOR15:
1706- case REG_COLOR16: case REG_COLOR17: case REG_COLOR18: case REG_COLOR19:
1707- case REG_COLOR20: case REG_COLOR21: case REG_COLOR22: case REG_COLOR23:
1708- case REG_COLOR24: case REG_COLOR25: case REG_COLOR26: case REG_COLOR27:
1709- case REG_COLOR28: case REG_COLOR29: case REG_COLOR30: case REG_COLOR31:
1710- if (IS_AGA ())
1711- {
1712- aga_palette_write (offset - REG_COLOR00, data);
1713- }
1714- else
1715- {
1716- data &= 0xfff ;
1717- // Extra Half-Brite
1718- CUSTOM_REG (offset + 32 ) = (data >> 1 ) & 0x777 ;
1719- }
1720- break ;
1721-
17221714 // display window start/stop
17231715 case REG_DIWSTRT:
17241716 case REG_DIWSTOP:
0 commit comments