/* Zeta API - Z/hardware/machine/computer/Chloe 280SE.h

Copyright (C) 2006-2022 Manuel Sainz de Baranda y Goñi.
Released under the terms of the GNU Lesser General Public License v3.


 _________________________________
|				  |
|      Name: Chloe 280SE	  |
|    Vendor:			  |
|  Released:			  |
|	CPU: Zilog Z80 @ x.x MHz  |
|	ROM:			  |
|	RAM:			  |
|     Audio:			  |
|				  |
'================================='

*/

#ifndef Z_hardware_machine_computer_Chloe_280SE_H
#define Z_hardware_machine_computer_Chloe_280SE_H


/* MARK: - Memory map */

/*-------------------------------------------------.
| Region    | Size | Type | R/W | Content	   |
|-----------+------+------+-----+------------------|
| 0000-3FFF | 4000 | ROM  | R	| Firmware	   |
|-----------+------+------+-----+------------------|
| 4000-57FF | 1800 | VRAM | R/W | Video characters |
| 5800-5AFF |  300 | VRAM | R/W | Video attributes |
|-----------+------+------+-----+------------------|
| 5B00-FFFF | A500 | RAM  | R/W | User programs	   |
'=================================================='


          .-----------.
0000-3FFF | ROM | ROM |
Firmware  |  0	|  1  |
	  |-----+====='
4000-7FFF | RAM |
Screen 1  |  5  |
	  |-----|
8000-BFFF | RAM |
	  |  2  |				    Screen 2
	  |-----+--------------------------------------|--.
C000-FFFF | RAM | RAM | RAM | RAM | RAM | RAM | RAM | RAM |
User	  |  0  |  1  |	 2  |  3  |  4	|  5  |  6  |  7  |
	  '==============================================='


	  .-----------------------.
0000-3FFF | RAM | RAM | RAM | RAM |
User	  |  0  |  4  |	 4  |  4  |
	  |-----+-----+-----+-----|
4000-7FFF | RAM | RAM | RAM | RAM |
User	  |  1  |  5  |	 5  |  7  |
	  |-----+-----+-----+-----|
8000-BFFF | RAM | RAM | RAM | RAM |
User	  |  2  |  6  |	 6  |  6  |
	  |-----+-----+-----+-----|
C000-FFFF | RAM | RAM | RAM | RAM |
User	  |  3  |  7  |	 3  |  3  |
	  '======================='
*/

#define Z_ZX_SPECTRUM_ADDRESS_ROM	     0x0000
#define Z_ZX_SPECTRUM_ADDRESS_RAM	     0x4000
#define Z_ZX_SPECTRUM_ADDRESS_VRAM	     0x4000
#define Z_ZX_SPECTRUM_ADDRESS_CHARACTER_VRAM 0x4000
#define Z_ZX_SPECTRUM_ADDRESS_ATTRIBUTE_VRAM 0x5800
#define Z_ZX_SPECTRUM_ADDRESS_USER_PROGRAMS  0x5B00

#define Z_ZX_SPECTRUM_SIZE_ROM		     0x4000  /*  16 KiB */
#define Z_ZX_SPECTRUM_SIZE_VRAM		     0x1B00
#define Z_ZX_SPECTRUM_SIZE_CHARACTER_VRAM    0x1800
#define Z_ZX_SPECTRUM_SIZE_ATTRIBUTE_VRAM    0x300

#define Z_ZX_SPECTRUM_16K_SIZE_MEMORY	     0x8000  /*  32 KiB */
#define Z_ZX_SPECTRUM_16K_SIZE_RAM	     0x4000  /*  16 KiB */

#define Z_ZX_SPECTRUM_48K_SIZE_MEMORY	     0x10000 /*  64 KiB */
#define Z_ZX_SPECTRUM_48K_SIZE_RAM	     0xC000  /*  48 KiB */

#define Z_ZX_SPECTRUM_PLUS_128K_SIZE_MEMORY  0x28000 /* 160 KiB */
#define Z_ZX_SPECTRUM_PLUS_128K_SIZE_ROM     0x8000  /*  32 KiB */
#define Z_ZX_SPECTRUM_PLUS_128K_SIZE_RAM     0x20000 /* 128 KiB */
#define Z_ZX_SPECTRUM_PLUS_128K_SIZE_BANK    0x4000  /*  16 KiB */

#define Z_ZX_SPECTRUM_PLUS3_SIZE_MEMORY	     0x30000 /* 160 KiB */
#define Z_ZX_SPECTRUM_PLUS3_SIZE_ROM	     0x10000

#define Z_INVES_SPECTRUM_PLUS_SIZE_MEMORY	(1024 * 16 + 1024 * 48)
#define Z_INVES_SPECTRUM_PLUS_SIZE_ROM		(1024 * 16)


#endif /* Z_hardware_machine_computer_Chloe_280SE_H */
