RTC.vhd 5.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. -------------------------------------------------------------------------------
  2. -- The WonderProject: WonderMadeleine --
  3. -- (c) 2014 986-Studio / Godzil --
  4. -- http://www.986-studio.com <godzil_nospambot at 986 dash studio dot com> --
  5. -- --
  6. -- RTC.vhd : RTC module implementation --
  7. -- --
  8. -- What this project is about: --
  9. -- --
  10. -- This is a VHDL implementation of the Bandai 2001 / 2003 chip found in all --
  11. -- official WonderSwan Cartridge. It will ultimately provide a fully --
  12. -- functional clone of the Bandai chip. --
  13. -- --
  14. -- Licensed under the the Creative Common BY-NC-ND : --
  15. -- You are free to: --
  16. -- Share — copy and redistribute the material in any medium or format --
  17. -- --
  18. -- The licensor cannot revoke these freedoms as long as you follow the --
  19. -- license terms. --
  20. -- --
  21. -- Under the following terms: --
  22. -- --
  23. -- Attribution — You must give appropriate credit, provide a link to --
  24. -- the license, and indicate if changes were made. You --
  25. -- may do so in any reasonable manner, but not in any way --
  26. -- that suggests the licensor endorses you or your use. --
  27. -- NonCommercial — You may not use the material for commercial purposes. --
  28. -- NoDerivatives — If you remix, transform, or build upon the material, --
  29. -- you may not distribute the modified material. --
  30. -- --
  31. -- No additional restrictions — You may not apply legal terms or --
  32. -- technological measures that legally --
  33. -- restrict others from doing anything the --
  34. -- license permits. --
  35. -- --
  36. -- Notices: --
  37. -- --
  38. -- You do not have to comply with the license for elements of the material --
  39. -- in the public domain or where your use is permitted by an applicable --
  40. -- exception or limitation. --
  41. -- --
  42. -- No warranties are given. The license may not give you all of the --
  43. -- permissions necessary for your intended use. For example, other rights --
  44. -- such as publicity, privacy, or moral rights may limit how you use the --
  45. -- material. --
  46. -- --
  47. -- --
  48. -- What does that mean: --
  49. -- You can use this code to program your own CPLD --
  50. -- You can build your own cartridge that use this CPLD (and you can even --
  51. -- sell them!) --
  52. -- But you can't program CPLD and sell them directly --
  53. -- You are welcome to propose patch for supporting another CPLD or correct --
  54. -- bugs --
  55. -- You can't integrate this code with another CPLD of FPGA project --
  56. -- --
  57. -- If you have any doubt, please contact me I will be happy to help you --
  58. -- --
  59. -- What is currently working: (as of 13 november 2014) --
  60. -- [X] - ROM Banking --
  61. -- [X] - SRAM Banking --
  62. -- [X] - WonderSwan boot unlock --
  63. -- [ ] - EEPROM --
  64. -- [ ] - RTC --
  65. -- [ ] - GPIO --
  66. -- [ ] - All other unknown parts --
  67. -------------------------------------------------------------------------------
  68. library IEEE;
  69. use IEEE.STD_LOGIC_1164.ALL;
  70. --use IEEE.STD_LOGIC_ARITH.ALL;
  71. use IEEE.STD_LOGIC_UNSIGNED.ALL;
  72. use IEEE.NUMERIC_STD.ALL;
  73. entity RtcRegs is
  74. port(
  75. sel: in std_logic;
  76. nRD: in std_logic;
  77. nWR: in std_logic;
  78. regNum: in std_logic;
  79. data: inout std_logic_vector(7 downto 0);
  80. clock: in std_logic;
  81. -- RTC PINs
  82. SDA: inout std_logic;
  83. CLK: out std_logic;
  84. CS: out std_logic
  85. );
  86. end RtcRegs;
  87. architecture Behavioral of RtcRegs is
  88. begin
  89. end architecture;