Subversion Repositories pentevo

Rev

Rev 182 | Rev 219 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #ifndef __MAIN_H__
  2. #define __MAIN_H__
  3.  
  4. /**
  5.  * @mainpage  General program for ATMEGA128 ZX Evolution.
  6.  *
  7.  * @section history Revision history
  8.  *
  9.  * @subsection current Current version.
  10.  *
  11.  * - Fix fpga load and ZX part init (optimize).
  12.  *
  13.  * @subsection ver_2010_03_28 Version 28.03.2010
  14.  *
  15.  * - Fix PS/2 mouse error handler (analize error and reinit mouse if need it).
  16.  * - Add support for get version info (via Gluk cmos extra registers 0xF0..0xFF).
  17.  * - Optimize sources, some correction (log, fpga load).
  18.  * - Fix PS/2 timeout error handler.
  19.  *
  20.  * @subsection ver_2010_03_24 Version 24.03.2010
  21.  *
  22.  * - Fix Power Led behavior (it off while atx power off).
  23.  * - "Print Screen" PS2 keyboard key set NMI on ZX.
  24.  * - Soft reset (Z80 only) to service (0) page if pressed "softreset" key <5 seconds.
  25.  *
  26.  * @subsection ver_2010_03_10 Version 10.03.2010
  27.  *
  28.  * - Add PS2 keyboard led controlling: "Scroll Lock" led equal VGA mode.
  29.  * - Fix mapping gluk (DS12887) nvram to PCF8583.
  30.  * - Fix Update Flag in register C (emulation Gluk clock).
  31.  * - Add modes register and save/restore it to RTC NVRAM.
  32.  * - Add support for zx (mechanical) keyboard.
  33.  * - Add support for Kempston joystick.
  34.  *
  35.  * @subsection ver_2010_02_04 Version 04.02.2010 - base version (1.00 in SVN).
  36.  *
  37.  */
  38.  
  39. /**
  40.  * @file
  41.  * @brief Main module.
  42.  * @author http://www.nedopc.com
  43.  */
  44.  
  45. /** Common flag register. */
  46. extern volatile UBYTE flags_register;
  47. /** Direction for ps2 mouse data (0 - Receive/1 - Send). */
  48. #define FLAG_PS2MOUSE_DIRECTION 0x01
  49. /** Type of ps2 mouse (0 - classical [3bytes in packet]/1 - msoft [4bytes in packet]). */
  50. #define FLAG_PS2MOUSE_TYPE      0x02
  51. /** Ps2 mouse data for zx (0 - not ready/1 - ready). */
  52. #define FLAG_PS2MOUSE_ZX_READY  0x04
  53. /** Spi interrupt detected (0 - not received/1 - received). */
  54. #define FLAG_SPI_INT            0x08
  55. /** Direction for ps2 keyboard data (0 - Receive/1 - Send). */
  56. #define FLAG_PS2KEYBOARD_DIRECTION  0x10
  57. /** Version type (0 - BaseConf /1 - BootLoader). */
  58. #define FLAG_VERSION_TYPE       0x20
  59.  
  60. /** Common modes register. */
  61. extern volatile UBYTE modes_register;
  62. /** VGA mode (0 - not set/1 - set). */
  63. #define MODE_VGA 0x01
  64.  
  65. /** Data buffer. */
  66. extern UBYTE dbuf[];
  67.  
  68. /** FPGA data index. */
  69. extern volatile ULONG curFpga;
  70.  
  71. /**
  72.  * Writes specified length of buffer to SPI.
  73.  * @param size [in] - size of buffer.
  74.  */
  75. void put_buffer(UWORD size);
  76.  
  77. #endif //__MAIN_H__
  78.