Code Release
BIN
Computer_MiST/Galaksija_MiST/Doc/1800px-Galaksija_schematic.png
Normal file
|
After Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 39 KiB |
BIN
Computer_MiST/Galaksija_MiST/Doc/GALAKSIJA_MiST.jpg
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
Computer_MiST/Galaksija_MiST/Doc/Galaksija.pdf
Normal file
BIN
Computer_MiST/Galaksija_MiST/Doc/Galaksija3 (1).png
Normal file
|
After Width: | Height: | Size: 7.1 MiB |
BIN
Computer_MiST/Galaksija_MiST/Doc/GalaksijaPlus2.png
Normal file
|
After Width: | Height: | Size: 504 KiB |
BIN
Computer_MiST/Galaksija_MiST/Doc/GalaksijaPlus3.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
|
After Width: | Height: | Size: 72 KiB |
278
Computer_MiST/Galaksija_MiST/Doc/galaxy.cpp
Normal file
@@ -0,0 +1,278 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Krzysztof Strzecha, Miodrag Milanovic
|
||||
/***************************************************************************
|
||||
Galaksija driver by Krzysztof Strzecha and Miodrag Milanovic
|
||||
|
||||
22/05/2008 Tape support added (Miodrag Milanovic)
|
||||
21/05/2008 Galaksija plus initial support (Miodrag Milanovic)
|
||||
20/05/2008 Added real video implementation (Miodrag Milanovic)
|
||||
18/04/2005 Possibilty to disable ROM 2. 2k, 22k, 38k and 54k memory
|
||||
configurations added.
|
||||
13/03/2005 Memory mapping improved. Palette corrected. Supprort for newer
|
||||
version of snapshots added. Lot of cleanups. Keyboard mapping
|
||||
corrected.
|
||||
19/09/2002 malloc() replaced by image_malloc().
|
||||
15/09/2002 Snapshot loading fixed. Code cleanup.
|
||||
31/01/2001 Snapshot loading corrected.
|
||||
09/01/2001 Fast mode implemented (many thanks to Kevin Thacker).
|
||||
07/01/2001 Keyboard corrected (still some keys unknown).
|
||||
Horizontal screen positioning in video subsystem added.
|
||||
05/01/2001 Keyboard implemented (some keys unknown).
|
||||
03/01/2001 Snapshot loading added.
|
||||
01/01/2001 Preliminary driver.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/galaxy.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "formats/gtp_cas.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "imagedev/snapquik.h"
|
||||
#include "machine/ram.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/wave.h"
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "softlist.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
void galaxy_state::galaxyp_io(address_map &map)
|
||||
{
|
||||
map.global_mask(0x01);
|
||||
map.unmap_value_high();
|
||||
map(0x00, 0x00).w("ay8910", FUNC(ay8910_device::address_w));
|
||||
map(0x01, 0x01).w("ay8910", FUNC(ay8910_device::data_w));
|
||||
}
|
||||
|
||||
|
||||
void galaxy_state::galaxy_mem(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x0fff).rom();
|
||||
map(0x2000, 0x2037).mirror(0x07c0).r(FUNC(galaxy_state::galaxy_keyboard_r));
|
||||
map(0x2038, 0x203f).mirror(0x07c0).w(FUNC(galaxy_state::galaxy_latch_w));
|
||||
}
|
||||
|
||||
void galaxy_state::galaxyp_mem(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x0fff).rom(); // ROM A
|
||||
map(0x1000, 0x1fff).rom(); // ROM B
|
||||
map(0x2000, 0x2037).mirror(0x07c0).r(FUNC(galaxy_state::galaxy_keyboard_r));
|
||||
map(0x2038, 0x203f).mirror(0x07c0).w(FUNC(galaxy_state::galaxy_latch_w));
|
||||
map(0xe000, 0xefff).rom(); // ROM C
|
||||
map(0xf000, 0xffff).rom(); // ROM D
|
||||
}
|
||||
|
||||
/* 2008-05 FP:
|
||||
Small note about natural keyboard support. Currently:
|
||||
- "List" is mapped to 'ESC'
|
||||
- "Break" is mapped to 'F1'
|
||||
- "Repeat" is mapped to 'F2' */
|
||||
|
||||
static INPUT_PORTS_START (galaxy_common)
|
||||
PORT_START("LINE0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
||||
|
||||
PORT_START("LINE1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
||||
|
||||
PORT_START("LINE2")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
||||
|
||||
PORT_START("LINE3")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
|
||||
PORT_START("LINE4")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_')
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
|
||||
|
||||
PORT_START("LINE5")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+')
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*')
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('-')
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
|
||||
|
||||
PORT_START("LINE6")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_PAUSE) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Repeat") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(F2))
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("List") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( galaxy )
|
||||
PORT_INCLUDE( galaxy_common )
|
||||
PORT_START("ROM2")
|
||||
PORT_CONFNAME(0x01, 0x01, "ROM 2")
|
||||
PORT_CONFSETTING(0x01, "Installed")
|
||||
PORT_CONFSETTING(0x00, "Not installed")
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( galaxyp )
|
||||
PORT_INCLUDE( galaxy_common )
|
||||
INPUT_PORTS_END
|
||||
|
||||
#define XTAL 6144000
|
||||
|
||||
/* F4 Character Displayer */
|
||||
static const gfx_layout galaxy_charlayout =
|
||||
{
|
||||
8, 16, /* 8 x 16 characters */
|
||||
128, /* 128 characters */
|
||||
1, /* 1 bits per pixel */
|
||||
{ 0 }, /* no bitplanes */
|
||||
/* x offsets */
|
||||
{ 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
/* y offsets */
|
||||
{ 0, 1*128*8, 2*128*8, 3*128*8, 4*128*8, 5*128*8, 6*128*8, 7*128*8, 8*128*8, 9*128*8, 10*128*8, 11*128*8, 12*128*8, 13*128*8, 14*128*8, 15*128*8 },
|
||||
8 /* every char takes 1 x 16 bytes */
|
||||
};
|
||||
|
||||
static GFXDECODE_START( gfx_galaxy )
|
||||
GFXDECODE_ENTRY( "gfx1", 0x0000, galaxy_charlayout, 0, 1 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(galaxy_state::galaxy)
|
||||
/* basic machine hardware */
|
||||
MCFG_DEVICE_ADD("maincpu", Z80, XTAL / 2)
|
||||
MCFG_DEVICE_PROGRAM_MAP(galaxy_mem)
|
||||
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", galaxy_state, galaxy_interrupt)
|
||||
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(galaxy_state,galaxy_irq_callback)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(galaxy_state, galaxy )
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_SIZE(384, 212)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 208-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(galaxy_state, screen_update_galaxy)
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_galaxy)
|
||||
MCFG_PALETTE_ADD_MONOCHROME("palette")
|
||||
|
||||
|
||||
/* snapshot */
|
||||
MCFG_SNAPSHOT_ADD("snapshot", galaxy_state, galaxy, "gal", 0)
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
||||
MCFG_CASSETTE_ADD( "cassette" )
|
||||
MCFG_CASSETTE_FORMATS(gtp_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
|
||||
MCFG_CASSETTE_INTERFACE("galaxy_cass")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list","galaxy")
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, RAM_TAG).set_default_size("6K").set_extra_options("2K,22K,38K,54K");
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(galaxy_state::galaxyp)
|
||||
/* basic machine hardware */
|
||||
MCFG_DEVICE_ADD("maincpu", Z80, XTAL / 2)
|
||||
MCFG_DEVICE_PROGRAM_MAP(galaxyp_mem)
|
||||
MCFG_DEVICE_IO_MAP(galaxyp_io)
|
||||
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", galaxy_state, galaxy_interrupt)
|
||||
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(galaxy_state,galaxy_irq_callback)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(galaxy_state, galaxyp )
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_SIZE(384, 208)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 208-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(galaxy_state, screen_update_galaxy)
|
||||
|
||||
MCFG_PALETTE_ADD_MONOCHROME("palette")
|
||||
|
||||
|
||||
/* snapshot */
|
||||
MCFG_SNAPSHOT_ADD("snapshot", galaxy_state, galaxy, "gal", 0)
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
MCFG_DEVICE_ADD("ay8910", AY8910, XTAL/4) // FIXME: really no output routes for this AY?
|
||||
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
||||
MCFG_CASSETTE_ADD( "cassette" )
|
||||
MCFG_CASSETTE_FORMATS(gtp_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
|
||||
MCFG_CASSETTE_INTERFACE("galaxy_cass")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list","galaxy")
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, RAM_TAG).set_default_size("38K");
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START (galaxy)
|
||||
ROM_REGION (0x10000, "maincpu", ROMREGION_ERASEFF)
|
||||
ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(dc970a32) SHA1(dfc92163654a756b70f5a446daf49d7534f4c739))
|
||||
ROM_LOAD_OPTIONAL ("galrom2.bin", 0x1000, 0x1000, CRC(5dc5a100) SHA1(5d5ab4313a2d0effe7572bb129193b64cab002c1))
|
||||
ROM_REGION(0x0800, "gfx1",0)
|
||||
ROM_LOAD ("galchr.bin", 0x0000, 0x0800, CRC(5c3b5bb5) SHA1(19429a61dc5e55ddec3242a8f695e06dd7961f88))
|
||||
ROM_END
|
||||
|
||||
ROM_START (galaxyp)
|
||||
ROM_REGION (0x10000, "maincpu", ROMREGION_ERASEFF)
|
||||
ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(dc970a32) SHA1(dfc92163654a756b70f5a446daf49d7534f4c739))
|
||||
ROM_LOAD ("galrom2.bin", 0x1000, 0x1000, CRC(5dc5a100) SHA1(5d5ab4313a2d0effe7572bb129193b64cab002c1))
|
||||
ROM_LOAD ("galplus.bin", 0xe000, 0x1000, CRC(d4cfab14) SHA1(b507b9026844eeb757547679907394aa42055eee))
|
||||
ROM_REGION(0x0800, "gfx1",0)
|
||||
ROM_LOAD ("galchr.bin", 0x0000, 0x0800, CRC(5c3b5bb5) SHA1(19429a61dc5e55ddec3242a8f695e06dd7961f88))
|
||||
ROM_END
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
|
||||
COMP( 1983, galaxy, 0, 0, galaxy, galaxy, galaxy_state, init_galaxy, "Voja Antonic / Elektronika inzenjering", "Galaksija", 0)
|
||||
COMP( 1985, galaxyp, galaxy, 0, galaxyp, galaxyp, galaxy_state, init_galaxyp, "Nenad Dunjic", "Galaksija plus", 0)
|
||||
69
Computer_MiST/Galaksija_MiST/Doc/galaxy.h
Normal file
@@ -0,0 +1,69 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Krzysztof Strzecha, Miodrag Milanovic
|
||||
/*****************************************************************************
|
||||
*
|
||||
* includes/galaxy.h
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MAME_INCLUDES_GALAXY_H
|
||||
#define MAME_INCLUDES_GALAXY_H
|
||||
|
||||
#include "imagedev/snapquik.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/ram.h"
|
||||
#include "screen.h"
|
||||
|
||||
class galaxy_state : public driver_device
|
||||
{
|
||||
public:
|
||||
galaxy_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_screen(*this, "screen")
|
||||
, m_cassette(*this, "cassette")
|
||||
, m_ram(*this, RAM_TAG)
|
||||
, m_region_gfx1(*this, "gfx1") {}
|
||||
|
||||
void galaxy(machine_config &config);
|
||||
void galaxyp(machine_config &config);
|
||||
|
||||
void init_galaxy();
|
||||
void init_galaxyp();
|
||||
|
||||
private:
|
||||
DECLARE_READ8_MEMBER(galaxy_keyboard_r);
|
||||
DECLARE_WRITE8_MEMBER(galaxy_latch_w);
|
||||
virtual void video_start() override;
|
||||
DECLARE_MACHINE_RESET(galaxy);
|
||||
DECLARE_MACHINE_RESET(galaxyp);
|
||||
uint32_t screen_update_galaxy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(galaxy_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(gal_video);
|
||||
IRQ_CALLBACK_MEMBER(galaxy_irq_callback);
|
||||
void galaxy_set_timer();
|
||||
void galaxy_setup_snapshot (const uint8_t * data, uint32_t size);
|
||||
DECLARE_SNAPSHOT_LOAD_MEMBER( galaxy );
|
||||
void galaxy_mem(address_map &map);
|
||||
void galaxyp_io(address_map &map);
|
||||
void galaxyp_mem(address_map &map);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<ram_device> m_ram;
|
||||
required_memory_region m_region_gfx1;
|
||||
ioport_port *m_io_ports[8];
|
||||
|
||||
int m_interrupts_enabled;
|
||||
uint8_t m_latch_value;
|
||||
uint32_t m_gal_cnt;
|
||||
uint8_t m_code;
|
||||
uint8_t m_first;
|
||||
uint32_t m_start_addr;
|
||||
emu_timer *m_gal_video_timer;
|
||||
bitmap_ind16 m_bitmap;
|
||||
};
|
||||
|
||||
|
||||
#endif // MAME_INCLUDES_GALAXY_H
|
||||
BIN
Computer_MiST/Galaksija_MiST/Doc/keyboard-layout (1).jpg
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
Computer_MiST/Galaksija_MiST/Doc/memory_map.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
31
Computer_MiST/Galaksija_MiST/Galaksija_Mist.qpf
Normal file
@@ -0,0 +1,31 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Copyright (C) 1991-2013 Altera Corporation
|
||||
# Your use of Altera Corporation's design tools, logic functions
|
||||
# and other software and tools, and its AMPP partner logic
|
||||
# functions, and any output files from any of the foregoing
|
||||
# (including device programming or simulation files), and any
|
||||
# associated documentation or information are expressly subject
|
||||
# to the terms and conditions of the Altera Program License
|
||||
# Subscription Agreement, Altera MegaCore Function License
|
||||
# Agreement, or other applicable license agreement, including,
|
||||
# without limitation, that your use is for the sole purpose of
|
||||
# programming logic devices manufactured by Altera and sold by
|
||||
# Altera or its authorized distributors. Please refer to the
|
||||
# applicable agreement for further details.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Quartus II 64-Bit
|
||||
# Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Full Version
|
||||
# Date created = 14:32:28 October 06, 2018
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
QUARTUS_VERSION = "13.0"
|
||||
DATE = "14:32:28 October 06, 2018"
|
||||
|
||||
# Revisions
|
||||
|
||||
PROJECT_REVISION = "Galaksija_Mist"
|
||||
PROJECT_REVISION = "AtomElectron_Mist"
|
||||
221
Computer_MiST/Galaksija_MiST/Galaksija_Mist.qsf
Normal file
@@ -0,0 +1,221 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Copyright (C) 1991-2013 Altera Corporation
|
||||
# Your use of Altera Corporation's design tools, logic functions
|
||||
# and other software and tools, and its AMPP partner logic
|
||||
# functions, and any output files from any of the foregoing
|
||||
# (including device programming or simulation files), and any
|
||||
# associated documentation or information are expressly subject
|
||||
# to the terms and conditions of the Altera Program License
|
||||
# Subscription Agreement, Altera MegaCore Function License
|
||||
# Agreement, or other applicable license agreement, including,
|
||||
# without limitation, that your use is for the sole purpose of
|
||||
# programming logic devices manufactured by Altera and sold by
|
||||
# Altera or its authorized distributors. Please refer to the
|
||||
# applicable agreement for further details.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Quartus II 64-Bit
|
||||
# Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Full Version
|
||||
# Date created = 21:55:52 November 30, 2018
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# 1) The default values for assignments are stored in the file:
|
||||
# Galaksija_Mist_assignment_defaults.qdf
|
||||
# If this file doesn't exist, see file:
|
||||
# assignment_defaults.qdf
|
||||
#
|
||||
# 2) Altera recommends that you do not modify this file. This
|
||||
# file is updated automatically by the Quartus II software
|
||||
# and any changes you make may be lost or overwritten.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
|
||||
|
||||
# Project-Wide Assignments
|
||||
# ========================
|
||||
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 13.1
|
||||
set_global_assignment -name PROJECT_CREATION_TIME_DATE "07:11:53 MARCH 09, 2017"
|
||||
set_global_assignment -name LAST_QUARTUS_VERSION "13.0 SP1"
|
||||
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
|
||||
set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:rtl/build_id.tcl"
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Galaksija_MiST.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/galaksija_top.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/galaksija_video.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/AY8912.sv
|
||||
set_global_assignment -name VHDL_FILE rtl/T80/T80s.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/T80/T80_Reg.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/T80/T80_Pack.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/T80/T80_MCode.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/T80/T80_ALU.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/T80/T80.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/spram.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/sprom.vhd
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/video_mixer.sv
|
||||
set_global_assignment -name VERILOG_FILE rtl/scandoubler.v
|
||||
set_global_assignment -name VERILOG_FILE rtl/osd.v
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/hq2x.sv
|
||||
set_global_assignment -name VERILOG_FILE rtl/mist_io.v
|
||||
set_global_assignment -name VERILOG_FILE rtl/pll.v
|
||||
set_global_assignment -name VHDL_FILE rtl/dac.vhd
|
||||
|
||||
# Pin & Location Assignments
|
||||
# ==========================
|
||||
set_location_assignment PIN_7 -to LED
|
||||
set_location_assignment PIN_54 -to CLOCK_27
|
||||
set_location_assignment PIN_144 -to VGA_R[5]
|
||||
set_location_assignment PIN_143 -to VGA_R[4]
|
||||
set_location_assignment PIN_142 -to VGA_R[3]
|
||||
set_location_assignment PIN_141 -to VGA_R[2]
|
||||
set_location_assignment PIN_137 -to VGA_R[1]
|
||||
set_location_assignment PIN_135 -to VGA_R[0]
|
||||
set_location_assignment PIN_133 -to VGA_B[5]
|
||||
set_location_assignment PIN_132 -to VGA_B[4]
|
||||
set_location_assignment PIN_125 -to VGA_B[3]
|
||||
set_location_assignment PIN_121 -to VGA_B[2]
|
||||
set_location_assignment PIN_120 -to VGA_B[1]
|
||||
set_location_assignment PIN_115 -to VGA_B[0]
|
||||
set_location_assignment PIN_114 -to VGA_G[5]
|
||||
set_location_assignment PIN_113 -to VGA_G[4]
|
||||
set_location_assignment PIN_112 -to VGA_G[3]
|
||||
set_location_assignment PIN_111 -to VGA_G[2]
|
||||
set_location_assignment PIN_110 -to VGA_G[1]
|
||||
set_location_assignment PIN_106 -to VGA_G[0]
|
||||
set_location_assignment PIN_136 -to VGA_VS
|
||||
set_location_assignment PIN_119 -to VGA_HS
|
||||
set_location_assignment PIN_65 -to AUDIO_L
|
||||
set_location_assignment PIN_80 -to AUDIO_R
|
||||
set_location_assignment PIN_105 -to SPI_DO
|
||||
set_location_assignment PIN_88 -to SPI_DI
|
||||
set_location_assignment PIN_126 -to SPI_SCK
|
||||
set_location_assignment PIN_127 -to SPI_SS2
|
||||
set_location_assignment PIN_91 -to SPI_SS3
|
||||
set_location_assignment PIN_13 -to CONF_DATA0
|
||||
set_location_assignment PIN_49 -to SDRAM_A[0]
|
||||
set_location_assignment PIN_44 -to SDRAM_A[1]
|
||||
set_location_assignment PIN_42 -to SDRAM_A[2]
|
||||
set_location_assignment PIN_39 -to SDRAM_A[3]
|
||||
set_location_assignment PIN_4 -to SDRAM_A[4]
|
||||
set_location_assignment PIN_6 -to SDRAM_A[5]
|
||||
set_location_assignment PIN_8 -to SDRAM_A[6]
|
||||
set_location_assignment PIN_10 -to SDRAM_A[7]
|
||||
set_location_assignment PIN_11 -to SDRAM_A[8]
|
||||
set_location_assignment PIN_28 -to SDRAM_A[9]
|
||||
set_location_assignment PIN_50 -to SDRAM_A[10]
|
||||
set_location_assignment PIN_30 -to SDRAM_A[11]
|
||||
set_location_assignment PIN_32 -to SDRAM_A[12]
|
||||
set_location_assignment PIN_83 -to SDRAM_DQ[0]
|
||||
set_location_assignment PIN_79 -to SDRAM_DQ[1]
|
||||
set_location_assignment PIN_77 -to SDRAM_DQ[2]
|
||||
set_location_assignment PIN_76 -to SDRAM_DQ[3]
|
||||
set_location_assignment PIN_72 -to SDRAM_DQ[4]
|
||||
set_location_assignment PIN_71 -to SDRAM_DQ[5]
|
||||
set_location_assignment PIN_69 -to SDRAM_DQ[6]
|
||||
set_location_assignment PIN_68 -to SDRAM_DQ[7]
|
||||
set_location_assignment PIN_86 -to SDRAM_DQ[8]
|
||||
set_location_assignment PIN_87 -to SDRAM_DQ[9]
|
||||
set_location_assignment PIN_98 -to SDRAM_DQ[10]
|
||||
set_location_assignment PIN_99 -to SDRAM_DQ[11]
|
||||
set_location_assignment PIN_100 -to SDRAM_DQ[12]
|
||||
set_location_assignment PIN_101 -to SDRAM_DQ[13]
|
||||
set_location_assignment PIN_103 -to SDRAM_DQ[14]
|
||||
set_location_assignment PIN_104 -to SDRAM_DQ[15]
|
||||
set_location_assignment PIN_58 -to SDRAM_BA[0]
|
||||
set_location_assignment PIN_51 -to SDRAM_BA[1]
|
||||
set_location_assignment PIN_85 -to SDRAM_DQMH
|
||||
set_location_assignment PIN_67 -to SDRAM_DQML
|
||||
set_location_assignment PIN_60 -to SDRAM_nRAS
|
||||
set_location_assignment PIN_64 -to SDRAM_nCAS
|
||||
set_location_assignment PIN_66 -to SDRAM_nWE
|
||||
set_location_assignment PIN_59 -to SDRAM_nCS
|
||||
set_location_assignment PIN_33 -to SDRAM_CKE
|
||||
set_location_assignment PIN_43 -to SDRAM_CLK
|
||||
set_location_assignment PIN_31 -to UART_RXD
|
||||
set_location_assignment PIN_46 -to UART_TXD
|
||||
set_location_assignment PLL_1 -to "pll:pll|altpll:altpll_component"
|
||||
|
||||
# Classic Timing Assignments
|
||||
# ==========================
|
||||
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
|
||||
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
|
||||
|
||||
# Analysis & Synthesis Assignments
|
||||
# ================================
|
||||
set_global_assignment -name FAMILY "Cyclone III"
|
||||
set_global_assignment -name TOP_LEVEL_ENTITY Galaksija_MiST
|
||||
set_global_assignment -name SEARCH_PATH roms/ -tag from_archive
|
||||
set_global_assignment -name SEARCH_PATH src/ -tag from_archive
|
||||
set_global_assignment -name SEARCH_PATH src/MC6522/ -tag from_archive
|
||||
set_global_assignment -name SEARCH_PATH src/RAM/ -tag from_archive
|
||||
set_global_assignment -name SEARCH_PATH src/T6502/ -tag from_archive
|
||||
set_global_assignment -name SEARCH_PATH src/ps2kybrd/ -tag from_archive
|
||||
set_global_assignment -name DEVICE_FILTER_PACKAGE TQFP
|
||||
set_global_assignment -name DEVICE_FILTER_PIN_COUNT 144
|
||||
set_global_assignment -name DEVICE_FILTER_SPEED_GRADE 8
|
||||
|
||||
# Fitter Assignments
|
||||
# ==================
|
||||
set_global_assignment -name DEVICE EP3C25E144C8
|
||||
set_global_assignment -name CYCLONEIII_CONFIGURATION_SCHEME "PASSIVE SERIAL"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN OFF
|
||||
set_global_assignment -name FORCE_CONFIGURATION_VCCIO ON
|
||||
set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL"
|
||||
set_global_assignment -name CYCLONEII_RESERVE_NCEO_AFTER_CONFIGURATION "USE AS REGULAR IO"
|
||||
set_global_assignment -name RESERVE_DATA0_AFTER_CONFIGURATION "USE AS REGULAR IO"
|
||||
set_global_assignment -name RESERVE_DATA1_AFTER_CONFIGURATION "USE AS REGULAR IO"
|
||||
set_global_assignment -name RESERVE_FLASH_NCE_AFTER_CONFIGURATION "USE AS REGULAR IO"
|
||||
|
||||
# EDA Netlist Writer Assignments
|
||||
# ==============================
|
||||
set_global_assignment -name EDA_SIMULATION_TOOL "ModelSim-Altera (VHDL)"
|
||||
|
||||
# Assembler Assignments
|
||||
# =====================
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
|
||||
set_global_assignment -name GENERATE_RBF_FILE ON
|
||||
|
||||
# Power Estimation Assignments
|
||||
# ============================
|
||||
set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
|
||||
set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
|
||||
|
||||
# Advanced I/O Timing Assignments
|
||||
# ===============================
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -rise
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -fall
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -rise
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -fall
|
||||
|
||||
# start EDA_TOOL_SETTINGS(eda_simulation)
|
||||
# ---------------------------------------
|
||||
|
||||
# EDA Netlist Writer Assignments
|
||||
# ==============================
|
||||
set_global_assignment -name EDA_OUTPUT_DATA_FORMAT VHDL -section_id eda_simulation
|
||||
|
||||
# end EDA_TOOL_SETTINGS(eda_simulation)
|
||||
# -------------------------------------
|
||||
|
||||
# ----------------------------
|
||||
# start ENTITY(Galaksija_MiST)
|
||||
|
||||
# start DESIGN_PARTITION(Top)
|
||||
# ---------------------------
|
||||
|
||||
# Incremental Compilation Assignments
|
||||
# ===================================
|
||||
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
|
||||
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
|
||||
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
|
||||
|
||||
# end DESIGN_PARTITION(Top)
|
||||
# -------------------------
|
||||
|
||||
# end ENTITY(Galaksija_MiST)
|
||||
# --------------------------
|
||||
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
|
||||
18
Computer_MiST/Galaksija_MiST/Galaksija_Mist.srf
Normal file
@@ -0,0 +1,18 @@
|
||||
{ "" "" "" "Verilog HDL macro warning at hq2x.sv(26): overriding existing definition for macro \"BITS_TO_FIT\", which was defined in \"rtl/scandoubler.v\", line 109" { } { } 0 10274 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL warning at galaksija_top.v(111): object ram01_out used but never assigned" { } { } 0 10858 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL warning at galaksija_top.v(112): object ram10_out used but never assigned" { } { } 0 10858 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL warning at galaksija_top.v(113): object ram11_out used but never assigned" { } { } 0 10858 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL warning at galaksija_top.v(104): object ram01_out used but never assigned" { } { } 0 10858 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL warning at galaksija_top.v(105): object ram10_out used but never assigned" { } { } 0 10858 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL warning at galaksija_top.v(106): object ram11_out used but never assigned" { } { } 0 10858 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL or VHDL warning at galaksija_top.v(201): object \"we_1\" assigned a value but never read" { } { } 0 10036 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL or VHDL warning at galaksija_top.v(202): object \"we_2\" assigned a value but never read" { } { } 0 10036 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL or VHDL warning at galaksija_top.v(203): object \"we_3\" assigned a value but never read" { } { } 0 10036 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL Compiler Directive warning at scandoubler.v(109): text macro \"BITS_TO_FIT\" is undefined" { } { } 0 10191 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL warning at hq2x.sv(247): extended using \"x\" or \"z\"" { } { } 0 10273 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL information at scandoubler.v(102): always construct contains both blocking and non-blocking assignments" { } { } 0 10268 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "Verilog HDL Case Statement warning at galaksija_top.sv(218): incomplete case statement has no default case item" { } { } 0 10270 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "*" { } { } 0 10296 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "*" { } { } 0 10235 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "*" { } { } 0 10230 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
{ "" "" "" "*" { } { } 0 10036 "" 0 0 "Quartus II" 0 -1 0 ""}
|
||||
@@ -1,8 +1,7 @@
|
||||
Galaksija on MiST FPGA by Gehstock
|
||||
|
||||
48kb Ram
|
||||
VGA only (will be changed)
|
||||
Rom1+Rom2 (Rom3 WIP)
|
||||
Keyboard has no lowercase
|
||||
WIP
|
||||
|
||||
VGA Only, No Keyboard
|
||||
|
||||
32k Ram
|
||||
Rom 1+2
|
||||
AY8910
|
||||
|
||||
288
Computer_MiST/Galaksija_MiST/rtl/AY8912.sv
Normal file
@@ -0,0 +1,288 @@
|
||||
|
||||
|
||||
module AY8912
|
||||
(
|
||||
input CLK, // Global clock
|
||||
input CE, // PSG Clock enable
|
||||
input RESET, // Chip RESET (set all Registers to '0', active hi)
|
||||
input BDIR, // Bus Direction (0 - read , 1 - write)
|
||||
input BC, // Bus control
|
||||
input [7:0] DI, // Data In
|
||||
output [7:0] DO, // Data Out
|
||||
output [7:0] CHANNEL_A, // PSG Output channel A
|
||||
output [7:0] CHANNEL_B, // PSG Output channel B
|
||||
output [7:0] CHANNEL_C, // PSG Output channel C
|
||||
input SEL,
|
||||
input [7:0] IO_in,
|
||||
output [7:0] IO_out
|
||||
);
|
||||
|
||||
assign IO_out = ymreg[14];
|
||||
|
||||
reg ena_div;
|
||||
reg ena_div_noise;
|
||||
reg [3:0] addr;
|
||||
reg [7:0] ymreg[16];
|
||||
reg env_ena;
|
||||
reg [4:0] env_vol;
|
||||
|
||||
wire [7:0] volTableAy[16] =
|
||||
'{8'h00, 8'h03, 8'h04, 8'h06,
|
||||
8'h0a, 8'h0f, 8'h15, 8'h22,
|
||||
8'h28, 8'h41, 8'h5b, 8'h72,
|
||||
8'h90, 8'hb5, 8'hd7, 8'hff
|
||||
};
|
||||
|
||||
wire [7:0] volTableYm[32] =
|
||||
'{8'h00, 8'h01, 8'h01, 8'h02,
|
||||
8'h02, 8'h03, 8'h03, 8'h04,
|
||||
8'h06, 8'h07, 8'h09, 8'h0a,
|
||||
8'h0c, 8'h0e, 8'h11, 8'h13,
|
||||
8'h17, 8'h1b, 8'h20, 8'h25,
|
||||
8'h2c, 8'h35, 8'h3e, 8'h47,
|
||||
8'h54, 8'h66, 8'h77, 8'h88,
|
||||
8'ha1, 8'hc0, 8'he0, 8'hff
|
||||
};
|
||||
|
||||
// Read from AY
|
||||
assign DO = dout;
|
||||
reg [7:0] dout;
|
||||
always_comb begin
|
||||
case(addr)
|
||||
0: dout = ymreg[0];
|
||||
1: dout = {4'b0000, ymreg[1][3:0]};
|
||||
2: dout = ymreg[2];
|
||||
3: dout = {4'b0000, ymreg[3][3:0]};
|
||||
4: dout = ymreg[4];
|
||||
5: dout = {4'b0000, ymreg[5][3:0]};
|
||||
6: dout = {3'b000, ymreg[6][4:0]};
|
||||
7: dout = ymreg[7];
|
||||
8: dout = {3'b000, ymreg[8][4:0]};
|
||||
9: dout = {3'b000, ymreg[9][4:0]};
|
||||
10: dout = {3'b000, ymreg[10][4:0]};
|
||||
11: dout = ymreg[11];
|
||||
12: dout = ymreg[12];
|
||||
13: dout = {4'b0000, ymreg[13][3:0]};
|
||||
14: dout = (ymreg[7][6] ? ymreg[14] : IO_in);
|
||||
15: dout = (ymreg[7][7] ? ymreg[15] : IO_in);
|
||||
endcase
|
||||
end
|
||||
|
||||
// p_divider
|
||||
always @(posedge CLK) begin
|
||||
reg [3:0] cnt_div;
|
||||
reg noise_div;
|
||||
|
||||
if(CE) begin
|
||||
ena_div <= 0;
|
||||
ena_div_noise <= 0;
|
||||
if(!cnt_div) begin
|
||||
cnt_div <= {SEL, 3'b111};
|
||||
ena_div <= 1;
|
||||
|
||||
noise_div <= (~noise_div);
|
||||
if (noise_div) ena_div_noise <= 1;
|
||||
end else begin
|
||||
cnt_div <= cnt_div - 1'b1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
reg [16:0] poly17;
|
||||
wire [4:0] noise_gen_comp = ymreg[6][4:0] ? ymreg[6][4:0] - 1'd1 : 5'd0;
|
||||
|
||||
// p_noise_gen
|
||||
always @(posedge CLK) begin
|
||||
reg [4:0] noise_gen_cnt;
|
||||
|
||||
if(CE) begin
|
||||
if (ena_div_noise) begin
|
||||
if (noise_gen_cnt >= noise_gen_comp) begin
|
||||
noise_gen_cnt <= 0;
|
||||
poly17 <= {(poly17[0] ^ poly17[2] ^ !poly17), poly17[16:1]};
|
||||
end else begin
|
||||
noise_gen_cnt <= noise_gen_cnt + 1'd1;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
wire [11:0] tone_gen_freq[1:3];
|
||||
assign tone_gen_freq[1] = {ymreg[1][3:0], ymreg[0]};
|
||||
assign tone_gen_freq[2] = {ymreg[3][3:0], ymreg[2]};
|
||||
assign tone_gen_freq[3] = {ymreg[5][3:0], ymreg[4]};
|
||||
|
||||
wire [11:0] tone_gen_comp[1:3];
|
||||
assign tone_gen_comp[1] = tone_gen_freq[1] ? tone_gen_freq[1] - 1'd1 : 12'd0;
|
||||
assign tone_gen_comp[2] = tone_gen_freq[2] ? tone_gen_freq[2] - 1'd1 : 12'd0;
|
||||
assign tone_gen_comp[3] = tone_gen_freq[3] ? tone_gen_freq[3] - 1'd1 : 12'd0;
|
||||
|
||||
reg [3:1] tone_gen_op;
|
||||
|
||||
//p_tone_gens
|
||||
always @(posedge CLK) begin
|
||||
integer i;
|
||||
reg [11:0] tone_gen_cnt[1:3];
|
||||
|
||||
if(CE) begin
|
||||
// looks like real chips count up - we need to get the Exact behaviour ..
|
||||
|
||||
for (i = 1; i <= 3; i = i + 1) begin
|
||||
if(ena_div) begin
|
||||
if (tone_gen_cnt[i] >= tone_gen_comp[i]) begin
|
||||
tone_gen_cnt[i] <= 0;
|
||||
tone_gen_op[i] <= (~tone_gen_op[i]);
|
||||
end else begin
|
||||
tone_gen_cnt[i] <= tone_gen_cnt[i] + 1'd1;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
wire [15:0] env_gen_comp = {ymreg[12], ymreg[11]} ? {ymreg[12], ymreg[11]} - 1'd1 : 16'd0;
|
||||
|
||||
//p_envelope_freq
|
||||
always @(posedge CLK) begin
|
||||
reg [15:0] env_gen_cnt;
|
||||
|
||||
if(CE) begin
|
||||
env_ena <= 0;
|
||||
if(ena_div) begin
|
||||
if (env_gen_cnt >= env_gen_comp) begin
|
||||
env_gen_cnt <= 0;
|
||||
env_ena <= 1;
|
||||
end else begin
|
||||
env_gen_cnt <= (env_gen_cnt + 1'd1);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
wire is_bot = (env_vol == 5'b00000);
|
||||
wire is_bot_p1 = (env_vol == 5'b00001);
|
||||
wire is_top_m1 = (env_vol == 5'b11110);
|
||||
wire is_top = (env_vol == 5'b11111);
|
||||
|
||||
always @(posedge CLK) begin
|
||||
reg old_BDIR;
|
||||
reg env_reset;
|
||||
reg env_hold;
|
||||
reg env_inc;
|
||||
|
||||
// envelope shapes
|
||||
// C AtAlH
|
||||
// 0 0 x x \___
|
||||
//
|
||||
// 0 1 x x /___
|
||||
//
|
||||
// 1 0 0 0 \\\\
|
||||
//
|
||||
// 1 0 0 1 \___
|
||||
//
|
||||
// 1 0 1 0 \/\/
|
||||
// ___
|
||||
// 1 0 1 1 \
|
||||
//
|
||||
// 1 1 0 0 ////
|
||||
// ___
|
||||
// 1 1 0 1 /
|
||||
//
|
||||
// 1 1 1 0 /\/\
|
||||
//
|
||||
// 1 1 1 1 /___
|
||||
|
||||
if(RESET) begin
|
||||
ymreg[0] <= 0;
|
||||
ymreg[1] <= 0;
|
||||
ymreg[2] <= 0;
|
||||
ymreg[3] <= 0;
|
||||
ymreg[4] <= 0;
|
||||
ymreg[5] <= 0;
|
||||
ymreg[6] <= 0;
|
||||
ymreg[7] <= 255;
|
||||
ymreg[8] <= 0;
|
||||
ymreg[9] <= 0;
|
||||
ymreg[10] <= 0;
|
||||
ymreg[11] <= 0;
|
||||
ymreg[12] <= 0;
|
||||
ymreg[13] <= 0;
|
||||
ymreg[14] <= 0;
|
||||
ymreg[15] <= 0;
|
||||
addr <= 0;
|
||||
env_vol <= 0;
|
||||
end else begin
|
||||
old_BDIR <= BDIR;
|
||||
if(~old_BDIR & BDIR) begin
|
||||
if(BC) addr <= DI[3:0];
|
||||
else begin
|
||||
ymreg[addr] <= DI;
|
||||
env_reset <= (addr == 13);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if(CE) begin
|
||||
if(env_reset) begin
|
||||
env_reset <= 0;
|
||||
// load initial state
|
||||
if(!ymreg[13][2]) begin // attack
|
||||
env_vol <= 5'b11111;
|
||||
env_inc <= 0; // -1
|
||||
end else begin
|
||||
env_vol <= 5'b00000;
|
||||
env_inc <= 1; // +1
|
||||
end
|
||||
env_hold <= 0;
|
||||
end else begin
|
||||
|
||||
if (env_ena) begin
|
||||
if (!env_hold) begin
|
||||
if (env_inc) env_vol <= (env_vol + 5'b00001);
|
||||
else env_vol <= (env_vol + 5'b11111);
|
||||
end
|
||||
|
||||
// envelope shape control.
|
||||
if(!ymreg[13][3]) begin
|
||||
if(!env_inc) begin // down
|
||||
if(is_bot_p1) env_hold <= 1;
|
||||
end else if (is_top) env_hold <= 1;
|
||||
end else if(ymreg[13][0]) begin // hold = 1
|
||||
if(!env_inc) begin // down
|
||||
if(ymreg[13][1]) begin // alt
|
||||
if(is_bot) env_hold <= 1;
|
||||
end else if(is_bot_p1) env_hold <= 1;
|
||||
end else if(ymreg[13][1]) begin // alt
|
||||
if(is_top) env_hold <= 1;
|
||||
end else if(is_top_m1) env_hold <= 1;
|
||||
end else if(ymreg[13][1]) begin // alternate
|
||||
if(env_inc == 1'b0) begin // down
|
||||
if(is_bot_p1) env_hold <= 1;
|
||||
if(is_bot) begin
|
||||
env_hold <= 0;
|
||||
env_inc <= 1;
|
||||
end
|
||||
end else begin
|
||||
if(is_top_m1) env_hold <= 1;
|
||||
if(is_top) begin
|
||||
env_hold <= 0;
|
||||
env_inc <= 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
wire [4:0] A = ~((ymreg[7][0] | tone_gen_op[1]) & (ymreg[7][3] | poly17[0])) ? 5'd0 : ymreg[8][4] ? env_vol[4:0] : { ymreg[8][3:0], ymreg[8][3]};
|
||||
wire [4:0] B = ~((ymreg[7][1] | tone_gen_op[2]) & (ymreg[7][4] | poly17[0])) ? 5'd0 : ymreg[9][4] ? env_vol[4:0] : { ymreg[9][3:0], ymreg[9][3]};
|
||||
wire [4:0] C = ~((ymreg[7][2] | tone_gen_op[3]) & (ymreg[7][5] | poly17[0])) ? 5'd0 : ymreg[10][4] ? env_vol[4:0] : {ymreg[10][3:0], ymreg[10][3]};
|
||||
|
||||
assign CHANNEL_A = volTableYm[A];
|
||||
assign CHANNEL_B = volTableYm[B];
|
||||
assign CHANNEL_C = volTableYm[C];
|
||||
|
||||
|
||||
endmodule
|
||||
121
Computer_MiST/Galaksija_MiST/rtl/Galaksija_MiST.sv
Normal file
@@ -0,0 +1,121 @@
|
||||
module Galaksija_MiST(
|
||||
input CLOCK_27,
|
||||
output [5:0] VGA_R,
|
||||
output [5:0] VGA_G,
|
||||
output [5:0] VGA_B,
|
||||
output VGA_HS,
|
||||
output VGA_VS,
|
||||
output LED,
|
||||
input UART_RXD,
|
||||
output UART_TXD,
|
||||
output AUDIO_L,
|
||||
output AUDIO_R,
|
||||
input SPI_SCK,
|
||||
output SPI_DO,
|
||||
input SPI_DI,
|
||||
input SPI_SS2,
|
||||
input SPI_SS3,
|
||||
input CONF_DATA0
|
||||
);
|
||||
|
||||
`include "build_id.v"
|
||||
localparam CONF_STR = {
|
||||
"Galaksija;;",
|
||||
// "F,GAL,Load Program;",
|
||||
"O23,Scandoubler Fx,None,HQ2x,CRT 25%,CRT 50%;",
|
||||
"T9,Reset;",
|
||||
"V,v1.00.",`BUILD_DATE
|
||||
};
|
||||
wire clk_1p7, clk_25, clk_6p25;
|
||||
wire ps2_kbd_clk, ps2_kbd_data;
|
||||
wire [2:0] r, g;
|
||||
wire [1:0] b;
|
||||
wire hs, vs;
|
||||
wire [1:0] buttons, switches;
|
||||
wire ypbpr;
|
||||
wire forced_scandoubler;
|
||||
wire [31:0] status;
|
||||
wire [7:0] audio;
|
||||
wire [10:0] ps2_key;
|
||||
assign LED = 1'b1;
|
||||
|
||||
pll pll (
|
||||
.inclk0 ( CLOCK_27 ),
|
||||
.c0 ( clk_1p7 ),
|
||||
.c1 ( clk_25 ),
|
||||
.c2 ( clk_6p25 )
|
||||
);
|
||||
|
||||
|
||||
mist_io #(
|
||||
.STRLEN($size(CONF_STR)>>3))
|
||||
user_io (
|
||||
.clk_sys(clk_25),
|
||||
.CONF_DATA0(CONF_DATA0),
|
||||
.SPI_SCK(SPI_SCK),
|
||||
.SPI_DI(SPI_DI),
|
||||
.SPI_DO(SPI_DO),
|
||||
.SPI_SS2(SPI_SS2),
|
||||
.conf_str(CONF_STR),
|
||||
.ypbpr(ypbpr),
|
||||
.status(status),
|
||||
.scandoubler_disable(forced_scandoubler),
|
||||
.buttons(buttons),
|
||||
.switches(switches),
|
||||
.ps2_key(ps2_key)
|
||||
);
|
||||
|
||||
video_mixer #(
|
||||
.LINE_LENGTH(320),
|
||||
.HALF_DEPTH(0))
|
||||
video_mixer (
|
||||
.clk_sys ( clk_25 ),
|
||||
.ce_pix ( clk_6p25 ),
|
||||
.ce_pix_actual ( clk_6p25 ),
|
||||
.SPI_SCK ( SPI_SCK ),
|
||||
.SPI_SS3 ( SPI_SS3 ),
|
||||
.SPI_DI ( SPI_DI ),
|
||||
.R ( video[5:0] ),
|
||||
.G ( video[5:0] ),
|
||||
.B ( video[5:0] ),
|
||||
.HSync ( hs ),
|
||||
.VSync ( vs ),
|
||||
.VGA_R ( VGA_R ),
|
||||
.VGA_G ( VGA_G ),
|
||||
.VGA_B ( VGA_B ),
|
||||
.VGA_VS ( VGA_VS ),
|
||||
.VGA_HS ( VGA_HS ),
|
||||
.scanlines (forced_scandoubler ? 2'b00 : {status[3:2] == 3, status[3:2] == 2}),
|
||||
.scandoubler_disable(1'b1),//forced_scandoubler),
|
||||
.hq2x (status[3:2]==1),
|
||||
.ypbpr ( ypbpr ),
|
||||
.ypbpr_full ( 1 ),
|
||||
.line_start ( 0 ),
|
||||
.mono ( 1 )
|
||||
);
|
||||
wire [7:0] video;
|
||||
galaksija_top galaksija_top (
|
||||
.sysclk(clk_25),
|
||||
.audclk(clk_1p7),
|
||||
.reset_in(~(status[0] | status[9] | buttons[1])),
|
||||
.ps2_key(ps2_key),
|
||||
.audio(audio),
|
||||
.cass_in(UART_RXD),
|
||||
.cass_out(UART_TXD),
|
||||
.video_dat(video),
|
||||
.video_hs(hs),
|
||||
.video_vs(vs),
|
||||
.video_blankn()//todo
|
||||
);
|
||||
|
||||
dac #(
|
||||
.msbi_g(7))
|
||||
dac (
|
||||
.clk_i(clk_25),
|
||||
.res_n_i(1'b1),
|
||||
.dac_i(audio),
|
||||
.dac_o(AUDIO_L)
|
||||
);
|
||||
|
||||
assign AUDIO_R = AUDIO_L;
|
||||
endmodule
|
||||
1073
Computer_MiST/Galaksija_MiST/rtl/T80/T80.vhd
Normal file
351
Computer_MiST/Galaksija_MiST/rtl/T80/T80_ALU.vhd
Normal file
@@ -0,0 +1,351 @@
|
||||
--
|
||||
-- Z80 compatible microprocessor core
|
||||
--
|
||||
-- Version : 0247
|
||||
--
|
||||
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
|
||||
--
|
||||
-- All rights reserved
|
||||
--
|
||||
-- Redistribution and use in source and synthezised forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are met:
|
||||
--
|
||||
-- Redistributions of source code must retain the above copyright notice,
|
||||
-- this list of conditions and the following disclaimer.
|
||||
--
|
||||
-- Redistributions in synthesized form must reproduce the above copyright
|
||||
-- notice, this list of conditions and the following disclaimer in the
|
||||
-- documentation and/or other materials provided with the distribution.
|
||||
--
|
||||
-- Neither the name of the author nor the names of other contributors may
|
||||
-- be used to endorse or promote products derived from this software without
|
||||
-- specific prior written permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
||||
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
--
|
||||
-- Please report bugs to the author, but before you do so, please
|
||||
-- make sure that this is not a derivative work and that
|
||||
-- you have the latest version of this file.
|
||||
--
|
||||
-- The latest version of this file can be found at:
|
||||
-- http://www.opencores.org/cvsweb.shtml/t80/
|
||||
--
|
||||
-- Limitations :
|
||||
--
|
||||
-- File history :
|
||||
--
|
||||
-- 0214 : Fixed mostly flags, only the block instructions now fail the zex regression test
|
||||
--
|
||||
-- 0238 : Fixed zero flag for 16 bit SBC and ADC
|
||||
--
|
||||
-- 0240 : Added GB operations
|
||||
--
|
||||
-- 0242 : Cleanup
|
||||
--
|
||||
-- 0247 : Cleanup
|
||||
--
|
||||
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
use IEEE.numeric_std.all;
|
||||
|
||||
entity T80_ALU is
|
||||
generic(
|
||||
Mode : integer := 0;
|
||||
Flag_C : integer := 0;
|
||||
Flag_N : integer := 1;
|
||||
Flag_P : integer := 2;
|
||||
Flag_X : integer := 3;
|
||||
Flag_H : integer := 4;
|
||||
Flag_Y : integer := 5;
|
||||
Flag_Z : integer := 6;
|
||||
Flag_S : integer := 7
|
||||
);
|
||||
port(
|
||||
Arith16 : in std_logic;
|
||||
Z16 : in std_logic;
|
||||
ALU_Op : in std_logic_vector(3 downto 0);
|
||||
IR : in std_logic_vector(5 downto 0);
|
||||
ISet : in std_logic_vector(1 downto 0);
|
||||
BusA : in std_logic_vector(7 downto 0);
|
||||
BusB : in std_logic_vector(7 downto 0);
|
||||
F_In : in std_logic_vector(7 downto 0);
|
||||
Q : out std_logic_vector(7 downto 0);
|
||||
F_Out : out std_logic_vector(7 downto 0)
|
||||
);
|
||||
end T80_ALU;
|
||||
|
||||
architecture rtl of T80_ALU is
|
||||
|
||||
procedure AddSub(A : std_logic_vector;
|
||||
B : std_logic_vector;
|
||||
Sub : std_logic;
|
||||
Carry_In : std_logic;
|
||||
signal Res : out std_logic_vector;
|
||||
signal Carry : out std_logic) is
|
||||
variable B_i : unsigned(A'length - 1 downto 0);
|
||||
variable Res_i : unsigned(A'length + 1 downto 0);
|
||||
begin
|
||||
if Sub = '1' then
|
||||
B_i := not unsigned(B);
|
||||
else
|
||||
B_i := unsigned(B);
|
||||
end if;
|
||||
Res_i := unsigned("0" & A & Carry_In) + unsigned("0" & B_i & "1");
|
||||
Carry <= Res_i(A'length + 1);
|
||||
Res <= std_logic_vector(Res_i(A'length downto 1));
|
||||
end;
|
||||
|
||||
-- AddSub variables (temporary signals)
|
||||
signal UseCarry : std_logic;
|
||||
signal Carry7_v : std_logic;
|
||||
signal Overflow_v : std_logic;
|
||||
signal HalfCarry_v : std_logic;
|
||||
signal Carry_v : std_logic;
|
||||
signal Q_v : std_logic_vector(7 downto 0);
|
||||
|
||||
signal BitMask : std_logic_vector(7 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
with IR(5 downto 3) select BitMask <= "00000001" when "000",
|
||||
"00000010" when "001",
|
||||
"00000100" when "010",
|
||||
"00001000" when "011",
|
||||
"00010000" when "100",
|
||||
"00100000" when "101",
|
||||
"01000000" when "110",
|
||||
"10000000" when others;
|
||||
|
||||
UseCarry <= not ALU_Op(2) and ALU_Op(0);
|
||||
AddSub(BusA(3 downto 0), BusB(3 downto 0), ALU_Op(1), ALU_Op(1) xor (UseCarry and F_In(Flag_C)), Q_v(3 downto 0), HalfCarry_v);
|
||||
AddSub(BusA(6 downto 4), BusB(6 downto 4), ALU_Op(1), HalfCarry_v, Q_v(6 downto 4), Carry7_v);
|
||||
AddSub(BusA(7 downto 7), BusB(7 downto 7), ALU_Op(1), Carry7_v, Q_v(7 downto 7), Carry_v);
|
||||
OverFlow_v <= Carry_v xor Carry7_v;
|
||||
|
||||
process (Arith16, ALU_OP, F_In, BusA, BusB, IR, Q_v, Carry_v, HalfCarry_v, OverFlow_v, BitMask, ISet, Z16)
|
||||
variable Q_t : std_logic_vector(7 downto 0);
|
||||
variable DAA_Q : unsigned(8 downto 0);
|
||||
begin
|
||||
Q_t := "--------";
|
||||
F_Out <= F_In;
|
||||
DAA_Q := "---------";
|
||||
case ALU_Op is
|
||||
when "0000" | "0001" | "0010" | "0011" | "0100" | "0101" | "0110" | "0111" =>
|
||||
F_Out(Flag_N) <= '0';
|
||||
F_Out(Flag_C) <= '0';
|
||||
case ALU_OP(2 downto 0) is
|
||||
when "000" | "001" => -- ADD, ADC
|
||||
Q_t := Q_v;
|
||||
F_Out(Flag_C) <= Carry_v;
|
||||
F_Out(Flag_H) <= HalfCarry_v;
|
||||
F_Out(Flag_P) <= OverFlow_v;
|
||||
when "010" | "011" | "111" => -- SUB, SBC, CP
|
||||
Q_t := Q_v;
|
||||
F_Out(Flag_N) <= '1';
|
||||
F_Out(Flag_C) <= not Carry_v;
|
||||
F_Out(Flag_H) <= not HalfCarry_v;
|
||||
F_Out(Flag_P) <= OverFlow_v;
|
||||
when "100" => -- AND
|
||||
Q_t(7 downto 0) := BusA and BusB;
|
||||
F_Out(Flag_H) <= '1';
|
||||
when "101" => -- XOR
|
||||
Q_t(7 downto 0) := BusA xor BusB;
|
||||
F_Out(Flag_H) <= '0';
|
||||
when others => -- OR "110"
|
||||
Q_t(7 downto 0) := BusA or BusB;
|
||||
F_Out(Flag_H) <= '0';
|
||||
end case;
|
||||
if ALU_Op(2 downto 0) = "111" then -- CP
|
||||
F_Out(Flag_X) <= BusB(3);
|
||||
F_Out(Flag_Y) <= BusB(5);
|
||||
else
|
||||
F_Out(Flag_X) <= Q_t(3);
|
||||
F_Out(Flag_Y) <= Q_t(5);
|
||||
end if;
|
||||
if Q_t(7 downto 0) = "00000000" then
|
||||
F_Out(Flag_Z) <= '1';
|
||||
if Z16 = '1' then
|
||||
F_Out(Flag_Z) <= F_In(Flag_Z); -- 16 bit ADC,SBC
|
||||
end if;
|
||||
else
|
||||
F_Out(Flag_Z) <= '0';
|
||||
end if;
|
||||
F_Out(Flag_S) <= Q_t(7);
|
||||
case ALU_Op(2 downto 0) is
|
||||
when "000" | "001" | "010" | "011" | "111" => -- ADD, ADC, SUB, SBC, CP
|
||||
when others =>
|
||||
F_Out(Flag_P) <= not (Q_t(0) xor Q_t(1) xor Q_t(2) xor Q_t(3) xor
|
||||
Q_t(4) xor Q_t(5) xor Q_t(6) xor Q_t(7));
|
||||
end case;
|
||||
if Arith16 = '1' then
|
||||
F_Out(Flag_S) <= F_In(Flag_S);
|
||||
F_Out(Flag_Z) <= F_In(Flag_Z);
|
||||
F_Out(Flag_P) <= F_In(Flag_P);
|
||||
end if;
|
||||
when "1100" =>
|
||||
-- DAA
|
||||
F_Out(Flag_H) <= F_In(Flag_H);
|
||||
F_Out(Flag_C) <= F_In(Flag_C);
|
||||
DAA_Q(7 downto 0) := unsigned(BusA);
|
||||
DAA_Q(8) := '0';
|
||||
if F_In(Flag_N) = '0' then
|
||||
-- After addition
|
||||
-- Alow > 9 or H = 1
|
||||
if DAA_Q(3 downto 0) > 9 or F_In(Flag_H) = '1' then
|
||||
if (DAA_Q(3 downto 0) > 9) then
|
||||
F_Out(Flag_H) <= '1';
|
||||
else
|
||||
F_Out(Flag_H) <= '0';
|
||||
end if;
|
||||
DAA_Q := DAA_Q + 6;
|
||||
end if;
|
||||
-- new Ahigh > 9 or C = 1
|
||||
if DAA_Q(8 downto 4) > 9 or F_In(Flag_C) = '1' then
|
||||
DAA_Q := DAA_Q + 96; -- 0x60
|
||||
end if;
|
||||
else
|
||||
-- After subtraction
|
||||
if DAA_Q(3 downto 0) > 9 or F_In(Flag_H) = '1' then
|
||||
if DAA_Q(3 downto 0) > 5 then
|
||||
F_Out(Flag_H) <= '0';
|
||||
end if;
|
||||
DAA_Q(7 downto 0) := DAA_Q(7 downto 0) - 6;
|
||||
end if;
|
||||
if unsigned(BusA) > 153 or F_In(Flag_C) = '1' then
|
||||
DAA_Q := DAA_Q - 352; -- 0x160
|
||||
end if;
|
||||
end if;
|
||||
F_Out(Flag_X) <= DAA_Q(3);
|
||||
F_Out(Flag_Y) <= DAA_Q(5);
|
||||
F_Out(Flag_C) <= F_In(Flag_C) or DAA_Q(8);
|
||||
Q_t := std_logic_vector(DAA_Q(7 downto 0));
|
||||
if DAA_Q(7 downto 0) = "00000000" then
|
||||
F_Out(Flag_Z) <= '1';
|
||||
else
|
||||
F_Out(Flag_Z) <= '0';
|
||||
end if;
|
||||
F_Out(Flag_S) <= DAA_Q(7);
|
||||
F_Out(Flag_P) <= not (DAA_Q(0) xor DAA_Q(1) xor DAA_Q(2) xor DAA_Q(3) xor
|
||||
DAA_Q(4) xor DAA_Q(5) xor DAA_Q(6) xor DAA_Q(7));
|
||||
when "1101" | "1110" =>
|
||||
-- RLD, RRD
|
||||
Q_t(7 downto 4) := BusA(7 downto 4);
|
||||
if ALU_Op(0) = '1' then
|
||||
Q_t(3 downto 0) := BusB(7 downto 4);
|
||||
else
|
||||
Q_t(3 downto 0) := BusB(3 downto 0);
|
||||
end if;
|
||||
F_Out(Flag_H) <= '0';
|
||||
F_Out(Flag_N) <= '0';
|
||||
F_Out(Flag_X) <= Q_t(3);
|
||||
F_Out(Flag_Y) <= Q_t(5);
|
||||
if Q_t(7 downto 0) = "00000000" then
|
||||
F_Out(Flag_Z) <= '1';
|
||||
else
|
||||
F_Out(Flag_Z) <= '0';
|
||||
end if;
|
||||
F_Out(Flag_S) <= Q_t(7);
|
||||
F_Out(Flag_P) <= not (Q_t(0) xor Q_t(1) xor Q_t(2) xor Q_t(3) xor
|
||||
Q_t(4) xor Q_t(5) xor Q_t(6) xor Q_t(7));
|
||||
when "1001" =>
|
||||
-- BIT
|
||||
Q_t(7 downto 0) := BusB and BitMask;
|
||||
F_Out(Flag_S) <= Q_t(7);
|
||||
if Q_t(7 downto 0) = "00000000" then
|
||||
F_Out(Flag_Z) <= '1';
|
||||
F_Out(Flag_P) <= '1';
|
||||
else
|
||||
F_Out(Flag_Z) <= '0';
|
||||
F_Out(Flag_P) <= '0';
|
||||
end if;
|
||||
F_Out(Flag_H) <= '1';
|
||||
F_Out(Flag_N) <= '0';
|
||||
F_Out(Flag_X) <= '0';
|
||||
F_Out(Flag_Y) <= '0';
|
||||
if IR(2 downto 0) /= "110" then
|
||||
F_Out(Flag_X) <= BusB(3);
|
||||
F_Out(Flag_Y) <= BusB(5);
|
||||
end if;
|
||||
when "1010" =>
|
||||
-- SET
|
||||
Q_t(7 downto 0) := BusB or BitMask;
|
||||
when "1011" =>
|
||||
-- RES
|
||||
Q_t(7 downto 0) := BusB and not BitMask;
|
||||
when "1000" =>
|
||||
-- ROT
|
||||
case IR(5 downto 3) is
|
||||
when "000" => -- RLC
|
||||
Q_t(7 downto 1) := BusA(6 downto 0);
|
||||
Q_t(0) := BusA(7);
|
||||
F_Out(Flag_C) <= BusA(7);
|
||||
when "010" => -- RL
|
||||
Q_t(7 downto 1) := BusA(6 downto 0);
|
||||
Q_t(0) := F_In(Flag_C);
|
||||
F_Out(Flag_C) <= BusA(7);
|
||||
when "001" => -- RRC
|
||||
Q_t(6 downto 0) := BusA(7 downto 1);
|
||||
Q_t(7) := BusA(0);
|
||||
F_Out(Flag_C) <= BusA(0);
|
||||
when "011" => -- RR
|
||||
Q_t(6 downto 0) := BusA(7 downto 1);
|
||||
Q_t(7) := F_In(Flag_C);
|
||||
F_Out(Flag_C) <= BusA(0);
|
||||
when "100" => -- SLA
|
||||
Q_t(7 downto 1) := BusA(6 downto 0);
|
||||
Q_t(0) := '0';
|
||||
F_Out(Flag_C) <= BusA(7);
|
||||
when "110" => -- SLL (Undocumented) / SWAP
|
||||
if Mode = 3 then
|
||||
Q_t(7 downto 4) := BusA(3 downto 0);
|
||||
Q_t(3 downto 0) := BusA(7 downto 4);
|
||||
F_Out(Flag_C) <= '0';
|
||||
else
|
||||
Q_t(7 downto 1) := BusA(6 downto 0);
|
||||
Q_t(0) := '1';
|
||||
F_Out(Flag_C) <= BusA(7);
|
||||
end if;
|
||||
when "101" => -- SRA
|
||||
Q_t(6 downto 0) := BusA(7 downto 1);
|
||||
Q_t(7) := BusA(7);
|
||||
F_Out(Flag_C) <= BusA(0);
|
||||
when others => -- SRL
|
||||
Q_t(6 downto 0) := BusA(7 downto 1);
|
||||
Q_t(7) := '0';
|
||||
F_Out(Flag_C) <= BusA(0);
|
||||
end case;
|
||||
F_Out(Flag_H) <= '0';
|
||||
F_Out(Flag_N) <= '0';
|
||||
F_Out(Flag_X) <= Q_t(3);
|
||||
F_Out(Flag_Y) <= Q_t(5);
|
||||
F_Out(Flag_S) <= Q_t(7);
|
||||
if Q_t(7 downto 0) = "00000000" then
|
||||
F_Out(Flag_Z) <= '1';
|
||||
else
|
||||
F_Out(Flag_Z) <= '0';
|
||||
end if;
|
||||
F_Out(Flag_P) <= not (Q_t(0) xor Q_t(1) xor Q_t(2) xor Q_t(3) xor
|
||||
Q_t(4) xor Q_t(5) xor Q_t(6) xor Q_t(7));
|
||||
if ISet = "00" then
|
||||
F_Out(Flag_P) <= F_In(Flag_P);
|
||||
F_Out(Flag_S) <= F_In(Flag_S);
|
||||
F_Out(Flag_Z) <= F_In(Flag_Z);
|
||||
end if;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
Q <= Q_t;
|
||||
end process;
|
||||
|
||||
end;
|
||||
1934
Computer_MiST/Galaksija_MiST/rtl/T80/T80_MCode.vhd
Normal file
208
Computer_MiST/Galaksija_MiST/rtl/T80/T80_Pack.vhd
Normal file
@@ -0,0 +1,208 @@
|
||||
--
|
||||
-- Z80 compatible microprocessor core
|
||||
--
|
||||
-- Version : 0242
|
||||
--
|
||||
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
|
||||
--
|
||||
-- All rights reserved
|
||||
--
|
||||
-- Redistribution and use in source and synthezised forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are met:
|
||||
--
|
||||
-- Redistributions of source code must retain the above copyright notice,
|
||||
-- this list of conditions and the following disclaimer.
|
||||
--
|
||||
-- Redistributions in synthesized form must reproduce the above copyright
|
||||
-- notice, this list of conditions and the following disclaimer in the
|
||||
-- documentation and/or other materials provided with the distribution.
|
||||
--
|
||||
-- Neither the name of the author nor the names of other contributors may
|
||||
-- be used to endorse or promote products derived from this software without
|
||||
-- specific prior written permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
||||
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
--
|
||||
-- Please report bugs to the author, but before you do so, please
|
||||
-- make sure that this is not a derivative work and that
|
||||
-- you have the latest version of this file.
|
||||
--
|
||||
-- The latest version of this file can be found at:
|
||||
-- http://www.opencores.org/cvsweb.shtml/t80/
|
||||
--
|
||||
-- Limitations :
|
||||
--
|
||||
-- File history :
|
||||
--
|
||||
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
|
||||
package T80_Pack is
|
||||
|
||||
component T80
|
||||
generic(
|
||||
Mode : integer := 0; -- 0 => Z80, 1 => Fast Z80, 2 => 8080, 3 => GB
|
||||
IOWait : integer := 0; -- 1 => Single cycle I/O, 1 => Std I/O cycle
|
||||
Flag_C : integer := 0;
|
||||
Flag_N : integer := 1;
|
||||
Flag_P : integer := 2;
|
||||
Flag_X : integer := 3;
|
||||
Flag_H : integer := 4;
|
||||
Flag_Y : integer := 5;
|
||||
Flag_Z : integer := 6;
|
||||
Flag_S : integer := 7
|
||||
);
|
||||
port(
|
||||
RESET_n : in std_logic;
|
||||
CLK_n : in std_logic;
|
||||
CEN : in std_logic;
|
||||
WAIT_n : in std_logic;
|
||||
INT_n : in std_logic;
|
||||
NMI_n : in std_logic;
|
||||
BUSRQ_n : in std_logic;
|
||||
M1_n : out std_logic;
|
||||
IORQ : out std_logic;
|
||||
NoRead : out std_logic;
|
||||
Write : out std_logic;
|
||||
RFSH_n : out std_logic;
|
||||
HALT_n : out std_logic;
|
||||
BUSAK_n : out std_logic;
|
||||
A : out std_logic_vector(15 downto 0);
|
||||
DInst : in std_logic_vector(7 downto 0);
|
||||
DI : in std_logic_vector(7 downto 0);
|
||||
DO : out std_logic_vector(7 downto 0);
|
||||
MC : out std_logic_vector(2 downto 0);
|
||||
TS : out std_logic_vector(2 downto 0);
|
||||
IntCycle_n : out std_logic;
|
||||
IntE : out std_logic;
|
||||
Stop : out std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
component T80_Reg
|
||||
port(
|
||||
Clk : in std_logic;
|
||||
CEN : in std_logic;
|
||||
WEH : in std_logic;
|
||||
WEL : in std_logic;
|
||||
AddrA : in std_logic_vector(2 downto 0);
|
||||
AddrB : in std_logic_vector(2 downto 0);
|
||||
AddrC : in std_logic_vector(2 downto 0);
|
||||
DIH : in std_logic_vector(7 downto 0);
|
||||
DIL : in std_logic_vector(7 downto 0);
|
||||
DOAH : out std_logic_vector(7 downto 0);
|
||||
DOAL : out std_logic_vector(7 downto 0);
|
||||
DOBH : out std_logic_vector(7 downto 0);
|
||||
DOBL : out std_logic_vector(7 downto 0);
|
||||
DOCH : out std_logic_vector(7 downto 0);
|
||||
DOCL : out std_logic_vector(7 downto 0)
|
||||
);
|
||||
end component;
|
||||
|
||||
component T80_MCode
|
||||
generic(
|
||||
Mode : integer := 0;
|
||||
Flag_C : integer := 0;
|
||||
Flag_N : integer := 1;
|
||||
Flag_P : integer := 2;
|
||||
Flag_X : integer := 3;
|
||||
Flag_H : integer := 4;
|
||||
Flag_Y : integer := 5;
|
||||
Flag_Z : integer := 6;
|
||||
Flag_S : integer := 7
|
||||
);
|
||||
port(
|
||||
IR : in std_logic_vector(7 downto 0);
|
||||
ISet : in std_logic_vector(1 downto 0);
|
||||
MCycle : in std_logic_vector(2 downto 0);
|
||||
F : in std_logic_vector(7 downto 0);
|
||||
NMICycle : in std_logic;
|
||||
IntCycle : in std_logic;
|
||||
MCycles : out std_logic_vector(2 downto 0);
|
||||
TStates : out std_logic_vector(2 downto 0);
|
||||
Prefix : out std_logic_vector(1 downto 0); -- None,BC,ED,DD/FD
|
||||
Inc_PC : out std_logic;
|
||||
Inc_WZ : out std_logic;
|
||||
IncDec_16 : out std_logic_vector(3 downto 0); -- BC,DE,HL,SP 0 is inc
|
||||
Read_To_Reg : out std_logic;
|
||||
Read_To_Acc : out std_logic;
|
||||
Set_BusA_To : out std_logic_vector(3 downto 0); -- B,C,D,E,H,L,DI/DB,A,SP(L),SP(M),0,F
|
||||
Set_BusB_To : out std_logic_vector(3 downto 0); -- B,C,D,E,H,L,DI,A,SP(L),SP(M),1,F,PC(L),PC(M),0
|
||||
ALU_Op : out std_logic_vector(3 downto 0);
|
||||
-- ADD, ADC, SUB, SBC, AND, XOR, OR, CP, ROT, BIT, SET, RES, DAA, RLD, RRD, None
|
||||
Save_ALU : out std_logic;
|
||||
PreserveC : out std_logic;
|
||||
Arith16 : out std_logic;
|
||||
Set_Addr_To : out std_logic_vector(2 downto 0); -- aNone,aXY,aIOA,aSP,aBC,aDE,aZI
|
||||
IORQ : out std_logic;
|
||||
Jump : out std_logic;
|
||||
JumpE : out std_logic;
|
||||
JumpXY : out std_logic;
|
||||
Call : out std_logic;
|
||||
RstP : out std_logic;
|
||||
LDZ : out std_logic;
|
||||
LDW : out std_logic;
|
||||
LDSPHL : out std_logic;
|
||||
Special_LD : out std_logic_vector(2 downto 0); -- A,I;A,R;I,A;R,A;None
|
||||
ExchangeDH : out std_logic;
|
||||
ExchangeRp : out std_logic;
|
||||
ExchangeAF : out std_logic;
|
||||
ExchangeRS : out std_logic;
|
||||
I_DJNZ : out std_logic;
|
||||
I_CPL : out std_logic;
|
||||
I_CCF : out std_logic;
|
||||
I_SCF : out std_logic;
|
||||
I_RETN : out std_logic;
|
||||
I_BT : out std_logic;
|
||||
I_BC : out std_logic;
|
||||
I_BTR : out std_logic;
|
||||
I_RLD : out std_logic;
|
||||
I_RRD : out std_logic;
|
||||
I_INRC : out std_logic;
|
||||
SetDI : out std_logic;
|
||||
SetEI : out std_logic;
|
||||
IMode : out std_logic_vector(1 downto 0);
|
||||
Halt : out std_logic;
|
||||
NoRead : out std_logic;
|
||||
Write : out std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
component T80_ALU
|
||||
generic(
|
||||
Mode : integer := 0;
|
||||
Flag_C : integer := 0;
|
||||
Flag_N : integer := 1;
|
||||
Flag_P : integer := 2;
|
||||
Flag_X : integer := 3;
|
||||
Flag_H : integer := 4;
|
||||
Flag_Y : integer := 5;
|
||||
Flag_Z : integer := 6;
|
||||
Flag_S : integer := 7
|
||||
);
|
||||
port(
|
||||
Arith16 : in std_logic;
|
||||
Z16 : in std_logic;
|
||||
ALU_Op : in std_logic_vector(3 downto 0);
|
||||
IR : in std_logic_vector(5 downto 0);
|
||||
ISet : in std_logic_vector(1 downto 0);
|
||||
BusA : in std_logic_vector(7 downto 0);
|
||||
BusB : in std_logic_vector(7 downto 0);
|
||||
F_In : in std_logic_vector(7 downto 0);
|
||||
Q : out std_logic_vector(7 downto 0);
|
||||
F_Out : out std_logic_vector(7 downto 0)
|
||||
);
|
||||
end component;
|
||||
|
||||
end;
|
||||
105
Computer_MiST/Galaksija_MiST/rtl/T80/T80_Reg.vhd
Normal file
@@ -0,0 +1,105 @@
|
||||
--
|
||||
-- T80 Registers, technology independent
|
||||
--
|
||||
-- Version : 0244
|
||||
--
|
||||
-- Copyright (c) 2002 Daniel Wallner (jesus@opencores.org)
|
||||
--
|
||||
-- All rights reserved
|
||||
--
|
||||
-- Redistribution and use in source and synthezised forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are met:
|
||||
--
|
||||
-- Redistributions of source code must retain the above copyright notice,
|
||||
-- this list of conditions and the following disclaimer.
|
||||
--
|
||||
-- Redistributions in synthesized form must reproduce the above copyright
|
||||
-- notice, this list of conditions and the following disclaimer in the
|
||||
-- documentation and/or other materials provided with the distribution.
|
||||
--
|
||||
-- Neither the name of the author nor the names of other contributors may
|
||||
-- be used to endorse or promote products derived from this software without
|
||||
-- specific prior written permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
||||
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
--
|
||||
-- Please report bugs to the author, but before you do so, please
|
||||
-- make sure that this is not a derivative work and that
|
||||
-- you have the latest version of this file.
|
||||
--
|
||||
-- The latest version of this file can be found at:
|
||||
-- http://www.opencores.org/cvsweb.shtml/t51/
|
||||
--
|
||||
-- Limitations :
|
||||
--
|
||||
-- File history :
|
||||
--
|
||||
-- 0242 : Initial release
|
||||
--
|
||||
-- 0244 : Changed to single register file
|
||||
--
|
||||
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
use IEEE.numeric_std.all;
|
||||
|
||||
entity T80_Reg is
|
||||
port(
|
||||
Clk : in std_logic;
|
||||
CEN : in std_logic;
|
||||
WEH : in std_logic;
|
||||
WEL : in std_logic;
|
||||
AddrA : in std_logic_vector(2 downto 0);
|
||||
AddrB : in std_logic_vector(2 downto 0);
|
||||
AddrC : in std_logic_vector(2 downto 0);
|
||||
DIH : in std_logic_vector(7 downto 0);
|
||||
DIL : in std_logic_vector(7 downto 0);
|
||||
DOAH : out std_logic_vector(7 downto 0);
|
||||
DOAL : out std_logic_vector(7 downto 0);
|
||||
DOBH : out std_logic_vector(7 downto 0);
|
||||
DOBL : out std_logic_vector(7 downto 0);
|
||||
DOCH : out std_logic_vector(7 downto 0);
|
||||
DOCL : out std_logic_vector(7 downto 0)
|
||||
);
|
||||
end T80_Reg;
|
||||
|
||||
architecture rtl of T80_Reg is
|
||||
|
||||
type Register_Image is array (natural range <>) of std_logic_vector(7 downto 0);
|
||||
signal RegsH : Register_Image(0 to 7);
|
||||
signal RegsL : Register_Image(0 to 7);
|
||||
|
||||
begin
|
||||
|
||||
process (Clk)
|
||||
begin
|
||||
if Clk'event and Clk = '1' then
|
||||
if CEN = '1' then
|
||||
if WEH = '1' then
|
||||
RegsH(to_integer(unsigned(AddrA))) <= DIH;
|
||||
end if;
|
||||
if WEL = '1' then
|
||||
RegsL(to_integer(unsigned(AddrA))) <= DIL;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
DOAH <= RegsH(to_integer(unsigned(AddrA)));
|
||||
DOAL <= RegsL(to_integer(unsigned(AddrA)));
|
||||
DOBH <= RegsH(to_integer(unsigned(AddrB)));
|
||||
DOBL <= RegsL(to_integer(unsigned(AddrB)));
|
||||
DOCH <= RegsH(to_integer(unsigned(AddrC)));
|
||||
DOCL <= RegsL(to_integer(unsigned(AddrC)));
|
||||
|
||||
end;
|
||||
253
Computer_MiST/Galaksija_MiST/rtl/T80/T80a.vhd
Normal file
@@ -0,0 +1,253 @@
|
||||
--
|
||||
-- Z80 compatible microprocessor core, asynchronous top level
|
||||
--
|
||||
-- Version : 0247
|
||||
--
|
||||
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
|
||||
--
|
||||
-- All rights reserved
|
||||
--
|
||||
-- Redistribution and use in source and synthezised forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are met:
|
||||
--
|
||||
-- Redistributions of source code must retain the above copyright notice,
|
||||
-- this list of conditions and the following disclaimer.
|
||||
--
|
||||
-- Redistributions in synthesized form must reproduce the above copyright
|
||||
-- notice, this list of conditions and the following disclaimer in the
|
||||
-- documentation and/or other materials provided with the distribution.
|
||||
--
|
||||
-- Neither the name of the author nor the names of other contributors may
|
||||
-- be used to endorse or promote products derived from this software without
|
||||
-- specific prior written permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
||||
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
--
|
||||
-- Please report bugs to the author, but before you do so, please
|
||||
-- make sure that this is not a derivative work and that
|
||||
-- you have the latest version of this file.
|
||||
--
|
||||
-- The latest version of this file can be found at:
|
||||
-- http://www.opencores.org/cvsweb.shtml/t80/
|
||||
--
|
||||
-- Limitations :
|
||||
--
|
||||
-- File history :
|
||||
--
|
||||
-- 0208 : First complete release
|
||||
--
|
||||
-- 0211 : Fixed interrupt cycle
|
||||
--
|
||||
-- 0235 : Updated for T80 interface change
|
||||
--
|
||||
-- 0238 : Updated for T80 interface change
|
||||
--
|
||||
-- 0240 : Updated for T80 interface change
|
||||
--
|
||||
-- 0242 : Updated for T80 interface change
|
||||
--
|
||||
-- 0247 : Fixed bus req/ack cycle
|
||||
--
|
||||
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
use IEEE.numeric_std.all;
|
||||
use work.T80_Pack.all;
|
||||
|
||||
entity T80a is
|
||||
generic(
|
||||
Mode : integer := 0 -- 0 => Z80, 1 => Fast Z80, 2 => 8080, 3 => GB
|
||||
);
|
||||
port(
|
||||
RESET_n : in std_logic;
|
||||
CLK_n : in std_logic;
|
||||
WAIT_n : in std_logic;
|
||||
INT_n : in std_logic;
|
||||
NMI_n : in std_logic;
|
||||
BUSRQ_n : in std_logic;
|
||||
M1_n : out std_logic;
|
||||
MREQ_n : out std_logic;
|
||||
IORQ_n : out std_logic;
|
||||
RD_n : out std_logic;
|
||||
WR_n : out std_logic;
|
||||
RFSH_n : out std_logic;
|
||||
HALT_n : out std_logic;
|
||||
BUSAK_n : out std_logic;
|
||||
A : out std_logic_vector(15 downto 0);
|
||||
D : inout std_logic_vector(7 downto 0)
|
||||
);
|
||||
end T80a;
|
||||
|
||||
architecture rtl of T80a is
|
||||
|
||||
signal CEN : std_logic;
|
||||
signal Reset_s : std_logic;
|
||||
signal IntCycle_n : std_logic;
|
||||
signal IORQ : std_logic;
|
||||
signal NoRead : std_logic;
|
||||
signal Write : std_logic;
|
||||
signal MREQ : std_logic;
|
||||
signal MReq_Inhibit : std_logic;
|
||||
signal Req_Inhibit : std_logic;
|
||||
signal RD : std_logic;
|
||||
signal MREQ_n_i : std_logic;
|
||||
signal IORQ_n_i : std_logic;
|
||||
signal RD_n_i : std_logic;
|
||||
signal WR_n_i : std_logic;
|
||||
signal RFSH_n_i : std_logic;
|
||||
signal BUSAK_n_i : std_logic;
|
||||
signal A_i : std_logic_vector(15 downto 0);
|
||||
signal DO : std_logic_vector(7 downto 0);
|
||||
signal DI_Reg : std_logic_vector (7 downto 0); -- Input synchroniser
|
||||
signal Wait_s : std_logic;
|
||||
signal MCycle : std_logic_vector(2 downto 0);
|
||||
signal TState : std_logic_vector(2 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
CEN <= '1';
|
||||
|
||||
BUSAK_n <= BUSAK_n_i;
|
||||
MREQ_n_i <= not MREQ or (Req_Inhibit and MReq_Inhibit);
|
||||
RD_n_i <= not RD or Req_Inhibit;
|
||||
|
||||
MREQ_n <= MREQ_n_i when BUSAK_n_i = '1' else 'Z';
|
||||
IORQ_n <= IORQ_n_i when BUSAK_n_i = '1' else 'Z';
|
||||
RD_n <= RD_n_i when BUSAK_n_i = '1' else 'Z';
|
||||
WR_n <= WR_n_i when BUSAK_n_i = '1' else 'Z';
|
||||
RFSH_n <= RFSH_n_i when BUSAK_n_i = '1' else 'Z';
|
||||
A <= A_i when BUSAK_n_i = '1' else (others => 'Z');
|
||||
D <= DO when Write = '1' and BUSAK_n_i = '1' else (others => 'Z');
|
||||
|
||||
process (RESET_n, CLK_n)
|
||||
begin
|
||||
if RESET_n = '0' then
|
||||
Reset_s <= '0';
|
||||
elsif CLK_n'event and CLK_n = '1' then
|
||||
Reset_s <= '1';
|
||||
end if;
|
||||
end process;
|
||||
|
||||
u0 : T80
|
||||
generic map(
|
||||
Mode => Mode,
|
||||
IOWait => 1)
|
||||
port map(
|
||||
CEN => CEN,
|
||||
M1_n => M1_n,
|
||||
IORQ => IORQ,
|
||||
NoRead => NoRead,
|
||||
Write => Write,
|
||||
RFSH_n => RFSH_n_i,
|
||||
HALT_n => HALT_n,
|
||||
WAIT_n => Wait_s,
|
||||
INT_n => INT_n,
|
||||
NMI_n => NMI_n,
|
||||
RESET_n => Reset_s,
|
||||
BUSRQ_n => BUSRQ_n,
|
||||
BUSAK_n => BUSAK_n_i,
|
||||
CLK_n => CLK_n,
|
||||
A => A_i,
|
||||
DInst => D,
|
||||
DI => DI_Reg,
|
||||
DO => DO,
|
||||
MC => MCycle,
|
||||
TS => TState,
|
||||
IntCycle_n => IntCycle_n);
|
||||
|
||||
process (CLK_n)
|
||||
begin
|
||||
if CLK_n'event and CLK_n = '0' then
|
||||
Wait_s <= WAIT_n;
|
||||
if TState = "011" and BUSAK_n_i = '1' then
|
||||
DI_Reg <= to_x01(D);
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
process (Reset_s,CLK_n)
|
||||
begin
|
||||
if Reset_s = '0' then
|
||||
WR_n_i <= '1';
|
||||
elsif CLK_n'event and CLK_n = '1' then
|
||||
WR_n_i <= '1';
|
||||
if TState = "001" then -- To short for IO writes !!!!!!!!!!!!!!!!!!!
|
||||
WR_n_i <= not Write;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
process (Reset_s,CLK_n)
|
||||
begin
|
||||
if Reset_s = '0' then
|
||||
Req_Inhibit <= '0';
|
||||
elsif CLK_n'event and CLK_n = '1' then
|
||||
if MCycle = "001" and TState = "010" then
|
||||
Req_Inhibit <= '1';
|
||||
else
|
||||
Req_Inhibit <= '0';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
process (Reset_s,CLK_n)
|
||||
begin
|
||||
if Reset_s = '0' then
|
||||
MReq_Inhibit <= '0';
|
||||
elsif CLK_n'event and CLK_n = '0' then
|
||||
if MCycle = "001" and TState = "010" then
|
||||
MReq_Inhibit <= '1';
|
||||
else
|
||||
MReq_Inhibit <= '0';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
process(Reset_s,CLK_n)
|
||||
begin
|
||||
if Reset_s = '0' then
|
||||
RD <= '0';
|
||||
IORQ_n_i <= '1';
|
||||
MREQ <= '0';
|
||||
elsif CLK_n'event and CLK_n = '0' then
|
||||
|
||||
if MCycle = "001" then
|
||||
if TState = "001" then
|
||||
RD <= IntCycle_n;
|
||||
MREQ <= IntCycle_n;
|
||||
IORQ_n_i <= IntCycle_n;
|
||||
end if;
|
||||
if TState = "011" then
|
||||
RD <= '0';
|
||||
IORQ_n_i <= '1';
|
||||
MREQ <= '1';
|
||||
end if;
|
||||
if TState = "100" then
|
||||
MREQ <= '0';
|
||||
end if;
|
||||
else
|
||||
if TState = "001" and NoRead = '0' then
|
||||
RD <= not Write;
|
||||
IORQ_n_i <= not IORQ;
|
||||
MREQ <= not IORQ;
|
||||
end if;
|
||||
if TState = "011" then
|
||||
RD <= '0';
|
||||
IORQ_n_i <= '1';
|
||||
MREQ <= '0';
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end;
|
||||
190
Computer_MiST/Galaksija_MiST/rtl/T80/T80s.vhd
Normal file
@@ -0,0 +1,190 @@
|
||||
--
|
||||
-- Z80 compatible microprocessor core, synchronous top level
|
||||
-- Different timing than the original z80
|
||||
-- Inputs needs to be synchronous and outputs may glitch
|
||||
--
|
||||
-- Version : 0242
|
||||
--
|
||||
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
|
||||
--
|
||||
-- All rights reserved
|
||||
--
|
||||
-- Redistribution and use in source and synthezised forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are met:
|
||||
--
|
||||
-- Redistributions of source code must retain the above copyright notice,
|
||||
-- this list of conditions and the following disclaimer.
|
||||
--
|
||||
-- Redistributions in synthesized form must reproduce the above copyright
|
||||
-- notice, this list of conditions and the following disclaimer in the
|
||||
-- documentation and/or other materials provided with the distribution.
|
||||
--
|
||||
-- Neither the name of the author nor the names of other contributors may
|
||||
-- be used to endorse or promote products derived from this software without
|
||||
-- specific prior written permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
||||
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
--
|
||||
-- Please report bugs to the author, but before you do so, please
|
||||
-- make sure that this is not a derivative work and that
|
||||
-- you have the latest version of this file.
|
||||
--
|
||||
-- The latest version of this file can be found at:
|
||||
-- http://www.opencores.org/cvsweb.shtml/t80/
|
||||
--
|
||||
-- Limitations :
|
||||
--
|
||||
-- File history :
|
||||
--
|
||||
-- 0208 : First complete release
|
||||
--
|
||||
-- 0210 : Fixed read with wait
|
||||
--
|
||||
-- 0211 : Fixed interrupt cycle
|
||||
--
|
||||
-- 0235 : Updated for T80 interface change
|
||||
--
|
||||
-- 0236 : Added T2Write generic
|
||||
--
|
||||
-- 0237 : Fixed T2Write with wait state
|
||||
--
|
||||
-- 0238 : Updated for T80 interface change
|
||||
--
|
||||
-- 0240 : Updated for T80 interface change
|
||||
--
|
||||
-- 0242 : Updated for T80 interface change
|
||||
--
|
||||
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
use IEEE.numeric_std.all;
|
||||
use work.T80_Pack.all;
|
||||
|
||||
entity T80s is
|
||||
generic(
|
||||
Mode : integer := 0; -- 0 => Z80, 1 => Fast Z80, 2 => 8080, 3 => GB
|
||||
T2Write : integer := 0; -- 0 => WR_n active in T3, /=0 => WR_n active in T2
|
||||
IOWait : integer := 1 -- 0 => Single cycle I/O, 1 => Std I/O cycle
|
||||
);
|
||||
port(
|
||||
RESET_n : in std_logic;
|
||||
CLK_n : in std_logic;
|
||||
WAIT_n : in std_logic;
|
||||
INT_n : in std_logic;
|
||||
NMI_n : in std_logic;
|
||||
BUSRQ_n : in std_logic;
|
||||
M1_n : out std_logic;
|
||||
MREQ_n : out std_logic;
|
||||
IORQ_n : out std_logic;
|
||||
RD_n : out std_logic;
|
||||
WR_n : out std_logic;
|
||||
RFSH_n : out std_logic;
|
||||
HALT_n : out std_logic;
|
||||
BUSAK_n : out std_logic;
|
||||
A : out std_logic_vector(15 downto 0);
|
||||
DI : in std_logic_vector(7 downto 0);
|
||||
DO : out std_logic_vector(7 downto 0)
|
||||
);
|
||||
end T80s;
|
||||
|
||||
architecture rtl of T80s is
|
||||
|
||||
signal CEN : std_logic;
|
||||
signal IntCycle_n : std_logic;
|
||||
signal NoRead : std_logic;
|
||||
signal Write : std_logic;
|
||||
signal IORQ : std_logic;
|
||||
signal DI_Reg : std_logic_vector(7 downto 0);
|
||||
signal MCycle : std_logic_vector(2 downto 0);
|
||||
signal TState : std_logic_vector(2 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
CEN <= '1';
|
||||
|
||||
u0 : T80
|
||||
generic map(
|
||||
Mode => Mode,
|
||||
IOWait => IOWait)
|
||||
port map(
|
||||
CEN => CEN,
|
||||
M1_n => M1_n,
|
||||
IORQ => IORQ,
|
||||
NoRead => NoRead,
|
||||
Write => Write,
|
||||
RFSH_n => RFSH_n,
|
||||
HALT_n => HALT_n,
|
||||
WAIT_n => Wait_n,
|
||||
INT_n => INT_n,
|
||||
NMI_n => NMI_n,
|
||||
RESET_n => RESET_n,
|
||||
BUSRQ_n => BUSRQ_n,
|
||||
BUSAK_n => BUSAK_n,
|
||||
CLK_n => CLK_n,
|
||||
A => A,
|
||||
DInst => DI,
|
||||
DI => DI_Reg,
|
||||
DO => DO,
|
||||
MC => MCycle,
|
||||
TS => TState,
|
||||
IntCycle_n => IntCycle_n);
|
||||
|
||||
process (RESET_n, CLK_n)
|
||||
begin
|
||||
if RESET_n = '0' then
|
||||
RD_n <= '1';
|
||||
WR_n <= '1';
|
||||
IORQ_n <= '1';
|
||||
MREQ_n <= '1';
|
||||
DI_Reg <= "00000000";
|
||||
elsif CLK_n'event and CLK_n = '1' then
|
||||
RD_n <= '1';
|
||||
WR_n <= '1';
|
||||
IORQ_n <= '1';
|
||||
MREQ_n <= '1';
|
||||
if MCycle = "001" then
|
||||
if TState = "001" or (TState = "010" and Wait_n = '0') then
|
||||
RD_n <= not IntCycle_n;
|
||||
MREQ_n <= not IntCycle_n;
|
||||
IORQ_n <= IntCycle_n;
|
||||
end if;
|
||||
if TState = "011" then
|
||||
MREQ_n <= '0';
|
||||
end if;
|
||||
else
|
||||
if (TState = "001" or (TState = "010" and Wait_n = '0')) and NoRead = '0' and Write = '0' then
|
||||
RD_n <= '0';
|
||||
IORQ_n <= not IORQ;
|
||||
MREQ_n <= IORQ;
|
||||
end if;
|
||||
if T2Write = 0 then
|
||||
if TState = "010" and Write = '1' then
|
||||
WR_n <= '0';
|
||||
IORQ_n <= not IORQ;
|
||||
MREQ_n <= IORQ;
|
||||
end if;
|
||||
else
|
||||
if (TState = "001" or (TState = "010" and Wait_n = '0')) and Write = '1' then
|
||||
WR_n <= '0';
|
||||
IORQ_n <= not IORQ;
|
||||
MREQ_n <= IORQ;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
if TState = "010" and Wait_n = '1' then
|
||||
DI_Reg <= DI;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end;
|
||||
184
Computer_MiST/Galaksija_MiST/rtl/T80/T80se.vhd
Normal file
@@ -0,0 +1,184 @@
|
||||
--
|
||||
-- Z80 compatible microprocessor core, synchronous top level with clock enable
|
||||
-- Different timing than the original z80
|
||||
-- Inputs needs to be synchronous and outputs may glitch
|
||||
--
|
||||
-- Version : 0242
|
||||
--
|
||||
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
|
||||
--
|
||||
-- All rights reserved
|
||||
--
|
||||
-- Redistribution and use in source and synthezised forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are met:
|
||||
--
|
||||
-- Redistributions of source code must retain the above copyright notice,
|
||||
-- this list of conditions and the following disclaimer.
|
||||
--
|
||||
-- Redistributions in synthesized form must reproduce the above copyright
|
||||
-- notice, this list of conditions and the following disclaimer in the
|
||||
-- documentation and/or other materials provided with the distribution.
|
||||
--
|
||||
-- Neither the name of the author nor the names of other contributors may
|
||||
-- be used to endorse or promote products derived from this software without
|
||||
-- specific prior written permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
||||
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
--
|
||||
-- Please report bugs to the author, but before you do so, please
|
||||
-- make sure that this is not a derivative work and that
|
||||
-- you have the latest version of this file.
|
||||
--
|
||||
-- The latest version of this file can be found at:
|
||||
-- http://www.opencores.org/cvsweb.shtml/t80/
|
||||
--
|
||||
-- Limitations :
|
||||
--
|
||||
-- File history :
|
||||
--
|
||||
-- 0235 : First release
|
||||
--
|
||||
-- 0236 : Added T2Write generic
|
||||
--
|
||||
-- 0237 : Fixed T2Write with wait state
|
||||
--
|
||||
-- 0238 : Updated for T80 interface change
|
||||
--
|
||||
-- 0240 : Updated for T80 interface change
|
||||
--
|
||||
-- 0242 : Updated for T80 interface change
|
||||
--
|
||||
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
use IEEE.numeric_std.all;
|
||||
use work.T80_Pack.all;
|
||||
|
||||
entity T80se is
|
||||
generic(
|
||||
Mode : integer := 0; -- 0 => Z80, 1 => Fast Z80, 2 => 8080, 3 => GB
|
||||
T2Write : integer := 0; -- 0 => WR_n active in T3, /=0 => WR_n active in T2
|
||||
IOWait : integer := 1 -- 0 => Single cycle I/O, 1 => Std I/O cycle
|
||||
);
|
||||
port(
|
||||
RESET_n : in std_logic;
|
||||
CLK_n : in std_logic;
|
||||
CLKEN : in std_logic;
|
||||
WAIT_n : in std_logic;
|
||||
INT_n : in std_logic;
|
||||
NMI_n : in std_logic;
|
||||
BUSRQ_n : in std_logic;
|
||||
M1_n : out std_logic;
|
||||
MREQ_n : out std_logic;
|
||||
IORQ_n : out std_logic;
|
||||
RD_n : out std_logic;
|
||||
WR_n : out std_logic;
|
||||
RFSH_n : out std_logic;
|
||||
HALT_n : out std_logic;
|
||||
BUSAK_n : out std_logic;
|
||||
A : out std_logic_vector(15 downto 0);
|
||||
DI : in std_logic_vector(7 downto 0);
|
||||
DO : out std_logic_vector(7 downto 0)
|
||||
);
|
||||
end T80se;
|
||||
|
||||
architecture rtl of T80se is
|
||||
|
||||
signal IntCycle_n : std_logic;
|
||||
signal NoRead : std_logic;
|
||||
signal Write : std_logic;
|
||||
signal IORQ : std_logic;
|
||||
signal DI_Reg : std_logic_vector(7 downto 0);
|
||||
signal MCycle : std_logic_vector(2 downto 0);
|
||||
signal TState : std_logic_vector(2 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
u0 : T80
|
||||
generic map(
|
||||
Mode => Mode,
|
||||
IOWait => IOWait)
|
||||
port map(
|
||||
CEN => CLKEN,
|
||||
M1_n => M1_n,
|
||||
IORQ => IORQ,
|
||||
NoRead => NoRead,
|
||||
Write => Write,
|
||||
RFSH_n => RFSH_n,
|
||||
HALT_n => HALT_n,
|
||||
WAIT_n => Wait_n,
|
||||
INT_n => INT_n,
|
||||
NMI_n => NMI_n,
|
||||
RESET_n => RESET_n,
|
||||
BUSRQ_n => BUSRQ_n,
|
||||
BUSAK_n => BUSAK_n,
|
||||
CLK_n => CLK_n,
|
||||
A => A,
|
||||
DInst => DI,
|
||||
DI => DI_Reg,
|
||||
DO => DO,
|
||||
MC => MCycle,
|
||||
TS => TState,
|
||||
IntCycle_n => IntCycle_n);
|
||||
|
||||
process (RESET_n, CLK_n)
|
||||
begin
|
||||
if RESET_n = '0' then
|
||||
RD_n <= '1';
|
||||
WR_n <= '1';
|
||||
IORQ_n <= '1';
|
||||
MREQ_n <= '1';
|
||||
DI_Reg <= "00000000";
|
||||
elsif CLK_n'event and CLK_n = '1' then
|
||||
if CLKEN = '1' then
|
||||
RD_n <= '1';
|
||||
WR_n <= '1';
|
||||
IORQ_n <= '1';
|
||||
MREQ_n <= '1';
|
||||
if MCycle = "001" then
|
||||
if TState = "001" or (TState = "010" and Wait_n = '0') then
|
||||
RD_n <= not IntCycle_n;
|
||||
MREQ_n <= not IntCycle_n;
|
||||
IORQ_n <= IntCycle_n;
|
||||
end if;
|
||||
if TState = "011" then
|
||||
MREQ_n <= '0';
|
||||
end if;
|
||||
else
|
||||
if (TState = "001" or (TState = "010" and Wait_n = '0')) and NoRead = '0' and Write = '0' then
|
||||
RD_n <= '0';
|
||||
IORQ_n <= not IORQ;
|
||||
MREQ_n <= IORQ;
|
||||
end if;
|
||||
if T2Write = 0 then
|
||||
if TState = "010" and Write = '1' then
|
||||
WR_n <= '0';
|
||||
IORQ_n <= not IORQ;
|
||||
MREQ_n <= IORQ;
|
||||
end if;
|
||||
else
|
||||
if (TState = "001" or (TState = "010" and Wait_n = '0')) and Write = '1' then
|
||||
WR_n <= '0';
|
||||
IORQ_n <= not IORQ;
|
||||
MREQ_n <= IORQ;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
if TState = "010" and Wait_n = '1' then
|
||||
DI_Reg <= DI;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end;
|
||||
35
Computer_MiST/Galaksija_MiST/rtl/build_id.tcl
Normal file
@@ -0,0 +1,35 @@
|
||||
# ================================================================================
|
||||
#
|
||||
# Build ID Verilog Module Script
|
||||
# Jeff Wiencrot - 8/1/2011
|
||||
#
|
||||
# Generates a Verilog module that contains a timestamp,
|
||||
# from the current build. These values are available from the build_date, build_time,
|
||||
# physical_address, and host_name output ports of the build_id module in the build_id.v
|
||||
# Verilog source file.
|
||||
#
|
||||
# ================================================================================
|
||||
|
||||
proc generateBuildID_Verilog {} {
|
||||
|
||||
# Get the timestamp (see: http://www.altera.com/support/examples/tcl/tcl-date-time-stamp.html)
|
||||
set buildDate [ clock format [ clock seconds ] -format %y%m%d ]
|
||||
set buildTime [ clock format [ clock seconds ] -format %H%M%S ]
|
||||
|
||||
# Create a Verilog file for output
|
||||
set outputFileName "rtl/build_id.v"
|
||||
set outputFile [open $outputFileName "w"]
|
||||
|
||||
# Output the Verilog source
|
||||
puts $outputFile "`define BUILD_DATE \"$buildDate\""
|
||||
puts $outputFile "`define BUILD_TIME \"$buildTime\""
|
||||
close $outputFile
|
||||
|
||||
# Send confirmation message to the Messages window
|
||||
post_message "Generated build identification Verilog module: [pwd]/$outputFileName"
|
||||
post_message "Date: $buildDate"
|
||||
post_message "Time: $buildTime"
|
||||
}
|
||||
|
||||
# Comment out this line to prevent the process from automatically executing when the file is sourced:
|
||||
generateBuildID_Verilog
|
||||
2
Computer_MiST/Galaksija_MiST/rtl/build_id.v
Normal file
@@ -0,0 +1,2 @@
|
||||
`define BUILD_DATE "181130"
|
||||
`define BUILD_TIME "230736"
|
||||
71
Computer_MiST/Galaksija_MiST/rtl/dac.vhd
Normal file
@@ -0,0 +1,71 @@
|
||||
-------------------------------------------------------------------------------
|
||||
--
|
||||
-- Delta-Sigma DAC
|
||||
--
|
||||
-- $Id: dac.vhd,v 1.1 2005/10/25 21:09:42 arnim Exp $
|
||||
--
|
||||
-- Refer to Xilinx Application Note XAPP154.
|
||||
--
|
||||
-- This DAC requires an external RC low-pass filter:
|
||||
--
|
||||
-- dac_o 0---XXXXX---+---0 analog audio
|
||||
-- 3k3 |
|
||||
-- === 4n7
|
||||
-- |
|
||||
-- GND
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
entity dac is
|
||||
|
||||
generic (
|
||||
msbi_g : integer := 7
|
||||
);
|
||||
port (
|
||||
clk_i : in std_logic;
|
||||
res_n_i : in std_logic;
|
||||
dac_i : in std_logic_vector(msbi_g downto 0);
|
||||
dac_o : out std_logic
|
||||
);
|
||||
|
||||
end dac;
|
||||
|
||||
library ieee;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
architecture rtl of dac is
|
||||
|
||||
signal DACout_q : std_logic;
|
||||
signal DeltaAdder_s,
|
||||
SigmaAdder_s,
|
||||
SigmaLatch_q,
|
||||
DeltaB_s : unsigned(msbi_g+2 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
DeltaB_s(msbi_g+2 downto msbi_g+1) <= SigmaLatch_q(msbi_g+2) &
|
||||
SigmaLatch_q(msbi_g+2);
|
||||
DeltaB_s(msbi_g downto 0) <= (others => '0');
|
||||
|
||||
DeltaAdder_s <= unsigned('0' & '0' & dac_i) + DeltaB_s;
|
||||
|
||||
SigmaAdder_s <= DeltaAdder_s + SigmaLatch_q;
|
||||
|
||||
seq: process (clk_i, res_n_i)
|
||||
begin
|
||||
if res_n_i = '0' then
|
||||
SigmaLatch_q <= to_unsigned(2**(msbi_g+1), SigmaLatch_q'length);
|
||||
DACout_q <= '0';
|
||||
|
||||
elsif clk_i'event and clk_i = '1' then
|
||||
SigmaLatch_q <= SigmaAdder_s;
|
||||
DACout_q <= SigmaLatch_q(msbi_g+2);
|
||||
end if;
|
||||
end process seq;
|
||||
|
||||
dac_o <= DACout_q;
|
||||
|
||||
end rtl;
|
||||
373
Computer_MiST/Galaksija_MiST/rtl/galaksija_top.sv
Normal file
@@ -0,0 +1,373 @@
|
||||
module galaksija_top(
|
||||
input sysclk,
|
||||
input audclk,
|
||||
input reset_in,
|
||||
input [10:0] ps2_key,
|
||||
output [7:0] audio,
|
||||
input cass_in,
|
||||
output cass_out,
|
||||
output [7:0] video_dat,
|
||||
output video_hs,
|
||||
output video_vs,
|
||||
output video_blankn
|
||||
);
|
||||
|
||||
reg [6:0] reset_cnt = 0;
|
||||
wire cpu_resetn = reset_cnt[6];
|
||||
reg [31:0] int_cnt = 0;
|
||||
|
||||
always @(posedge sysclk) begin
|
||||
if(reset_in == 0)
|
||||
reset_cnt <= 0;
|
||||
else if(cpu_resetn == 0)
|
||||
reset_cnt <= reset_cnt + 1;
|
||||
if (int_cnt==(25000000 / (50 * 2)))
|
||||
begin
|
||||
int_n <= 1'b0;
|
||||
int_cnt <= 0;
|
||||
end
|
||||
else begin
|
||||
int_n <= 1'b1;
|
||||
int_cnt <= int_cnt + 1;
|
||||
end
|
||||
end
|
||||
|
||||
wire m1_n;
|
||||
wire iorq_n;
|
||||
wire rd_n;
|
||||
wire wr_n;
|
||||
wire rfsh_n;
|
||||
wire halt_n;
|
||||
wire busak_n;
|
||||
reg int_n = 1'b1;
|
||||
wire nmi_n;
|
||||
wire busrq_n = 1'b1;
|
||||
wire mreq_n;
|
||||
wire [15:0] addr;
|
||||
wire [7:0] odata;
|
||||
reg [7:0] idata;
|
||||
|
||||
T80s #(
|
||||
.Mode(0),
|
||||
.T2Write(0),
|
||||
.IOWait(1))
|
||||
cpu(
|
||||
.RESET_n(cpu_resetn),
|
||||
.CLK_n(~sysclk),
|
||||
.WAIT_n(1'b1),
|
||||
.INT_n(int_n),
|
||||
.NMI_n(nmi_n),
|
||||
.BUSRQ_n(busrq_n),
|
||||
.M1_n(m1_n),
|
||||
.MREQ_n(mreq_n),
|
||||
.IORQ_n(iorq_n),
|
||||
.RD_n(rd_n),
|
||||
.WR_n(wr_n),
|
||||
.RFSH_n(rfsh_n),
|
||||
.HALT_n(halt_n),
|
||||
.BUSAK_n(busak_n),
|
||||
.A(addr),
|
||||
.DI(idata),
|
||||
.DO(odata)
|
||||
);
|
||||
|
||||
wire [7:0] rom1_out;
|
||||
reg rd_rom1;
|
||||
|
||||
sprom #(
|
||||
.init_file("./roms/ROM1.hex"),
|
||||
.widthad_a(12),
|
||||
.width_a(8))
|
||||
rom1(
|
||||
.address(addr[11:0]),
|
||||
.clock(sysclk & rd_rom1),
|
||||
.q(rom1_out)
|
||||
);
|
||||
|
||||
wire [7:0] rom2_out;
|
||||
reg rd_rom2;
|
||||
|
||||
sprom #(
|
||||
.init_file("./roms/ROM2.hex"),
|
||||
.widthad_a(12),
|
||||
.width_a(8))
|
||||
rom2(
|
||||
.address(addr[11:0]),
|
||||
.clock(sysclk & rd_rom2),
|
||||
.q(rom2_out)
|
||||
);
|
||||
|
||||
/*//todo CS Signal
|
||||
wire [7:0] rom3_out;
|
||||
reg rd_rom3;
|
||||
|
||||
sprom #(
|
||||
.init_file("./roms/galplus.hex"),
|
||||
.widthad_a(12),
|
||||
.width_a(8))
|
||||
rom3(
|
||||
.address(addr[11:0]),
|
||||
.clock(sysclk & rd_rom3),
|
||||
.q(rom3_out)
|
||||
);*/
|
||||
|
||||
reg rd_mram, wr_mram;
|
||||
wire cs_mram0 = ~addr[15] & ~addr[14];
|
||||
wire we_mram0 = wr_mram & cs_mram0;
|
||||
wire [7:0] mram0_out;
|
||||
|
||||
spram #(
|
||||
.widthad_a(14),
|
||||
.width_a(8))
|
||||
ram00(
|
||||
.address(addr[13:0]),
|
||||
.clock(sysclk),
|
||||
.wren(we_mram0),
|
||||
.data(odata),
|
||||
.q(mram0_out)
|
||||
);
|
||||
|
||||
wire cs_mram1 = ~addr[15] & addr[14];
|
||||
wire we_mram1 = wr_mram & cs_mram1;
|
||||
wire [7:0] mram1_out;
|
||||
|
||||
spram #(
|
||||
.widthad_a(14),
|
||||
.width_a(8))
|
||||
ram01(
|
||||
.address(addr[13:0]),
|
||||
.clock(sysclk),
|
||||
.wren(we_mram1),
|
||||
.data(odata),
|
||||
.q(mram1_out)
|
||||
);
|
||||
|
||||
wire cs_mram2 = addr[15] & ~addr[14];
|
||||
wire we_mram2 = wr_mram & cs_mram2;
|
||||
wire [7:0] mram2_out;
|
||||
|
||||
spram #(
|
||||
.widthad_a(14),
|
||||
.width_a(8))
|
||||
ram02(
|
||||
.address(addr[13:0]),
|
||||
.clock(sysclk),
|
||||
.wren(we_mram2),
|
||||
.data(odata),
|
||||
.q(mram2_out)
|
||||
);
|
||||
/*
|
||||
wire cs_mram3 = addr[15] & addr[14];
|
||||
wire we_mram3 = wr_mram & cs_mram3;
|
||||
wire [7:0] mram3_out;
|
||||
|
||||
spram #(
|
||||
.widthad_a(14),
|
||||
.width_a(8))
|
||||
ram03(
|
||||
.address(addr[13:0]),
|
||||
.clock(sysclk),
|
||||
.wren(we_mram3),
|
||||
.data(odata),
|
||||
.q(mram3_out)
|
||||
);*/
|
||||
|
||||
reg rd_vram;
|
||||
reg wr_vram;
|
||||
wire [7:0] vram_out;
|
||||
|
||||
galaksija_video
|
||||
#(
|
||||
.h_visible(10'd640),
|
||||
.h_front(10'd16),
|
||||
.h_sync(10'd96),
|
||||
.h_back(10'd48),
|
||||
.v_visible(10'd480),
|
||||
.v_front(10'd10),
|
||||
.v_sync(10'd2),
|
||||
.v_back(10'd33)
|
||||
)
|
||||
galaksija_video
|
||||
(
|
||||
.clk(sysclk),
|
||||
.resetn(reset_in),
|
||||
.vga_dat(video_dat),
|
||||
.vga_hsync(video_hs),
|
||||
.vga_vsync(video_vs),
|
||||
.vga_blankn(video_blankn),
|
||||
.rd_ram1(rd_vram),
|
||||
.wr_ram1(wr_vram),
|
||||
.ram1_out(vram_out),
|
||||
.addr(addr[10:0]),
|
||||
.data(odata)
|
||||
);
|
||||
|
||||
reg wr_latch;
|
||||
|
||||
always @(*)
|
||||
begin
|
||||
rd_rom1 = 1'b0;
|
||||
rd_rom2 = 1'b0;
|
||||
rd_vram = 1'b0;
|
||||
rd_mram = 1'b0;
|
||||
wr_vram = 1'b0;
|
||||
wr_mram = 1'b0;
|
||||
rd_key = 1'b0;
|
||||
wr_latch = 1'b0;
|
||||
|
||||
casex ({~wr_n,~rd_n,mreq_n,addr[15:0]})
|
||||
// CS & RD Signals
|
||||
{3'b010,16'b0000xxxxxxxxxxxx}: begin idata = rom1_out; rd_rom1 = 1'b1; end // 0x0000-0x0fff
|
||||
{3'b010,16'b0001xxxxxxxxxxxx}: begin idata = rom2_out; rd_rom2 = 1'b1; end // 0x1000-0x1fff
|
||||
// {3'b010,16'b0001xxxxxxxxxxxx}: begin idata = rom3_out; rd_rom3 = 1'b1; end // todo ROM3 CS
|
||||
|
||||
{3'b010,16'b00100xxxxxxxxxxx}: begin idata = key_out; rd_key = 1'b1; end // 0x2000-0x27ff
|
||||
|
||||
{3'b010,16'b00101xxxxxxxxxxx}: begin idata = vram_out; rd_vram = 1'b1; end // 0x2800-0x2fff
|
||||
{3'b010,16'b00110xxxxxxxxxxx}: begin idata = mram0_out; rd_mram = 1'b1; end // 0x3000-0x37ff
|
||||
{3'b010,16'b00111xxxxxxxxxxx}: begin idata = mram0_out; rd_mram = 1'b1; end // 0x3800-0x3fff
|
||||
{3'b010,16'b01xxxxxxxxxxxxxx}: begin idata = mram1_out; rd_mram = 1'b1; end // 0x4000-0xffff
|
||||
{3'b010,16'b10xxxxxxxxxxxxxx}: begin idata = mram2_out; rd_mram = 1'b1; end // 0x4000-0xffff
|
||||
// {3'b010,16'b11xxxxxxxxxxxxxx}: begin idata = mram3_out; rd_mram = 1'b1; end // 0x4000-0xffff //not enough BRAM for this
|
||||
|
||||
// WE Signals
|
||||
{3'b100,16'b00100xxxxxxxxxxx}: wr_latch= 1'b1; // 0x2000-0x27ff
|
||||
{3'b100,16'b00101xxxxxxxxxxx}: wr_vram= 1'b1; // 0x2800-0x2fff
|
||||
{3'b100,16'b00110xxxxxxxxxxx}: wr_mram= 1'b1; // 0x3000-0x37ff
|
||||
{3'b100,16'b00111xxxxxxxxxxx}: wr_mram= 1'b1; // 0x3000-0x37ff
|
||||
{3'b100,16'b01xxxxxxxxxxxxxx}: wr_mram= 1'b1;
|
||||
{3'b100,16'b10xxxxxxxxxxxxxx}: wr_mram= 1'b1;
|
||||
{3'b100,16'b11xxxxxxxxxxxxxx}: wr_mram= 1'b1;
|
||||
endcase
|
||||
end
|
||||
|
||||
|
||||
wire [7:0]key_out;
|
||||
reg keys[63:0];
|
||||
reg rd_key;
|
||||
integer num;
|
||||
|
||||
initial
|
||||
begin
|
||||
for(num=0;num<63;num=num+1)
|
||||
begin
|
||||
keys[num] <= 0;
|
||||
end
|
||||
end
|
||||
|
||||
always @(posedge sysclk) begin
|
||||
if (rd_key)
|
||||
begin
|
||||
key_out <= (keys[addr[5:0]]==1) ? 8'hfe : 8'hff;
|
||||
for (num=0;num<63;num=num+1) keys[num] = 1'b0;
|
||||
end
|
||||
if(sysclk)
|
||||
begin
|
||||
for(num=0;num<63;num=num+1)
|
||||
begin
|
||||
keys[num] = 1'b0;
|
||||
end
|
||||
case (ps2_key[7:0])
|
||||
//nix 00
|
||||
8'h1C : keys[8'd01] = 1'b1; // A
|
||||
8'h32 : keys[8'd02] = 1'b1; // B
|
||||
8'h21 : keys[8'd03] = 1'b1; // C
|
||||
8'h23 : keys[8'd04] = 1'b1; // D
|
||||
8'h24 : keys[8'd05] = 1'b1; // E
|
||||
8'h2B : keys[8'd06] = 1'b1; // F
|
||||
8'h34 : keys[8'd07] = 1'b1; // G
|
||||
8'h33 : keys[8'd08] = 1'b1; // H
|
||||
8'h43 : keys[8'd09] = 1'b1; // I
|
||||
8'h3B : keys[8'd10] = 1'b1; // J
|
||||
8'h42 : keys[8'd11] = 1'b1; // K
|
||||
8'h4B : keys[8'd12] = 1'b1; // L
|
||||
8'h3A : keys[8'd13] = 1'b1; // M
|
||||
8'h31 : keys[8'd14] = 1'b1; // N
|
||||
8'h44 : keys[8'd15] = 1'b1; // O
|
||||
8'h4D : keys[8'd16] = 1'b1; // P
|
||||
8'h15 : keys[8'd17] = 1'b1; // Q
|
||||
8'h2D : keys[8'd18] = 1'b1; // R
|
||||
8'h1B : keys[8'd19] = 1'b1; // S
|
||||
8'h2C : keys[8'd20] = 1'b1; // T
|
||||
8'h3C : keys[8'd21] = 1'b1; // U
|
||||
8'h2A : keys[8'd22] = 1'b1; // V
|
||||
8'h1D : keys[8'd23] = 1'b1; // W
|
||||
8'h22 : keys[8'd24] = 1'b1; // X
|
||||
8'h35 : keys[8'd25] = 1'b1; // Y
|
||||
8'h1A : keys[8'd26] = 1'b1; // Z
|
||||
//nix 27,28,30,31
|
||||
8'h66 : keys[8'd29] = 1'b1; // BACKSPACE
|
||||
8'h29 : keys[8'd31] = 1'b1; // SPACE
|
||||
8'h45 : keys[8'd32] = 1'b1; // 0
|
||||
8'h16 : keys[8'd33] = 1'b1; // 1
|
||||
8'h1E : keys[8'd34] = 1'b1; // 2
|
||||
8'h26 : keys[8'd35] = 1'b1; // 3
|
||||
8'h25 : keys[8'd36] = 1'b1; // 4
|
||||
8'h2E : keys[8'd37] = 1'b1; // 5
|
||||
8'h36 : keys[8'd38] = 1'b1; // 6
|
||||
8'h3D : keys[8'd39] = 1'b1; // 7
|
||||
8'h3E : keys[8'd40] = 1'b1; // 8
|
||||
8'h46 : keys[8'd41] = 1'b1; // 9
|
||||
//NUM Block
|
||||
8'h70 : keys[8'd32] = 1'b1; // 0
|
||||
8'h69 : keys[8'd33] = 1'b1; // 1
|
||||
8'h72 : keys[8'd34] = 1'b1; // 2
|
||||
8'h7A : keys[8'd35] = 1'b1; // 3
|
||||
8'h6B : keys[8'd36] = 1'b1; // 4
|
||||
8'h73 : keys[8'd37] = 1'b1; // 5
|
||||
8'h74 : keys[8'd38] = 1'b1; // 6
|
||||
8'h6C : keys[8'd39] = 1'b1; // 7
|
||||
8'h75 : keys[8'd40] = 1'b1; // 8
|
||||
8'h7D : keys[8'd41] = 1'b1; // 9
|
||||
|
||||
|
||||
8'h4C : keys[8'd42] = 1'b1; // ; //todo "Ö" on german keyboard
|
||||
8'h7C : keys[8'd43] = 1'b1; // : //todo NUM block for now
|
||||
8'h41 : keys[8'd44] = 1'b1; // ,
|
||||
8'h55 : keys[8'd45] = 1'b1; // = ////todo "´" on german keyboard
|
||||
8'h49 : keys[8'd46] = 1'b1; // .
|
||||
8'h4A : keys[8'd47] = 1'b1; // /
|
||||
8'h5A : keys[8'd48] = 1'b1; // ENTER
|
||||
8'h76 : keys[8'd49] = 1'b1; // ESC
|
||||
|
||||
8'h52 : begin keys[8'd33] = 1'b1; keys[8'd53] = 1'b1; end // ! ////todo "Ä" on german keyboard
|
||||
8'h52 : begin keys[8'd34] = 1'b1; keys[8'd53] = 1'b1; end // " ////todo shift GALAKSIJA
|
||||
8'h12 : keys[8'd53] = 1'b1; // SHIFT L
|
||||
8'h59 : keys[8'd53] = 1'b1; // SHIFT R
|
||||
|
||||
|
||||
|
||||
/*
|
||||
8'h1C : keys[8'd01] = 1'b1; // a
|
||||
8'h32 : keys[8'd02] = 1'b1; // b
|
||||
8'h21 : keys[8'd03] = 1'b1; // c
|
||||
8'h23 : keys[8'd04] = 1'b1; // d
|
||||
8'h24 : keys[8'd05] = 1'b1; // e
|
||||
8'h2B : keys[8'd06] = 1'b1; // f
|
||||
8'h34 : keys[8'd07] = 1'b1; // g
|
||||
8'h33 : keys[8'd08] = 1'b1; // h
|
||||
8'h43 : keys[8'd09] = 1'b1; // i
|
||||
8'h3B : keys[8'd10] = 1'b1; // j
|
||||
8'h42 : keys[8'd11] = 1'b1; // k
|
||||
8'h4B : keys[8'd12] = 1'b1; // ,
|
||||
8'h3A : keys[8'd13] = 1'b1; // m
|
||||
8'h31 : keys[8'd14] = 1'b1; // n
|
||||
8'h44 : keys[8'd15] = 1'b1; // O
|
||||
8'h4D : keys[8'd16] = 1'b1; // p
|
||||
8'h15 : keys[8'd17] = 1'b1; // q
|
||||
8'h2D : keys[8'd18] = 1'b1; // r
|
||||
8'h1B : keys[8'd19] = 1'b1; // s
|
||||
8'h2C : keys[8'd20] = 1'b1; // t
|
||||
8'h3C : keys[8'd21] = 1'b1; // u
|
||||
8'h2A : keys[8'd22] = 1'b1; // v
|
||||
8'h1D : keys[8'd23] = 1'b1; // w
|
||||
8'h22 : keys[8'd24] = 1'b1; // x
|
||||
8'h35 : keys[8'd25] = 1'b1; // y
|
||||
8'h1A : keys[8'd26] = 1'b1; // z
|
||||
*/
|
||||
endcase
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
endmodule
|
||||
116
Computer_MiST/Galaksija_MiST/rtl/galaksija_video.sv
Normal file
@@ -0,0 +1,116 @@
|
||||
module galaksija_video
|
||||
(
|
||||
input clk,
|
||||
input resetn,
|
||||
output reg [7:0] vga_dat,
|
||||
output reg vga_hsync,
|
||||
output reg vga_vsync,
|
||||
output reg vga_blankn,
|
||||
input rd_ram1,
|
||||
input wr_ram1,
|
||||
input [10:0] addr,
|
||||
output reg [7:0] ram1_out,
|
||||
input [7:0] data
|
||||
);
|
||||
|
||||
reg [9:0] h_pos;
|
||||
reg [9:0] v_pos;
|
||||
reg [23:0] rgb_data;
|
||||
|
||||
parameter h_visible = 10'd320;
|
||||
parameter h_front = 10'd20;
|
||||
parameter h_sync = 10'd30;
|
||||
parameter h_back = 10'd38;
|
||||
parameter h_total = h_visible + h_front + h_sync + h_back;
|
||||
|
||||
parameter v_visible = 10'd240;
|
||||
parameter v_front = 10'd4;
|
||||
parameter v_sync = 10'd3;
|
||||
parameter v_back = 10'd15;
|
||||
parameter v_total = v_visible + v_front + v_sync + v_back;
|
||||
|
||||
// reg [1:0] channel = 0;
|
||||
|
||||
wire h_active, v_active, visible;
|
||||
|
||||
reg [3:0] text_v_pos;
|
||||
reg [4:0] font_line;
|
||||
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (resetn == 0) begin
|
||||
h_pos <= 0;
|
||||
v_pos <= 0;
|
||||
text_v_pos <= 0;
|
||||
font_line <= 0;
|
||||
end else begin
|
||||
//Pixel counters
|
||||
if (h_pos == h_total - 1) begin
|
||||
h_pos <= 0;
|
||||
if (v_pos == v_total - 1) begin
|
||||
v_pos <= 0;
|
||||
text_v_pos <= 0;
|
||||
font_line <= 0;
|
||||
end else begin
|
||||
v_pos <= v_pos + 1;
|
||||
if (font_line != 24)
|
||||
font_line <= font_line + 1;
|
||||
else
|
||||
begin
|
||||
font_line <= 0;
|
||||
text_v_pos <= text_v_pos + 1;
|
||||
end
|
||||
end
|
||||
end else begin
|
||||
h_pos <= h_pos + 1;
|
||||
rgb_data <= (h_pos > 5 && h_pos < 32*8*2+4 && v_pos < 200*2) ? data_out_rotated[h_pos[3:1]] ? 24'h000000 : 24'hffffff : 24'h000000;
|
||||
end
|
||||
vga_blankn <= !visible;
|
||||
vga_hsync <= !((h_pos >= (h_visible + h_front)) && (h_pos < (h_visible + h_front + h_sync)));
|
||||
vga_vsync <= !((v_pos >= (v_visible + v_front)) && (v_pos < (v_visible + v_front + v_sync)));
|
||||
vga_dat <= rgb_data[7:0];
|
||||
end
|
||||
end
|
||||
|
||||
assign h_active = (h_pos < h_visible);
|
||||
assign v_active = (v_pos < v_visible);
|
||||
assign visible = h_active && v_active;
|
||||
|
||||
wire [7:0] data_out;
|
||||
wire [7:0] data_out_rotated; // rotate for proper font appearance
|
||||
assign data_out_rotated = {data_out[6:0], data_out[7]};
|
||||
|
||||
reg [7:0] code;
|
||||
wire [7:0] attr;
|
||||
|
||||
wire [6:0] char;
|
||||
|
||||
wire [10:0] video_addr;
|
||||
|
||||
assign char = ((code>63 && code<96) || (code>127 && code<192)) ? code-64 :
|
||||
(code>191) ? code-128 : code;
|
||||
|
||||
sprom #(
|
||||
.init_file("./roms/CHRGEN.hex"),
|
||||
.widthad_a(11),
|
||||
.width_a(8))
|
||||
font_rom(
|
||||
.address({ font_line[4:1], char }),
|
||||
.clock(clk),
|
||||
.q(data_out)
|
||||
);
|
||||
|
||||
assign video_addr = {text_v_pos,5'b00000} + h_pos[9:4];
|
||||
|
||||
reg [7:0] video_ram[0:2047];
|
||||
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (wr_ram1)
|
||||
video_ram[addr[10:0]] <= data;
|
||||
if (rd_ram1)
|
||||
ram1_out <= video_ram[addr[10:0]];
|
||||
code <= video_ram[video_addr[10:0]];
|
||||
end
|
||||
|
||||
endmodule
|
||||
454
Computer_MiST/Galaksija_MiST/rtl/hq2x.sv
Normal file
@@ -0,0 +1,454 @@
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2012-2013 Ludvig Strigeus
|
||||
// Copyright (c) 2017 Sorgelig
|
||||
//
|
||||
// This program is GPL Licensed. See COPYING for the full license.
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// synopsys translate_off
|
||||
`timescale 1 ps / 1 ps
|
||||
// synopsys translate_on
|
||||
|
||||
`define BITS_TO_FIT(N) ( \
|
||||
N <= 2 ? 0 : \
|
||||
N <= 4 ? 1 : \
|
||||
N <= 8 ? 2 : \
|
||||
N <= 16 ? 3 : \
|
||||
N <= 32 ? 4 : \
|
||||
N <= 64 ? 5 : \
|
||||
N <= 128 ? 6 : \
|
||||
N <= 256 ? 7 : \
|
||||
N <= 512 ? 8 : \
|
||||
N <=1024 ? 9 : 10 )
|
||||
|
||||
module hq2x_in #(parameter LENGTH, parameter DWIDTH)
|
||||
(
|
||||
input clk,
|
||||
|
||||
input [AWIDTH:0] rdaddr,
|
||||
input rdbuf,
|
||||
output[DWIDTH:0] q,
|
||||
|
||||
input [AWIDTH:0] wraddr,
|
||||
input wrbuf,
|
||||
input [DWIDTH:0] data,
|
||||
input wren
|
||||
);
|
||||
|
||||
localparam AWIDTH = `BITS_TO_FIT(LENGTH);
|
||||
wire [DWIDTH:0] out[2];
|
||||
assign q = out[rdbuf];
|
||||
|
||||
hq2x_buf #(.NUMWORDS(LENGTH), .AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) buf0(clk,data,rdaddr,wraddr,wren && (wrbuf == 0),out[0]);
|
||||
hq2x_buf #(.NUMWORDS(LENGTH), .AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) buf1(clk,data,rdaddr,wraddr,wren && (wrbuf == 1),out[1]);
|
||||
endmodule
|
||||
|
||||
|
||||
module hq2x_out #(parameter LENGTH, parameter DWIDTH)
|
||||
(
|
||||
input clk,
|
||||
|
||||
input [AWIDTH:0] rdaddr,
|
||||
input [1:0] rdbuf,
|
||||
output[DWIDTH:0] q,
|
||||
|
||||
input [AWIDTH:0] wraddr,
|
||||
input [1:0] wrbuf,
|
||||
input [DWIDTH:0] data,
|
||||
input wren
|
||||
);
|
||||
|
||||
localparam AWIDTH = `BITS_TO_FIT(LENGTH*2);
|
||||
wire [DWIDTH:0] out[4];
|
||||
assign q = out[rdbuf];
|
||||
|
||||
hq2x_buf #(.NUMWORDS(LENGTH*2), .AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) buf0(clk,data,rdaddr,wraddr,wren && (wrbuf == 0),out[0]);
|
||||
hq2x_buf #(.NUMWORDS(LENGTH*2), .AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) buf1(clk,data,rdaddr,wraddr,wren && (wrbuf == 1),out[1]);
|
||||
hq2x_buf #(.NUMWORDS(LENGTH*2), .AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) buf2(clk,data,rdaddr,wraddr,wren && (wrbuf == 2),out[2]);
|
||||
hq2x_buf #(.NUMWORDS(LENGTH*2), .AWIDTH(AWIDTH), .DWIDTH(DWIDTH)) buf3(clk,data,rdaddr,wraddr,wren && (wrbuf == 3),out[3]);
|
||||
endmodule
|
||||
|
||||
|
||||
module hq2x_buf #(parameter NUMWORDS, parameter AWIDTH, parameter DWIDTH)
|
||||
(
|
||||
input clock,
|
||||
input [DWIDTH:0] data,
|
||||
input [AWIDTH:0] rdaddress,
|
||||
input [AWIDTH:0] wraddress,
|
||||
input wren,
|
||||
output [DWIDTH:0] q
|
||||
);
|
||||
|
||||
altsyncram altsyncram_component (
|
||||
.address_a (wraddress),
|
||||
.clock0 (clock),
|
||||
.data_a (data),
|
||||
.wren_a (wren),
|
||||
.address_b (rdaddress),
|
||||
.q_b(q),
|
||||
.aclr0 (1'b0),
|
||||
.aclr1 (1'b0),
|
||||
.addressstall_a (1'b0),
|
||||
.addressstall_b (1'b0),
|
||||
.byteena_a (1'b1),
|
||||
.byteena_b (1'b1),
|
||||
.clock1 (1'b1),
|
||||
.clocken0 (1'b1),
|
||||
.clocken1 (1'b1),
|
||||
.clocken2 (1'b1),
|
||||
.clocken3 (1'b1),
|
||||
.data_b ({(DWIDTH+1){1'b1}}),
|
||||
.eccstatus (),
|
||||
.q_a (),
|
||||
.rden_a (1'b1),
|
||||
.rden_b (1'b1),
|
||||
.wren_b (1'b0));
|
||||
defparam
|
||||
altsyncram_component.address_aclr_b = "NONE",
|
||||
altsyncram_component.address_reg_b = "CLOCK0",
|
||||
altsyncram_component.clock_enable_input_a = "BYPASS",
|
||||
altsyncram_component.clock_enable_input_b = "BYPASS",
|
||||
altsyncram_component.clock_enable_output_b = "BYPASS",
|
||||
altsyncram_component.intended_device_family = "Cyclone III",
|
||||
altsyncram_component.lpm_type = "altsyncram",
|
||||
altsyncram_component.numwords_a = NUMWORDS,
|
||||
altsyncram_component.numwords_b = NUMWORDS,
|
||||
altsyncram_component.operation_mode = "DUAL_PORT",
|
||||
altsyncram_component.outdata_aclr_b = "NONE",
|
||||
altsyncram_component.outdata_reg_b = "UNREGISTERED",
|
||||
altsyncram_component.power_up_uninitialized = "FALSE",
|
||||
altsyncram_component.read_during_write_mode_mixed_ports = "DONT_CARE",
|
||||
altsyncram_component.widthad_a = AWIDTH+1,
|
||||
altsyncram_component.widthad_b = AWIDTH+1,
|
||||
altsyncram_component.width_a = DWIDTH+1,
|
||||
altsyncram_component.width_b = DWIDTH+1,
|
||||
altsyncram_component.width_byteena_a = 1;
|
||||
|
||||
endmodule
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
module DiffCheck
|
||||
(
|
||||
input [17:0] rgb1,
|
||||
input [17:0] rgb2,
|
||||
output result
|
||||
);
|
||||
|
||||
wire [5:0] r = rgb1[5:1] - rgb2[5:1];
|
||||
wire [5:0] g = rgb1[11:7] - rgb2[11:7];
|
||||
wire [5:0] b = rgb1[17:13] - rgb2[17:13];
|
||||
wire [6:0] t = $signed(r) + $signed(b);
|
||||
wire [6:0] gx = {g[5], g};
|
||||
wire [7:0] y = $signed(t) + $signed(gx);
|
||||
wire [6:0] u = $signed(r) - $signed(b);
|
||||
wire [7:0] v = $signed({g, 1'b0}) - $signed(t);
|
||||
|
||||
// if y is inside (-24..24)
|
||||
wire y_inside = (y < 8'h18 || y >= 8'he8);
|
||||
|
||||
// if u is inside (-4, 4)
|
||||
wire u_inside = (u < 7'h4 || u >= 7'h7c);
|
||||
|
||||
// if v is inside (-6, 6)
|
||||
wire v_inside = (v < 8'h6 || v >= 8'hfA);
|
||||
assign result = !(y_inside && u_inside && v_inside);
|
||||
endmodule
|
||||
|
||||
module InnerBlend
|
||||
(
|
||||
input [8:0] Op,
|
||||
input [5:0] A,
|
||||
input [5:0] B,
|
||||
input [5:0] C,
|
||||
output [5:0] O
|
||||
);
|
||||
|
||||
function [8:0] mul6x3;
|
||||
input [5:0] op1;
|
||||
input [2:0] op2;
|
||||
begin
|
||||
mul6x3 = 9'd0;
|
||||
if(op2[0]) mul6x3 = mul6x3 + op1;
|
||||
if(op2[1]) mul6x3 = mul6x3 + {op1, 1'b0};
|
||||
if(op2[2]) mul6x3 = mul6x3 + {op1, 2'b00};
|
||||
end
|
||||
endfunction
|
||||
|
||||
wire OpOnes = Op[4];
|
||||
wire [8:0] Amul = mul6x3(A, Op[7:5]);
|
||||
wire [8:0] Bmul = mul6x3(B, {Op[3:2], 1'b0});
|
||||
wire [8:0] Cmul = mul6x3(C, {Op[1:0], 1'b0});
|
||||
wire [8:0] At = Amul;
|
||||
wire [8:0] Bt = (OpOnes == 0) ? Bmul : {3'b0, B};
|
||||
wire [8:0] Ct = (OpOnes == 0) ? Cmul : {3'b0, C};
|
||||
wire [9:0] Res = {At, 1'b0} + Bt + Ct;
|
||||
assign O = Op[8] ? A : Res[9:4];
|
||||
endmodule
|
||||
|
||||
module Blend
|
||||
(
|
||||
input [5:0] rule,
|
||||
input disable_hq2x,
|
||||
input [17:0] E,
|
||||
input [17:0] A,
|
||||
input [17:0] B,
|
||||
input [17:0] D,
|
||||
input [17:0] F,
|
||||
input [17:0] H,
|
||||
output [17:0] Result
|
||||
);
|
||||
|
||||
reg [1:0] input_ctrl;
|
||||
reg [8:0] op;
|
||||
localparam BLEND0 = 9'b1_xxx_x_xx_xx; // 0: A
|
||||
localparam BLEND1 = 9'b0_110_0_10_00; // 1: (A * 12 + B * 4) >> 4
|
||||
localparam BLEND2 = 9'b0_100_0_10_10; // 2: (A * 8 + B * 4 + C * 4) >> 4
|
||||
localparam BLEND3 = 9'b0_101_0_10_01; // 3: (A * 10 + B * 4 + C * 2) >> 4
|
||||
localparam BLEND4 = 9'b0_110_0_01_01; // 4: (A * 12 + B * 2 + C * 2) >> 4
|
||||
localparam BLEND5 = 9'b0_010_0_11_11; // 5: (A * 4 + (B + C) * 6) >> 4
|
||||
localparam BLEND6 = 9'b0_111_1_xx_xx; // 6: (A * 14 + B + C) >> 4
|
||||
localparam AB = 2'b00;
|
||||
localparam AD = 2'b01;
|
||||
localparam DB = 2'b10;
|
||||
localparam BD = 2'b11;
|
||||
wire is_diff;
|
||||
DiffCheck diff_checker(rule[1] ? B : H, rule[0] ? D : F, is_diff);
|
||||
|
||||
always @* begin
|
||||
case({!is_diff, rule[5:2]})
|
||||
1,17: {op, input_ctrl} = {BLEND1, AB};
|
||||
2,18: {op, input_ctrl} = {BLEND1, DB};
|
||||
3,19: {op, input_ctrl} = {BLEND1, BD};
|
||||
4,20: {op, input_ctrl} = {BLEND2, DB};
|
||||
5,21: {op, input_ctrl} = {BLEND2, AB};
|
||||
6,22: {op, input_ctrl} = {BLEND2, AD};
|
||||
|
||||
8: {op, input_ctrl} = {BLEND0, 2'bxx};
|
||||
9: {op, input_ctrl} = {BLEND0, 2'bxx};
|
||||
10: {op, input_ctrl} = {BLEND0, 2'bxx};
|
||||
11: {op, input_ctrl} = {BLEND1, AB};
|
||||
12: {op, input_ctrl} = {BLEND1, AB};
|
||||
13: {op, input_ctrl} = {BLEND1, AB};
|
||||
14: {op, input_ctrl} = {BLEND1, DB};
|
||||
15: {op, input_ctrl} = {BLEND1, BD};
|
||||
|
||||
24: {op, input_ctrl} = {BLEND2, DB};
|
||||
25: {op, input_ctrl} = {BLEND5, DB};
|
||||
26: {op, input_ctrl} = {BLEND6, DB};
|
||||
27: {op, input_ctrl} = {BLEND2, DB};
|
||||
28: {op, input_ctrl} = {BLEND4, DB};
|
||||
29: {op, input_ctrl} = {BLEND5, DB};
|
||||
30: {op, input_ctrl} = {BLEND3, BD};
|
||||
31: {op, input_ctrl} = {BLEND3, DB};
|
||||
default: {op, input_ctrl} = 11'bx;
|
||||
endcase
|
||||
|
||||
// Setting op[8] effectively disables HQ2X because blend will always return E.
|
||||
if (disable_hq2x) op[8] = 1;
|
||||
end
|
||||
|
||||
// Generate inputs to the inner blender. Valid combinations.
|
||||
// 00: E A B
|
||||
// 01: E A D
|
||||
// 10: E D B
|
||||
// 11: E B D
|
||||
wire [17:0] Input1 = E;
|
||||
wire [17:0] Input2 = !input_ctrl[1] ? A :
|
||||
!input_ctrl[0] ? D : B;
|
||||
|
||||
wire [17:0] Input3 = !input_ctrl[0] ? B : D;
|
||||
InnerBlend inner_blend1(op, Input1[5:0], Input2[5:0], Input3[5:0], Result[5:0]);
|
||||
InnerBlend inner_blend2(op, Input1[11:6], Input2[11:6], Input3[11:6], Result[11:6]);
|
||||
InnerBlend inner_blend3(op, Input1[17:12], Input2[17:12], Input3[17:12], Result[17:12]);
|
||||
endmodule
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
module Hq2x #(parameter LENGTH, parameter HALF_DEPTH)
|
||||
(
|
||||
input clk,
|
||||
input ce_x4,
|
||||
input [DWIDTH:0] inputpixel,
|
||||
input mono,
|
||||
input disable_hq2x,
|
||||
input reset_frame,
|
||||
input reset_line,
|
||||
input [1:0] read_y,
|
||||
input [AWIDTH+1:0] read_x,
|
||||
output [DWIDTH:0] outpixel
|
||||
);
|
||||
|
||||
|
||||
localparam AWIDTH = `BITS_TO_FIT(LENGTH);
|
||||
localparam DWIDTH = HALF_DEPTH ? 8 : 17;
|
||||
|
||||
wire [5:0] hqTable[256] = '{
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 47, 35, 23, 15, 55, 39,
|
||||
19, 19, 26, 58, 19, 19, 26, 58, 23, 15, 35, 35, 23, 15, 7, 35,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 55, 39, 23, 15, 51, 43,
|
||||
19, 19, 26, 58, 19, 19, 26, 58, 23, 15, 51, 35, 23, 15, 7, 43,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 61, 35, 35, 23, 61, 51, 35,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 51, 35, 23, 15, 51, 35,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 61, 7, 35, 23, 61, 7, 43,
|
||||
19, 19, 26, 11, 19, 19, 26, 58, 23, 15, 51, 35, 23, 61, 7, 43,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 47, 35, 23, 15, 55, 39,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 51, 35, 23, 15, 51, 35,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 55, 39, 23, 15, 51, 43,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 51, 39, 23, 15, 7, 43,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 51, 35, 23, 15, 51, 39,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 51, 35, 23, 15, 7, 35,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 51, 35, 23, 15, 7, 43,
|
||||
19, 19, 26, 11, 19, 19, 26, 11, 23, 15, 7, 35, 23, 15, 7, 43
|
||||
};
|
||||
|
||||
reg [17:0] Prev0, Prev1, Prev2, Curr0, Curr1, Next0, Next1, Next2;
|
||||
reg [17:0] A, B, D, F, G, H;
|
||||
reg [7:0] pattern, nextpatt;
|
||||
reg [1:0] i;
|
||||
reg [7:0] y;
|
||||
|
||||
wire curbuf = y[0];
|
||||
reg prevbuf = 0;
|
||||
wire iobuf = !curbuf;
|
||||
|
||||
wire diff0, diff1;
|
||||
DiffCheck diffcheck0(Curr1, (i == 0) ? Prev0 : (i == 1) ? Curr0 : (i == 2) ? Prev2 : Next1, diff0);
|
||||
DiffCheck diffcheck1(Curr1, (i == 0) ? Prev1 : (i == 1) ? Next0 : (i == 2) ? Curr2 : Next2, diff1);
|
||||
|
||||
wire [7:0] new_pattern = {diff1, diff0, pattern[7:2]};
|
||||
|
||||
wire [17:0] X = (i == 0) ? A : (i == 1) ? Prev1 : (i == 2) ? Next1 : G;
|
||||
wire [17:0] blend_result;
|
||||
Blend blender(hqTable[nextpatt], disable_hq2x, Curr0, X, B, D, F, H, blend_result);
|
||||
|
||||
reg Curr2_addr1;
|
||||
reg [AWIDTH:0] Curr2_addr2;
|
||||
wire [17:0] Curr2 = HALF_DEPTH ? h2rgb(Curr2tmp) : Curr2tmp;
|
||||
wire [DWIDTH:0] Curr2tmp;
|
||||
|
||||
reg [AWIDTH:0] wrin_addr2;
|
||||
reg [DWIDTH:0] wrpix;
|
||||
reg wrin_en;
|
||||
|
||||
function [17:0] h2rgb;
|
||||
input [8:0] v;
|
||||
begin
|
||||
h2rgb = mono ? {v[5:3],v[2:0], v[5:3],v[2:0], v[5:3],v[2:0]} : {v[8:6],v[8:6],v[5:3],v[5:3],v[2:0],v[2:0]};
|
||||
end
|
||||
endfunction
|
||||
|
||||
function [8:0] rgb2h;
|
||||
input [17:0] v;
|
||||
begin
|
||||
rgb2h = mono ? {3'b000, v[17:15], v[14:12]} : {v[17:15], v[11:9], v[5:3]};
|
||||
end
|
||||
endfunction
|
||||
|
||||
hq2x_in #(.LENGTH(LENGTH), .DWIDTH(DWIDTH)) hq2x_in
|
||||
(
|
||||
.clk(clk),
|
||||
|
||||
.rdaddr(Curr2_addr2),
|
||||
.rdbuf(Curr2_addr1),
|
||||
.q(Curr2tmp),
|
||||
|
||||
.wraddr(wrin_addr2),
|
||||
.wrbuf(iobuf),
|
||||
.data(wrpix),
|
||||
.wren(wrin_en)
|
||||
);
|
||||
|
||||
reg [1:0] wrout_addr1;
|
||||
reg [AWIDTH+1:0] wrout_addr2;
|
||||
reg wrout_en;
|
||||
reg [DWIDTH:0] wrdata;
|
||||
|
||||
hq2x_out #(.LENGTH(LENGTH), .DWIDTH(DWIDTH)) hq2x_out
|
||||
(
|
||||
.clk(clk),
|
||||
|
||||
.rdaddr(read_x),
|
||||
.rdbuf(read_y),
|
||||
.q(outpixel),
|
||||
|
||||
.wraddr(wrout_addr2),
|
||||
.wrbuf(wrout_addr1),
|
||||
.data(wrdata),
|
||||
.wren(wrout_en)
|
||||
);
|
||||
|
||||
always @(posedge clk) begin
|
||||
reg [AWIDTH:0] offs;
|
||||
reg old_reset_line;
|
||||
reg old_reset_frame;
|
||||
|
||||
wrout_en <= 0;
|
||||
wrin_en <= 0;
|
||||
|
||||
if(ce_x4) begin
|
||||
|
||||
pattern <= new_pattern;
|
||||
|
||||
if(~&offs) begin
|
||||
if (i == 0) begin
|
||||
Curr2_addr1 <= prevbuf;
|
||||
Curr2_addr2 <= offs;
|
||||
end
|
||||
if (i == 1) begin
|
||||
Prev2 <= Curr2;
|
||||
Curr2_addr1 <= curbuf;
|
||||
Curr2_addr2 <= offs;
|
||||
end
|
||||
if (i == 2) begin
|
||||
Next2 <= HALF_DEPTH ? h2rgb(inputpixel) : inputpixel;
|
||||
wrpix <= inputpixel;
|
||||
wrin_addr2 <= offs;
|
||||
wrin_en <= 1;
|
||||
end
|
||||
if (i == 3) begin
|
||||
offs <= offs + 1'd1;
|
||||
end
|
||||
|
||||
if(HALF_DEPTH) wrdata <= rgb2h(blend_result);
|
||||
else wrdata <= blend_result;
|
||||
|
||||
wrout_addr1 <= {curbuf, i[1]};
|
||||
wrout_addr2 <= {offs, i[1]^i[0]};
|
||||
wrout_en <= 1;
|
||||
end
|
||||
|
||||
if(i==3) begin
|
||||
nextpatt <= {new_pattern[7:6], new_pattern[3], new_pattern[5], new_pattern[2], new_pattern[4], new_pattern[1:0]};
|
||||
{A, G} <= {Prev0, Next0};
|
||||
{B, F, H, D} <= {Prev1, Curr2, Next1, Curr0};
|
||||
{Prev0, Prev1} <= {Prev1, Prev2};
|
||||
{Curr0, Curr1} <= {Curr1, Curr2};
|
||||
{Next0, Next1} <= {Next1, Next2};
|
||||
end else begin
|
||||
nextpatt <= {nextpatt[5], nextpatt[3], nextpatt[0], nextpatt[6], nextpatt[1], nextpatt[7], nextpatt[4], nextpatt[2]};
|
||||
{B, F, H, D} <= {F, H, D, B};
|
||||
end
|
||||
|
||||
i <= i + 1'b1;
|
||||
if(old_reset_line && ~reset_line) begin
|
||||
old_reset_frame <= reset_frame;
|
||||
offs <= 0;
|
||||
i <= 0;
|
||||
y <= y + 1'd1;
|
||||
prevbuf <= curbuf;
|
||||
if(old_reset_frame & ~reset_frame) begin
|
||||
y <= 0;
|
||||
prevbuf <= 0;
|
||||
end
|
||||
end
|
||||
|
||||
old_reset_line <= reset_line;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule // Hq2x
|
||||
496
Computer_MiST/Galaksija_MiST/rtl/mist_io.v
Normal file
@@ -0,0 +1,496 @@
|
||||
//
|
||||
// mist_io.v
|
||||
//
|
||||
// mist_io for the MiST board
|
||||
// http://code.google.com/p/mist-board/
|
||||
//
|
||||
// Copyright (c) 2014 Till Harbaum <till@harbaum.org>
|
||||
// Copyright (c) 2015-2017 Sorgelig
|
||||
//
|
||||
// This source file is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published
|
||||
// by the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This source file is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// Use buffer to access SD card. It's time-critical part.
|
||||
// Made module synchroneous with 2 clock domains: clk_sys and SPI_SCK
|
||||
// (Sorgelig)
|
||||
//
|
||||
// for synchronous projects default value for PS2DIV is fine for any frequency of system clock.
|
||||
// clk_ps2 = clk_sys/(PS2DIV*2)
|
||||
//
|
||||
|
||||
module mist_io #(parameter STRLEN=0, parameter PS2DIV=100)
|
||||
(
|
||||
|
||||
// parameter STRLEN and the actual length of conf_str have to match
|
||||
input [(8*STRLEN)-1:0] conf_str,
|
||||
|
||||
// Global clock. It should be around 100MHz (higher is better).
|
||||
input clk_sys,
|
||||
|
||||
// Global SPI clock from ARM. 24MHz
|
||||
input SPI_SCK,
|
||||
|
||||
input CONF_DATA0,
|
||||
input SPI_SS2,
|
||||
output SPI_DO,
|
||||
input SPI_DI,
|
||||
|
||||
output reg [7:0] joystick_0,
|
||||
output reg [7:0] joystick_1,
|
||||
output reg [15:0] joystick_analog_0,
|
||||
output reg [15:0] joystick_analog_1,
|
||||
output [1:0] buttons,
|
||||
output [1:0] switches,
|
||||
output scandoubler_disable,
|
||||
output ypbpr,
|
||||
|
||||
output reg [31:0] status,
|
||||
|
||||
// SD config
|
||||
input sd_conf,
|
||||
input sd_sdhc,
|
||||
output [1:0] img_mounted, // signaling that new image has been mounted
|
||||
output reg [31:0] img_size, // size of image in bytes
|
||||
|
||||
// SD block level access
|
||||
input [31:0] sd_lba,
|
||||
input [1:0] sd_rd,
|
||||
input [1:0] sd_wr,
|
||||
output reg sd_ack,
|
||||
output reg sd_ack_conf,
|
||||
|
||||
// SD byte level access. Signals for 2-PORT altsyncram.
|
||||
output reg [8:0] sd_buff_addr,
|
||||
output reg [7:0] sd_buff_dout,
|
||||
input [7:0] sd_buff_din,
|
||||
output reg sd_buff_wr,
|
||||
|
||||
// ps2 keyboard emulation
|
||||
output ps2_kbd_clk,
|
||||
output reg ps2_kbd_data,
|
||||
output ps2_mouse_clk,
|
||||
output reg ps2_mouse_data,
|
||||
|
||||
// ps2 alternative interface.
|
||||
|
||||
// [8] - extended, [9] - pressed, [10] - toggles with every press/release
|
||||
output reg [10:0] ps2_key = 0,
|
||||
|
||||
// [24] - toggles with every event
|
||||
output reg [24:0] ps2_mouse = 0,
|
||||
|
||||
// ARM -> FPGA download
|
||||
input ioctl_ce,
|
||||
input ioctl_wait,
|
||||
output reg ioctl_download = 0, // signal indicating an active download
|
||||
output reg [7:0] ioctl_index, // menu index used to upload the file
|
||||
output reg ioctl_wr = 0,
|
||||
output reg [13:0] ioctl_addr,
|
||||
output reg [7:0] ioctl_dout
|
||||
);
|
||||
|
||||
reg [7:0] but_sw;
|
||||
reg [2:0] stick_idx;
|
||||
|
||||
reg [1:0] mount_strobe = 0;
|
||||
assign img_mounted = mount_strobe;
|
||||
|
||||
assign buttons = but_sw[1:0];
|
||||
assign switches = but_sw[3:2];
|
||||
assign scandoubler_disable = but_sw[4];
|
||||
assign ypbpr = but_sw[5];
|
||||
|
||||
// this variant of user_io is for 8 bit cores (type == a4) only
|
||||
wire [7:0] core_type = 8'ha4;
|
||||
|
||||
// command byte read by the io controller
|
||||
wire drive_sel = sd_rd[1] | sd_wr[1];
|
||||
wire [7:0] sd_cmd = { 4'h6, sd_conf, sd_sdhc, sd_wr[drive_sel], sd_rd[drive_sel] };
|
||||
|
||||
reg [7:0] cmd;
|
||||
reg [2:0] bit_cnt; // counts bits 0-7 0-7 ...
|
||||
reg [9:0] byte_cnt; // counts bytes
|
||||
|
||||
reg spi_do;
|
||||
assign SPI_DO = CONF_DATA0 ? 1'bZ : spi_do;
|
||||
|
||||
reg [7:0] spi_data_out;
|
||||
|
||||
// SPI transmitter
|
||||
always@(negedge SPI_SCK) spi_do <= spi_data_out[~bit_cnt];
|
||||
|
||||
reg [7:0] spi_data_in;
|
||||
reg spi_data_ready = 0;
|
||||
|
||||
// SPI receiver
|
||||
always@(posedge SPI_SCK or posedge CONF_DATA0) begin
|
||||
reg [6:0] sbuf;
|
||||
reg [31:0] sd_lba_r;
|
||||
reg drive_sel_r;
|
||||
|
||||
if(CONF_DATA0) begin
|
||||
bit_cnt <= 0;
|
||||
byte_cnt <= 0;
|
||||
spi_data_out <= core_type;
|
||||
end
|
||||
else
|
||||
begin
|
||||
bit_cnt <= bit_cnt + 1'd1;
|
||||
sbuf <= {sbuf[5:0], SPI_DI};
|
||||
|
||||
// finished reading command byte
|
||||
if(bit_cnt == 7) begin
|
||||
if(!byte_cnt) cmd <= {sbuf, SPI_DI};
|
||||
|
||||
spi_data_in <= {sbuf, SPI_DI};
|
||||
spi_data_ready <= ~spi_data_ready;
|
||||
if(~&byte_cnt) byte_cnt <= byte_cnt + 8'd1;
|
||||
|
||||
spi_data_out <= 0;
|
||||
case({(!byte_cnt) ? {sbuf, SPI_DI} : cmd})
|
||||
// reading config string
|
||||
8'h14: if(byte_cnt < STRLEN) spi_data_out <= conf_str[(STRLEN - byte_cnt - 1)<<3 +:8];
|
||||
|
||||
// reading sd card status
|
||||
8'h16: if(byte_cnt == 0) begin
|
||||
spi_data_out <= sd_cmd;
|
||||
sd_lba_r <= sd_lba;
|
||||
drive_sel_r <= drive_sel;
|
||||
end else if (byte_cnt == 1) begin
|
||||
spi_data_out <= drive_sel_r;
|
||||
end else if(byte_cnt < 6) spi_data_out <= sd_lba_r[(5-byte_cnt)<<3 +:8];
|
||||
|
||||
// reading sd card write data
|
||||
8'h18: spi_data_out <= sd_buff_din;
|
||||
endcase
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
reg [31:0] ps2_key_raw = 0;
|
||||
wire pressed = (ps2_key_raw[15:8] != 8'hf0);
|
||||
wire extended = (~pressed ? (ps2_key_raw[23:16] == 8'he0) : (ps2_key_raw[15:8] == 8'he0));
|
||||
|
||||
// transfer to clk_sys domain
|
||||
always@(posedge clk_sys) begin
|
||||
reg old_ss1, old_ss2;
|
||||
reg old_ready1, old_ready2;
|
||||
reg [2:0] b_wr;
|
||||
reg got_ps2 = 0;
|
||||
|
||||
old_ss1 <= CONF_DATA0;
|
||||
old_ss2 <= old_ss1;
|
||||
old_ready1 <= spi_data_ready;
|
||||
old_ready2 <= old_ready1;
|
||||
|
||||
sd_buff_wr <= b_wr[0];
|
||||
if(b_wr[2] && (~&sd_buff_addr)) sd_buff_addr <= sd_buff_addr + 1'b1;
|
||||
b_wr <= (b_wr<<1);
|
||||
|
||||
if(old_ss2) begin
|
||||
got_ps2 <= 0;
|
||||
sd_ack <= 0;
|
||||
sd_ack_conf <= 0;
|
||||
sd_buff_addr <= 0;
|
||||
if(got_ps2) begin
|
||||
if(cmd == 4) ps2_mouse[24] <= ~ps2_mouse[24];
|
||||
if(cmd == 5) begin
|
||||
ps2_key <= {~ps2_key[10], pressed, extended, ps2_key_raw[7:0]};
|
||||
if(ps2_key_raw == 'hE012E07C) ps2_key[9:0] <= 'h37C; // prnscr pressed
|
||||
if(ps2_key_raw == 'h7CE0F012) ps2_key[9:0] <= 'h17C; // prnscr released
|
||||
if(ps2_key_raw == 'hF014F077) ps2_key[9:0] <= 'h377; // pause pressed
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if(old_ready2 ^ old_ready1) begin
|
||||
|
||||
if(cmd == 8'h18 && ~&sd_buff_addr) sd_buff_addr <= sd_buff_addr + 1'b1;
|
||||
|
||||
if(byte_cnt < 2) begin
|
||||
|
||||
if (cmd == 8'h19) sd_ack_conf <= 1;
|
||||
if((cmd == 8'h17) || (cmd == 8'h18)) sd_ack <= 1;
|
||||
mount_strobe <= 0;
|
||||
|
||||
if(cmd == 5) ps2_key_raw <= 0;
|
||||
end else begin
|
||||
|
||||
case(cmd)
|
||||
// buttons and switches
|
||||
8'h01: but_sw <= spi_data_in;
|
||||
8'h02: joystick_0 <= spi_data_in;
|
||||
8'h03: joystick_1 <= spi_data_in;
|
||||
|
||||
// store incoming ps2 mouse bytes
|
||||
8'h04: begin
|
||||
got_ps2 <= 1;
|
||||
case(byte_cnt)
|
||||
2: ps2_mouse[7:0] <= spi_data_in;
|
||||
3: ps2_mouse[15:8] <= spi_data_in;
|
||||
4: ps2_mouse[23:16] <= spi_data_in;
|
||||
endcase
|
||||
ps2_mouse_fifo[ps2_mouse_wptr] <= spi_data_in;
|
||||
ps2_mouse_wptr <= ps2_mouse_wptr + 1'd1;
|
||||
end
|
||||
|
||||
// store incoming ps2 keyboard bytes
|
||||
8'h05: begin
|
||||
got_ps2 <= 1;
|
||||
ps2_key_raw[31:0] <= {ps2_key_raw[23:0], spi_data_in};
|
||||
ps2_kbd_fifo[ps2_kbd_wptr] <= spi_data_in;
|
||||
ps2_kbd_wptr <= ps2_kbd_wptr + 1'd1;
|
||||
end
|
||||
|
||||
8'h15: status[7:0] <= spi_data_in;
|
||||
|
||||
// send SD config IO -> FPGA
|
||||
// flag that download begins
|
||||
// sd card knows data is config if sd_dout_strobe is asserted
|
||||
// with sd_ack still being inactive (low)
|
||||
8'h19,
|
||||
// send sector IO -> FPGA
|
||||
// flag that download begins
|
||||
8'h17: begin
|
||||
sd_buff_dout <= spi_data_in;
|
||||
b_wr <= 1;
|
||||
end
|
||||
|
||||
// joystick analog
|
||||
8'h1a: begin
|
||||
// first byte is joystick index
|
||||
if(byte_cnt == 2) stick_idx <= spi_data_in[2:0];
|
||||
else if(byte_cnt == 3) begin
|
||||
// second byte is x axis
|
||||
if(stick_idx == 0) joystick_analog_0[15:8] <= spi_data_in;
|
||||
else if(stick_idx == 1) joystick_analog_1[15:8] <= spi_data_in;
|
||||
end else if(byte_cnt == 4) begin
|
||||
// third byte is y axis
|
||||
if(stick_idx == 0) joystick_analog_0[7:0] <= spi_data_in;
|
||||
else if(stick_idx == 1) joystick_analog_1[7:0] <= spi_data_in;
|
||||
end
|
||||
end
|
||||
|
||||
// notify image selection
|
||||
8'h1c: mount_strobe[spi_data_in[0]] <= 1;
|
||||
|
||||
// send image info
|
||||
8'h1d: if(byte_cnt<6) img_size[(byte_cnt-2)<<3 +:8] <= spi_data_in;
|
||||
|
||||
// status, 32bit version
|
||||
8'h1e: if(byte_cnt<6) status[(byte_cnt-2)<<3 +:8] <= spi_data_in;
|
||||
default: ;
|
||||
endcase
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
/////////////////////////////// PS2 ///////////////////////////////
|
||||
// 8 byte fifos to store ps2 bytes
|
||||
localparam PS2_FIFO_BITS = 3;
|
||||
|
||||
reg clk_ps2;
|
||||
always @(negedge clk_sys) begin
|
||||
integer cnt;
|
||||
cnt <= cnt + 1'd1;
|
||||
if(cnt == PS2DIV) begin
|
||||
clk_ps2 <= ~clk_ps2;
|
||||
cnt <= 0;
|
||||
end
|
||||
end
|
||||
|
||||
// keyboard
|
||||
reg [7:0] ps2_kbd_fifo[1<<PS2_FIFO_BITS];
|
||||
reg [PS2_FIFO_BITS-1:0] ps2_kbd_wptr;
|
||||
reg [PS2_FIFO_BITS-1:0] ps2_kbd_rptr;
|
||||
|
||||
// ps2 transmitter state machine
|
||||
reg [3:0] ps2_kbd_tx_state;
|
||||
reg [7:0] ps2_kbd_tx_byte;
|
||||
reg ps2_kbd_parity;
|
||||
|
||||
assign ps2_kbd_clk = clk_ps2 || (ps2_kbd_tx_state == 0);
|
||||
|
||||
// ps2 transmitter
|
||||
// Takes a byte from the FIFO and sends it in a ps2 compliant serial format.
|
||||
reg ps2_kbd_r_inc;
|
||||
always@(posedge clk_sys) begin
|
||||
reg old_clk;
|
||||
old_clk <= clk_ps2;
|
||||
if(~old_clk & clk_ps2) begin
|
||||
ps2_kbd_r_inc <= 0;
|
||||
|
||||
if(ps2_kbd_r_inc) ps2_kbd_rptr <= ps2_kbd_rptr + 1'd1;
|
||||
|
||||
// transmitter is idle?
|
||||
if(ps2_kbd_tx_state == 0) begin
|
||||
// data in fifo present?
|
||||
if(ps2_kbd_wptr != ps2_kbd_rptr) begin
|
||||
// load tx register from fifo
|
||||
ps2_kbd_tx_byte <= ps2_kbd_fifo[ps2_kbd_rptr];
|
||||
ps2_kbd_r_inc <= 1;
|
||||
|
||||
// reset parity
|
||||
ps2_kbd_parity <= 1;
|
||||
|
||||
// start transmitter
|
||||
ps2_kbd_tx_state <= 1;
|
||||
|
||||
// put start bit on data line
|
||||
ps2_kbd_data <= 0; // start bit is 0
|
||||
end
|
||||
end else begin
|
||||
|
||||
// transmission of 8 data bits
|
||||
if((ps2_kbd_tx_state >= 1)&&(ps2_kbd_tx_state < 9)) begin
|
||||
ps2_kbd_data <= ps2_kbd_tx_byte[0]; // data bits
|
||||
ps2_kbd_tx_byte[6:0] <= ps2_kbd_tx_byte[7:1]; // shift down
|
||||
if(ps2_kbd_tx_byte[0])
|
||||
ps2_kbd_parity <= !ps2_kbd_parity;
|
||||
end
|
||||
|
||||
// transmission of parity
|
||||
if(ps2_kbd_tx_state == 9) ps2_kbd_data <= ps2_kbd_parity;
|
||||
|
||||
// transmission of stop bit
|
||||
if(ps2_kbd_tx_state == 10) ps2_kbd_data <= 1; // stop bit is 1
|
||||
|
||||
// advance state machine
|
||||
if(ps2_kbd_tx_state < 11) ps2_kbd_tx_state <= ps2_kbd_tx_state + 1'd1;
|
||||
else ps2_kbd_tx_state <= 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// mouse
|
||||
reg [7:0] ps2_mouse_fifo[1<<PS2_FIFO_BITS];
|
||||
reg [PS2_FIFO_BITS-1:0] ps2_mouse_wptr;
|
||||
reg [PS2_FIFO_BITS-1:0] ps2_mouse_rptr;
|
||||
|
||||
// ps2 transmitter state machine
|
||||
reg [3:0] ps2_mouse_tx_state;
|
||||
reg [7:0] ps2_mouse_tx_byte;
|
||||
reg ps2_mouse_parity;
|
||||
|
||||
assign ps2_mouse_clk = clk_ps2 || (ps2_mouse_tx_state == 0);
|
||||
|
||||
// ps2 transmitter
|
||||
// Takes a byte from the FIFO and sends it in a ps2 compliant serial format.
|
||||
reg ps2_mouse_r_inc;
|
||||
always@(posedge clk_sys) begin
|
||||
reg old_clk;
|
||||
old_clk <= clk_ps2;
|
||||
if(~old_clk & clk_ps2) begin
|
||||
ps2_mouse_r_inc <= 0;
|
||||
|
||||
if(ps2_mouse_r_inc) ps2_mouse_rptr <= ps2_mouse_rptr + 1'd1;
|
||||
|
||||
// transmitter is idle?
|
||||
if(ps2_mouse_tx_state == 0) begin
|
||||
// data in fifo present?
|
||||
if(ps2_mouse_wptr != ps2_mouse_rptr) begin
|
||||
// load tx register from fifo
|
||||
ps2_mouse_tx_byte <= ps2_mouse_fifo[ps2_mouse_rptr];
|
||||
ps2_mouse_r_inc <= 1;
|
||||
|
||||
// reset parity
|
||||
ps2_mouse_parity <= 1;
|
||||
|
||||
// start transmitter
|
||||
ps2_mouse_tx_state <= 1;
|
||||
|
||||
// put start bit on data line
|
||||
ps2_mouse_data <= 0; // start bit is 0
|
||||
end
|
||||
end else begin
|
||||
|
||||
// transmission of 8 data bits
|
||||
if((ps2_mouse_tx_state >= 1)&&(ps2_mouse_tx_state < 9)) begin
|
||||
ps2_mouse_data <= ps2_mouse_tx_byte[0]; // data bits
|
||||
ps2_mouse_tx_byte[6:0] <= ps2_mouse_tx_byte[7:1]; // shift down
|
||||
if(ps2_mouse_tx_byte[0])
|
||||
ps2_mouse_parity <= !ps2_mouse_parity;
|
||||
end
|
||||
|
||||
// transmission of parity
|
||||
if(ps2_mouse_tx_state == 9) ps2_mouse_data <= ps2_mouse_parity;
|
||||
|
||||
// transmission of stop bit
|
||||
if(ps2_mouse_tx_state == 10) ps2_mouse_data <= 1; // stop bit is 1
|
||||
|
||||
// advance state machine
|
||||
if(ps2_mouse_tx_state < 11) ps2_mouse_tx_state <= ps2_mouse_tx_state + 1'd1;
|
||||
else ps2_mouse_tx_state <= 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
/////////////////////////////// DOWNLOADING ///////////////////////////////
|
||||
|
||||
localparam UIO_FILE_TX = 8'h53;
|
||||
localparam UIO_FILE_TX_DAT = 8'h54;
|
||||
localparam UIO_FILE_INDEX = 8'h55;
|
||||
|
||||
// data_io has its own SPI interface to the io controller
|
||||
always@(posedge SPI_SCK, posedge SPI_SS2) begin
|
||||
reg [6:0] sbuf;
|
||||
reg [7:0] cmd;
|
||||
reg [4:0] cnt;
|
||||
reg [13:0] addr;
|
||||
|
||||
if(SPI_SS2) cnt <= 0;
|
||||
else begin
|
||||
// don't shift in last bit. It is evaluated directly
|
||||
// when writing to ram
|
||||
if(cnt != 15) sbuf <= { sbuf[5:0], SPI_DI};
|
||||
|
||||
// count 0-7 8-15 8-15 ...
|
||||
if(cnt < 15) cnt <= cnt + 1'd1;
|
||||
else cnt <= 8;
|
||||
|
||||
// finished command byte
|
||||
if(cnt == 7) cmd <= {sbuf, SPI_DI};
|
||||
|
||||
// prepare/end transmission
|
||||
if((cmd == UIO_FILE_TX) && (cnt == 15)) begin
|
||||
// prepare
|
||||
if(SPI_DI) begin
|
||||
// addr <= ioctl_index ? 14'd9 : 14'd0; //.p files loaded at $4009, ROM is at 0
|
||||
addr <= 14'd0;
|
||||
ioctl_download <= 1;
|
||||
end else begin
|
||||
ioctl_addr <= addr;
|
||||
ioctl_download <= 0;
|
||||
end
|
||||
end
|
||||
|
||||
// command 0x54: UIO_FILE_TX
|
||||
if((cmd == UIO_FILE_TX_DAT) && (cnt == 15)) begin
|
||||
ioctl_addr <= addr;
|
||||
ioctl_dout <= {sbuf, SPI_DI};
|
||||
addr <= addr + 1'd1;
|
||||
ioctl_wr <= 1;
|
||||
end else
|
||||
ioctl_wr <= 0;
|
||||
|
||||
// expose file (menu) index
|
||||
if((cmd == UIO_FILE_INDEX) && (cnt == 15)) ioctl_index <= {sbuf, SPI_DI};
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
179
Computer_MiST/Galaksija_MiST/rtl/osd.v
Normal file
@@ -0,0 +1,179 @@
|
||||
// A simple OSD implementation. Can be hooked up between a cores
|
||||
// VGA output and the physical VGA pins
|
||||
|
||||
module osd (
|
||||
// OSDs pixel clock, should be synchronous to cores pixel clock to
|
||||
// avoid jitter.
|
||||
input clk_sys,
|
||||
|
||||
// SPI interface
|
||||
input SPI_SCK,
|
||||
input SPI_SS3,
|
||||
input SPI_DI,
|
||||
|
||||
// VGA signals coming from core
|
||||
input [5:0] R_in,
|
||||
input [5:0] G_in,
|
||||
input [5:0] B_in,
|
||||
input HSync,
|
||||
input VSync,
|
||||
|
||||
// VGA signals going to video connector
|
||||
output [5:0] R_out,
|
||||
output [5:0] G_out,
|
||||
output [5:0] B_out
|
||||
);
|
||||
|
||||
parameter OSD_X_OFFSET = 10'd0;
|
||||
parameter OSD_Y_OFFSET = 10'd0;
|
||||
parameter OSD_COLOR = 3'd0;
|
||||
|
||||
localparam OSD_WIDTH = 10'd256;
|
||||
localparam OSD_HEIGHT = 10'd128;
|
||||
|
||||
// *********************************************************************************
|
||||
// spi client
|
||||
// *********************************************************************************
|
||||
|
||||
// this core supports only the display related OSD commands
|
||||
// of the minimig
|
||||
reg osd_enable;
|
||||
(* ramstyle = "no_rw_check" *) reg [7:0] osd_buffer[2047:0]; // the OSD buffer itself
|
||||
|
||||
// the OSD has its own SPI interface to the io controller
|
||||
always@(posedge SPI_SCK, posedge SPI_SS3) begin
|
||||
reg [4:0] cnt;
|
||||
reg [10:0] bcnt;
|
||||
reg [7:0] sbuf;
|
||||
reg [7:0] cmd;
|
||||
|
||||
if(SPI_SS3) begin
|
||||
cnt <= 0;
|
||||
bcnt <= 0;
|
||||
end else begin
|
||||
sbuf <= {sbuf[6:0], SPI_DI};
|
||||
|
||||
// 0:7 is command, rest payload
|
||||
if(cnt < 15) cnt <= cnt + 1'd1;
|
||||
else cnt <= 8;
|
||||
|
||||
if(cnt == 7) begin
|
||||
cmd <= {sbuf[6:0], SPI_DI};
|
||||
|
||||
// lower three command bits are line address
|
||||
bcnt <= {sbuf[1:0], SPI_DI, 8'h00};
|
||||
|
||||
// command 0x40: OSDCMDENABLE, OSDCMDDISABLE
|
||||
if(sbuf[6:3] == 4'b0100) osd_enable <= SPI_DI;
|
||||
end
|
||||
|
||||
// command 0x20: OSDCMDWRITE
|
||||
if((cmd[7:3] == 5'b00100) && (cnt == 15)) begin
|
||||
osd_buffer[bcnt] <= {sbuf[6:0], SPI_DI};
|
||||
bcnt <= bcnt + 1'd1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// *********************************************************************************
|
||||
// video timing and sync polarity anaylsis
|
||||
// *********************************************************************************
|
||||
|
||||
// horizontal counter
|
||||
reg [9:0] h_cnt;
|
||||
reg [9:0] hs_low, hs_high;
|
||||
wire hs_pol = hs_high < hs_low;
|
||||
wire [9:0] dsp_width = hs_pol ? hs_low : hs_high;
|
||||
|
||||
// vertical counter
|
||||
reg [9:0] v_cnt;
|
||||
reg [9:0] vs_low, vs_high;
|
||||
wire vs_pol = vs_high < vs_low;
|
||||
wire [9:0] dsp_height = vs_pol ? vs_low : vs_high;
|
||||
|
||||
wire doublescan = (dsp_height>350);
|
||||
|
||||
reg ce_pix;
|
||||
always @(negedge clk_sys) begin
|
||||
integer cnt = 0;
|
||||
integer pixsz, pixcnt;
|
||||
reg hs;
|
||||
|
||||
cnt <= cnt + 1;
|
||||
hs <= HSync;
|
||||
|
||||
pixcnt <= pixcnt + 1;
|
||||
if(pixcnt == pixsz) pixcnt <= 0;
|
||||
ce_pix <= !pixcnt;
|
||||
|
||||
if(hs && ~HSync) begin
|
||||
cnt <= 0;
|
||||
pixsz <= (cnt >> 9) - 1;
|
||||
pixcnt <= 0;
|
||||
ce_pix <= 1;
|
||||
end
|
||||
end
|
||||
|
||||
always @(posedge clk_sys) begin
|
||||
reg hsD, hsD2;
|
||||
reg vsD, vsD2;
|
||||
|
||||
if(ce_pix) begin
|
||||
// bring hsync into local clock domain
|
||||
hsD <= HSync;
|
||||
hsD2 <= hsD;
|
||||
|
||||
// falling edge of HSync
|
||||
if(!hsD && hsD2) begin
|
||||
h_cnt <= 0;
|
||||
hs_high <= h_cnt;
|
||||
end
|
||||
|
||||
// rising edge of HSync
|
||||
else if(hsD && !hsD2) begin
|
||||
h_cnt <= 0;
|
||||
hs_low <= h_cnt;
|
||||
v_cnt <= v_cnt + 1'd1;
|
||||
end else begin
|
||||
h_cnt <= h_cnt + 1'd1;
|
||||
end
|
||||
|
||||
vsD <= VSync;
|
||||
vsD2 <= vsD;
|
||||
|
||||
// falling edge of VSync
|
||||
if(!vsD && vsD2) begin
|
||||
v_cnt <= 0;
|
||||
vs_high <= v_cnt;
|
||||
end
|
||||
|
||||
// rising edge of VSync
|
||||
else if(vsD && !vsD2) begin
|
||||
v_cnt <= 0;
|
||||
vs_low <= v_cnt;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// area in which OSD is being displayed
|
||||
wire [9:0] h_osd_start = ((dsp_width - OSD_WIDTH)>> 1) + OSD_X_OFFSET;
|
||||
wire [9:0] h_osd_end = h_osd_start + OSD_WIDTH;
|
||||
wire [9:0] v_osd_start = ((dsp_height- (OSD_HEIGHT<<doublescan))>> 1) + OSD_Y_OFFSET;
|
||||
wire [9:0] v_osd_end = v_osd_start + (OSD_HEIGHT<<doublescan);
|
||||
wire [9:0] osd_hcnt = h_cnt - h_osd_start + 1'd1; // one pixel offset for osd_byte register
|
||||
wire [9:0] osd_vcnt = v_cnt - v_osd_start;
|
||||
|
||||
wire osd_de = osd_enable &&
|
||||
(HSync != hs_pol) && (h_cnt >= h_osd_start) && (h_cnt < h_osd_end) &&
|
||||
(VSync != vs_pol) && (v_cnt >= v_osd_start) && (v_cnt < v_osd_end);
|
||||
|
||||
reg [7:0] osd_byte;
|
||||
always @(posedge clk_sys) if(ce_pix) osd_byte <= osd_buffer[{doublescan ? osd_vcnt[7:5] : osd_vcnt[6:4], osd_hcnt[7:0]}];
|
||||
|
||||
wire osd_pixel = osd_byte[doublescan ? osd_vcnt[4:2] : osd_vcnt[3:1]];
|
||||
|
||||
assign R_out = !osd_de ? R_in : {osd_pixel, osd_pixel, OSD_COLOR[2], R_in[5:3]};
|
||||
assign G_out = !osd_de ? G_in : {osd_pixel, osd_pixel, OSD_COLOR[1], G_in[5:3]};
|
||||
assign B_out = !osd_de ? B_in : {osd_pixel, osd_pixel, OSD_COLOR[0], B_in[5:3]};
|
||||
|
||||
endmodule
|
||||
357
Computer_MiST/Galaksija_MiST/rtl/pll.v
Normal file
@@ -0,0 +1,357 @@
|
||||
// megafunction wizard: %ALTPLL%
|
||||
// GENERATION: STANDARD
|
||||
// VERSION: WM1.0
|
||||
// MODULE: altpll
|
||||
|
||||
// ============================================================
|
||||
// File Name: pll.v
|
||||
// Megafunction Name(s):
|
||||
// altpll
|
||||
//
|
||||
// Simulation Library Files(s):
|
||||
// altera_mf
|
||||
// ============================================================
|
||||
// ************************************************************
|
||||
// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
//
|
||||
// 13.0.1 Build 232 06/12/2013 SP 1 SJ Full Version
|
||||
// ************************************************************
|
||||
|
||||
|
||||
//Copyright (C) 1991-2013 Altera Corporation
|
||||
//Your use of Altera Corporation's design tools, logic functions
|
||||
//and other software and tools, and its AMPP partner logic
|
||||
//functions, and any output files from any of the foregoing
|
||||
//(including device programming or simulation files), and any
|
||||
//associated documentation or information are expressly subject
|
||||
//to the terms and conditions of the Altera Program License
|
||||
//Subscription Agreement, Altera MegaCore Function License
|
||||
//Agreement, or other applicable license agreement, including,
|
||||
//without limitation, that your use is for the sole purpose of
|
||||
//programming logic devices manufactured by Altera and sold by
|
||||
//Altera or its authorized distributors. Please refer to the
|
||||
//applicable agreement for further details.
|
||||
|
||||
|
||||
// synopsys translate_off
|
||||
`timescale 1 ps / 1 ps
|
||||
// synopsys translate_on
|
||||
module pll (
|
||||
inclk0,
|
||||
c0,
|
||||
c1,
|
||||
c2);
|
||||
|
||||
input inclk0;
|
||||
output c0;
|
||||
output c1;
|
||||
output c2;
|
||||
|
||||
wire [4:0] sub_wire0;
|
||||
wire [0:0] sub_wire6 = 1'h0;
|
||||
wire [2:2] sub_wire3 = sub_wire0[2:2];
|
||||
wire [0:0] sub_wire2 = sub_wire0[0:0];
|
||||
wire [1:1] sub_wire1 = sub_wire0[1:1];
|
||||
wire c1 = sub_wire1;
|
||||
wire c0 = sub_wire2;
|
||||
wire c2 = sub_wire3;
|
||||
wire sub_wire4 = inclk0;
|
||||
wire [1:0] sub_wire5 = {sub_wire6, sub_wire4};
|
||||
|
||||
altpll altpll_component (
|
||||
.inclk (sub_wire5),
|
||||
.clk (sub_wire0),
|
||||
.activeclock (),
|
||||
.areset (1'b0),
|
||||
.clkbad (),
|
||||
.clkena ({6{1'b1}}),
|
||||
.clkloss (),
|
||||
.clkswitch (1'b0),
|
||||
.configupdate (1'b0),
|
||||
.enable0 (),
|
||||
.enable1 (),
|
||||
.extclk (),
|
||||
.extclkena ({4{1'b1}}),
|
||||
.fbin (1'b1),
|
||||
.fbmimicbidir (),
|
||||
.fbout (),
|
||||
.fref (),
|
||||
.icdrclk (),
|
||||
.locked (),
|
||||
.pfdena (1'b1),
|
||||
.phasecounterselect ({4{1'b1}}),
|
||||
.phasedone (),
|
||||
.phasestep (1'b1),
|
||||
.phaseupdown (1'b1),
|
||||
.pllena (1'b1),
|
||||
.scanaclr (1'b0),
|
||||
.scanclk (1'b0),
|
||||
.scanclkena (1'b1),
|
||||
.scandata (1'b0),
|
||||
.scandataout (),
|
||||
.scandone (),
|
||||
.scanread (1'b0),
|
||||
.scanwrite (1'b0),
|
||||
.sclkout0 (),
|
||||
.sclkout1 (),
|
||||
.vcooverrange (),
|
||||
.vcounderrange ());
|
||||
defparam
|
||||
altpll_component.bandwidth_type = "AUTO",
|
||||
altpll_component.clk0_divide_by = 1000,
|
||||
altpll_component.clk0_duty_cycle = 50,
|
||||
altpll_component.clk0_multiply_by = 63,
|
||||
altpll_component.clk0_phase_shift = "0",
|
||||
altpll_component.clk1_divide_by = 27,
|
||||
altpll_component.clk1_duty_cycle = 50,
|
||||
altpll_component.clk1_multiply_by = 25,
|
||||
altpll_component.clk1_phase_shift = "0",
|
||||
altpll_component.clk2_divide_by = 108,
|
||||
altpll_component.clk2_duty_cycle = 50,
|
||||
altpll_component.clk2_multiply_by = 25,
|
||||
altpll_component.clk2_phase_shift = "0",
|
||||
altpll_component.compensate_clock = "CLK0",
|
||||
altpll_component.inclk0_input_frequency = 37037,
|
||||
altpll_component.intended_device_family = "Cyclone III",
|
||||
altpll_component.lpm_hint = "CBX_MODULE_PREFIX=pll",
|
||||
altpll_component.lpm_type = "altpll",
|
||||
altpll_component.operation_mode = "NORMAL",
|
||||
altpll_component.pll_type = "AUTO",
|
||||
altpll_component.port_activeclock = "PORT_UNUSED",
|
||||
altpll_component.port_areset = "PORT_UNUSED",
|
||||
altpll_component.port_clkbad0 = "PORT_UNUSED",
|
||||
altpll_component.port_clkbad1 = "PORT_UNUSED",
|
||||
altpll_component.port_clkloss = "PORT_UNUSED",
|
||||
altpll_component.port_clkswitch = "PORT_UNUSED",
|
||||
altpll_component.port_configupdate = "PORT_UNUSED",
|
||||
altpll_component.port_fbin = "PORT_UNUSED",
|
||||
altpll_component.port_inclk0 = "PORT_USED",
|
||||
altpll_component.port_inclk1 = "PORT_UNUSED",
|
||||
altpll_component.port_locked = "PORT_UNUSED",
|
||||
altpll_component.port_pfdena = "PORT_UNUSED",
|
||||
altpll_component.port_phasecounterselect = "PORT_UNUSED",
|
||||
altpll_component.port_phasedone = "PORT_UNUSED",
|
||||
altpll_component.port_phasestep = "PORT_UNUSED",
|
||||
altpll_component.port_phaseupdown = "PORT_UNUSED",
|
||||
altpll_component.port_pllena = "PORT_UNUSED",
|
||||
altpll_component.port_scanaclr = "PORT_UNUSED",
|
||||
altpll_component.port_scanclk = "PORT_UNUSED",
|
||||
altpll_component.port_scanclkena = "PORT_UNUSED",
|
||||
altpll_component.port_scandata = "PORT_UNUSED",
|
||||
altpll_component.port_scandataout = "PORT_UNUSED",
|
||||
altpll_component.port_scandone = "PORT_UNUSED",
|
||||
altpll_component.port_scanread = "PORT_UNUSED",
|
||||
altpll_component.port_scanwrite = "PORT_UNUSED",
|
||||
altpll_component.port_clk0 = "PORT_USED",
|
||||
altpll_component.port_clk1 = "PORT_USED",
|
||||
altpll_component.port_clk2 = "PORT_USED",
|
||||
altpll_component.port_clk3 = "PORT_UNUSED",
|
||||
altpll_component.port_clk4 = "PORT_UNUSED",
|
||||
altpll_component.port_clk5 = "PORT_UNUSED",
|
||||
altpll_component.port_clkena0 = "PORT_UNUSED",
|
||||
altpll_component.port_clkena1 = "PORT_UNUSED",
|
||||
altpll_component.port_clkena2 = "PORT_UNUSED",
|
||||
altpll_component.port_clkena3 = "PORT_UNUSED",
|
||||
altpll_component.port_clkena4 = "PORT_UNUSED",
|
||||
altpll_component.port_clkena5 = "PORT_UNUSED",
|
||||
altpll_component.port_extclk0 = "PORT_UNUSED",
|
||||
altpll_component.port_extclk1 = "PORT_UNUSED",
|
||||
altpll_component.port_extclk2 = "PORT_UNUSED",
|
||||
altpll_component.port_extclk3 = "PORT_UNUSED",
|
||||
altpll_component.width_clock = 5;
|
||||
|
||||
|
||||
endmodule
|
||||
|
||||
// ============================================================
|
||||
// CNX file retrieval info
|
||||
// ============================================================
|
||||
// Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
|
||||
// Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "1"
|
||||
// Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
|
||||
// Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
|
||||
// Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
|
||||
// Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
|
||||
// Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
|
||||
// Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
|
||||
// Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "c0"
|
||||
// Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
|
||||
// Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1000"
|
||||
// Retrieval info: PRIVATE: DIV_FACTOR1 NUMERIC "27"
|
||||
// Retrieval info: PRIVATE: DIV_FACTOR2 NUMERIC "108"
|
||||
// Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
|
||||
// Retrieval info: PRIVATE: DUTY_CYCLE1 STRING "50.00000000"
|
||||
// Retrieval info: PRIVATE: DUTY_CYCLE2 STRING "50.00000000"
|
||||
// Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "1.701000"
|
||||
// Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE1 STRING "25.000000"
|
||||
// Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE2 STRING "6.250000"
|
||||
// Retrieval info: PRIVATE: EXPLICIT_SWITCHOVER_COUNTER STRING "0"
|
||||
// Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
|
||||
// Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
|
||||
// Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
|
||||
// Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
|
||||
// Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
|
||||
// Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "27.000"
|
||||
// Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
|
||||
// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
|
||||
// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
|
||||
// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
|
||||
// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
|
||||
// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
// Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
|
||||
// Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
|
||||
// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "Not Available"
|
||||
// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
|
||||
// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
|
||||
// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT1 STRING "ps"
|
||||
// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT2 STRING "ps"
|
||||
// Retrieval info: PRIVATE: MIG_DEVICE_SPEED_GRADE STRING "Any"
|
||||
// Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
|
||||
// Retrieval info: PRIVATE: MIRROR_CLK1 STRING "0"
|
||||
// Retrieval info: PRIVATE: MIRROR_CLK2 STRING "0"
|
||||
// Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "63"
|
||||
// Retrieval info: PRIVATE: MULT_FACTOR1 NUMERIC "25"
|
||||
// Retrieval info: PRIVATE: MULT_FACTOR2 NUMERIC "25"
|
||||
// Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "1.70000000"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ1 STRING "25.00000000"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ2 STRING "6.25000000"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE1 STRING "0"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE2 STRING "0"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT1 STRING "MHz"
|
||||
// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT2 STRING "MHz"
|
||||
// Retrieval info: PRIVATE: PHASE_RECONFIG_FEATURE_ENABLED STRING "1"
|
||||
// Retrieval info: PRIVATE: PHASE_RECONFIG_INPUTS_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
|
||||
// Retrieval info: PRIVATE: PHASE_SHIFT1 STRING "0.00000000"
|
||||
// Retrieval info: PRIVATE: PHASE_SHIFT2 STRING "0.00000000"
|
||||
// Retrieval info: PRIVATE: PHASE_SHIFT_STEP_ENABLED_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
|
||||
// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT1 STRING "deg"
|
||||
// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT2 STRING "deg"
|
||||
// Retrieval info: PRIVATE: PLL_ADVANCED_PARAM_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
|
||||
// Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
|
||||
// Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
|
||||
// Retrieval info: PRIVATE: PLL_FBMIMIC_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
|
||||
// Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: PLL_TARGET_HARCOPY_CHECK NUMERIC "0"
|
||||
// Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
|
||||
// Retrieval info: PRIVATE: RECONFIG_FILE STRING "pll.mif"
|
||||
// Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
|
||||
// Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "1"
|
||||
// Retrieval info: PRIVATE: SELF_RESET_LOCK_LOSS STRING "0"
|
||||
// Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
|
||||
// Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
|
||||
// Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
|
||||
// Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
|
||||
// Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.000"
|
||||
// Retrieval info: PRIVATE: SPREAD_USE STRING "0"
|
||||
// Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
|
||||
// Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
|
||||
// Retrieval info: PRIVATE: STICKY_CLK1 STRING "1"
|
||||
// Retrieval info: PRIVATE: STICKY_CLK2 STRING "1"
|
||||
// Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
|
||||
// Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "1"
|
||||
// Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
// Retrieval info: PRIVATE: USE_CLK0 STRING "1"
|
||||
// Retrieval info: PRIVATE: USE_CLK1 STRING "1"
|
||||
// Retrieval info: PRIVATE: USE_CLK2 STRING "1"
|
||||
// Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
|
||||
// Retrieval info: PRIVATE: USE_CLKENA1 STRING "0"
|
||||
// Retrieval info: PRIVATE: USE_CLKENA2 STRING "0"
|
||||
// Retrieval info: PRIVATE: USE_MIL_SPEED_GRADE NUMERIC "0"
|
||||
// Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
|
||||
// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
// Retrieval info: CONSTANT: BANDWIDTH_TYPE STRING "AUTO"
|
||||
// Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "1000"
|
||||
// Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
|
||||
// Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "63"
|
||||
// Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
|
||||
// Retrieval info: CONSTANT: CLK1_DIVIDE_BY NUMERIC "27"
|
||||
// Retrieval info: CONSTANT: CLK1_DUTY_CYCLE NUMERIC "50"
|
||||
// Retrieval info: CONSTANT: CLK1_MULTIPLY_BY NUMERIC "25"
|
||||
// Retrieval info: CONSTANT: CLK1_PHASE_SHIFT STRING "0"
|
||||
// Retrieval info: CONSTANT: CLK2_DIVIDE_BY NUMERIC "108"
|
||||
// Retrieval info: CONSTANT: CLK2_DUTY_CYCLE NUMERIC "50"
|
||||
// Retrieval info: CONSTANT: CLK2_MULTIPLY_BY NUMERIC "25"
|
||||
// Retrieval info: CONSTANT: CLK2_PHASE_SHIFT STRING "0"
|
||||
// Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
|
||||
// Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "37037"
|
||||
// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
// Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
|
||||
// Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
|
||||
// Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
|
||||
// Retrieval info: CONSTANT: PORT_ACTIVECLOCK STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_ARESET STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_CLKBAD0 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_CLKBAD1 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_CLKLOSS STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_CLKSWITCH STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_CONFIGUPDATE STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_FBIN STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_INCLK0 STRING "PORT_USED"
|
||||
// Retrieval info: CONSTANT: PORT_INCLK1 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_LOCKED STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_PFDENA STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_PHASECOUNTERSELECT STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_PHASEDONE STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_PHASESTEP STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_PHASEUPDOWN STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_PLLENA STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANACLR STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANCLK STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANCLKENA STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANDATA STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANDATAOUT STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANDONE STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANREAD STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_SCANWRITE STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clk0 STRING "PORT_USED"
|
||||
// Retrieval info: CONSTANT: PORT_clk1 STRING "PORT_USED"
|
||||
// Retrieval info: CONSTANT: PORT_clk2 STRING "PORT_USED"
|
||||
// Retrieval info: CONSTANT: PORT_clk3 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clk4 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clk5 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clkena0 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clkena1 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clkena2 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clkena3 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clkena4 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_clkena5 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_extclk0 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_extclk1 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_extclk2 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: PORT_extclk3 STRING "PORT_UNUSED"
|
||||
// Retrieval info: CONSTANT: WIDTH_CLOCK NUMERIC "5"
|
||||
// Retrieval info: USED_PORT: @clk 0 0 5 0 OUTPUT_CLK_EXT VCC "@clk[4..0]"
|
||||
// Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT_CLK_EXT VCC "c0"
|
||||
// Retrieval info: USED_PORT: c1 0 0 0 0 OUTPUT_CLK_EXT VCC "c1"
|
||||
// Retrieval info: USED_PORT: c2 0 0 0 0 OUTPUT_CLK_EXT VCC "c2"
|
||||
// Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT_CLK_EXT GND "inclk0"
|
||||
// Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
|
||||
// Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
|
||||
// Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
|
||||
// Retrieval info: CONNECT: c1 0 0 0 0 @clk 0 0 1 1
|
||||
// Retrieval info: CONNECT: c2 0 0 0 0 @clk 0 0 1 2
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL pll.v TRUE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL pll.ppf TRUE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL pll.inc FALSE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL pll.cmp FALSE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL pll.bsf FALSE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL pll_inst.v FALSE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL pll_bb.v FALSE
|
||||
// Retrieval info: LIB_FILE: altera_mf
|
||||
// Retrieval info: CBX_MODULE_PREFIX: ON
|
||||
129
Computer_MiST/Galaksija_MiST/rtl/roms/CHRGEN.hex
Normal file
@@ -0,0 +1,129 @@
|
||||
:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
|
||||
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
|
||||
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
|
||||
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
|
||||
:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
|
||||
:10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0
|
||||
:10006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0
|
||||
:10007000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90
|
||||
:10008000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
|
||||
:10009000FFFFFFFFFFFFFFFFFFFFFFAFBFAFAFFFA0
|
||||
:1000A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60
|
||||
:1000B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF50
|
||||
:1000C000FFF11F11FFF11F11FFF11F11FFF11F11B0
|
||||
:1000D000FFF11F11FFF11F11FFF11F11FFF11F11A0
|
||||
:1000E000FFF11F11FFF11F11FFF11F11FFF11F1190
|
||||
:1000F000FFF11F11FFF11F11FFF11F11FFF11F1180
|
||||
:10010000BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3F
|
||||
:10011000FFFFFFFFFFFFFFFFFFFFFFDFDFDFDFFF6F
|
||||
:10012000FFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFE0
|
||||
:10013000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF
|
||||
:10014000FFF11F11FFF11F11FFF11F11FFF11F112F
|
||||
:10015000FFF11F11FFF11F11FFF11F11FFF11F111F
|
||||
:10016000FFF11F11FFF11F11FFF11F11FFF11F110F
|
||||
:10017000FFF11F11FFF11F11FFF11F11FFF11F11FF
|
||||
:10018000DFCF8387830303877BC7037BFB7B7B876F
|
||||
:1001900083878387037B7B7B7B7B0387870387FF47
|
||||
:1001A000FFEFD7B7DFFFE7FCDFEFFFFFFFFFFFBF8A
|
||||
:1001B00087DF8787BF0387038787FFFFFFFFFF87EF
|
||||
:1001C000FFF11F11FFF11F11FFF11F11FFF11F11AF
|
||||
:1001D000FFF11F11FFF11F11FFF11F11FFF11F119F
|
||||
:1001E000FFF11F11FFF11F11FFF11F11FFF11F118F
|
||||
:1001F000FFF11F11FFF11F11FFF11F11FFF11F117F
|
||||
:10020000EFB7777B77FBFB7B7BEF7FBBFB337B7BA6
|
||||
:100210007B7B7B7BEF7B7B7B7B7B7F7B7B7F7BFF2E
|
||||
:10022000FFEFD7B70773DBFAEFDFEFEFFFFFFFBF9B
|
||||
:100230007BCF7B7B9FFB7B7B7B7BE7E7BFFFF77BFA
|
||||
:10024000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBE
|
||||
:10025000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAE
|
||||
:10026000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9E
|
||||
:10027000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8E
|
||||
:10028000F77B77FB77FBFBFB7BEF7FDBFB337B7B3A
|
||||
:100290007B7B7BFBEF7B7B7B7B7BBFFBFBBFFBFF2E
|
||||
:1002A000FFEFD7B7DB73DBF6F7BFABEFFFFFFFDF87
|
||||
:1002B0007BDF7F7FAFFBFB7F7B7BE7E7DFFFEF7BB6
|
||||
:1002C000FFFFFFFFF1F1F1F11F1F1F1F11111111AE
|
||||
:1002D000FFFFFFFFF1F1F1F11F1F1F1F111111119E
|
||||
:1002E000FFFFFFFFF1F1F1F11F1F1F1F111111118E
|
||||
:1002F000FFFFFFFFF1F1F1F11F1F1F1F111111117E
|
||||
:10030000037B77FB77FBFBFB7BEF7FEBFB4B7B7B85
|
||||
:100310007B7B7BFBEF7BB77BB77BDFFBFBDFFBFFF5
|
||||
:10032000FFEFFF03DBBFEBEEF7BFC7EFFFFFFFDF22
|
||||
:100330003BDF7F7FB78383BF7B7BFFFFEF03DF7FE5
|
||||
:10034000FFFFFFFFF1F1F1F11F1F1F1F111111112D
|
||||
:10035000FFFFFFFFF1F1F1F11F1F1F1F111111111D
|
||||
:10036000FFFFFFFFF1F1F1F11F1F1F1F111111110D
|
||||
:10037000FFFFFFFFF1F1F1F11F1F1F1F11111111FD
|
||||
:10038000FF7B87FB7783831B03EF7FF3FB4B737B41
|
||||
:10039000837B8387EF7BB77BCF07EFFBFBEF87FF89
|
||||
:1003A000FFEFFFB787DFF7DFF7BF8383FF03FFEFC1
|
||||
:1003B0005BDFBF9FBB7F7BDF877BFFFFF7FFBF9FBD
|
||||
:1003C000FFFFFFFFF1F1F1F11F1F1F1F11111111AD
|
||||
:1003D000FFFFFFFFF1F1F1F11F1F1F1F111111119D
|
||||
:1003E000FFFFFFFFF1F1F1F11F1F1F1F111111118D
|
||||
:1003F000FFFFFFFFF1F1F1F11F1F1F1F111111117D
|
||||
:10040000030377FB77FBFB7B7BEF7FEBFB7B6B7B5C
|
||||
:10041000FB7BEB7FEF7BB74BCF7FF7FBFBF77FFFE0
|
||||
:10042000FFEFFFB76FEFEBEEF7BFC7EFFFFFFFEF99
|
||||
:100430006BDFC77FBB7F7BEF7B07FFFFEF03DFEF48
|
||||
:10044000FFFFFFFFF1F1F1F11F1F1F1F111111112C
|
||||
:10045000FFFFFFFFF1F1F1F11F1F1F1F111111111C
|
||||
:10046000FFFFFFFFF1F1F1F11F1F1F1F111111110C
|
||||
:10047000FFFFFFFFF1F1F1F11F1F1F1F11111111FC
|
||||
:10048000F77B77FB77FBFB7B7BEF7BDBFB7B5B7B94
|
||||
:10049000FB5BDB7FEF7BCF4BB77FFBFBFBFB7FFF88
|
||||
:1004A000FFEFFF036FF75BF6F7BFABEFE7FFFFF779
|
||||
:1004B00073DFFB7F037F7BF77B7FE7E7DFFFEFEFF8
|
||||
:1004C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3C
|
||||
:1004D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2C
|
||||
:1004E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1C
|
||||
:1004F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0C
|
||||
:10050000EF7B777B77FBFB7B7BEF7BBBFB7B3B7BDB
|
||||
:10051000FBBBBB7BEF7BCF337B7BFB7B7BFB7BFF27
|
||||
:10052000FFFFFFB7833BBBFAEFDFEFEFE7FFE7F734
|
||||
:100530007BDFFB7BBF7B7BF77B7BE7E7BFFFF7FFC7
|
||||
:10054000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBB
|
||||
:10055000F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F18B
|
||||
:100560001F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F9B
|
||||
:10057000111111111111111111111111111111116B
|
||||
:10058000DF7B83878303FB077BC7877B037B7B87BB
|
||||
:10059000FB477B87EF87CF7B7B87038787038703B7
|
||||
:1005A000FFEFFFB7EF3B47FCDFEFFFFFEFFFE7FB9E
|
||||
:1005B000878F0387BF8787F78787FFEFFFFFFFEFEF
|
||||
:1005C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3B
|
||||
:1005D000F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F10B
|
||||
:1005E0001F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1B
|
||||
:1005F00011111111111111111111111111111111EB
|
||||
:10060000BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3A
|
||||
:10061000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA
|
||||
:10062000FFFFFFFFFFFFFFFEFFFFFFFFF7FFFFFBE7
|
||||
:10063000FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFD2
|
||||
:10064000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBA
|
||||
:10065000F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F18A
|
||||
:100660001F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F9A
|
||||
:10067000111111111111111111111111111111116A
|
||||
:10068000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7A
|
||||
:10069000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6A
|
||||
:1006A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5A
|
||||
:1006B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4A
|
||||
:1006C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3A
|
||||
:1006D000F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F10A
|
||||
:1006E0001F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1A
|
||||
:1006F00011111111111111111111111111111111EA
|
||||
:10070000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9
|
||||
:10071000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9
|
||||
:10072000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD9
|
||||
:10073000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC9
|
||||
:10074000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB9
|
||||
:10075000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA9
|
||||
:10076000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF99
|
||||
:10077000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF89
|
||||
:10078000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF79
|
||||
:10079000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF69
|
||||
:1007A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF59
|
||||
:1007B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF49
|
||||
:1007C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF39
|
||||
:1007D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF29
|
||||
:1007E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF19
|
||||
:1007F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF09
|
||||
:00000001FF
|
||||
257
Computer_MiST/Galaksija_MiST/rtl/roms/ROM1.hex
Normal file
@@ -0,0 +1,257 @@
|
||||
:10000000F397C3DA03DF2C2CCDB20AC36D0AF3C910
|
||||
:100010007CBAC07DBBC9FBC9E3CD0501BEC3940159
|
||||
:10002000D9FE20CDB509D9C9210000C9CCCCCC7EE0
|
||||
:10003000F1CD1404C38F071CF5C5D5E521B02B3EC7
|
||||
:10004000C09696965F7E0F0F0F47B728002805359C
|
||||
:10005000AFD810FD237743217F204D3AA82B1F38BE
|
||||
:10006000003D20FD1807F331A82BC317030C79E6D8
|
||||
:10007000080F0F0FF628ED4713110C08790F0F0F1B
|
||||
:100080003FCB1AF61F07D6400FED4F72141414140D
|
||||
:10009000AF371F1FAA576178425245414B00474C6A
|
||||
:1000A00000008000AF371F1F1F67177705280FED6F
|
||||
:1000B0005FD627A5ED4F1DC28B003E0318A336BCAB
|
||||
:1000C0003A822AFE3A20343AAF2B07302E218A2A70
|
||||
:1000D00011303906087A3434BE180434BE3E353047
|
||||
:1000E0000A732BCB4028022B7A10F005100D7EFEF0
|
||||
:1000F0003438082BCB4E2803732373FDE9E1D1C1BB
|
||||
:10010000F1FBED4D131AFE2028FAC923AFCDF30DF4
|
||||
:1001100022992AF7CF23AFCDF30DD5ED5B992A13A2
|
||||
:10012000D730311821CD0501D641D8FE1A3FD8135A
|
||||
:10013000A7202BDF2827CF232929D53817ED5B9956
|
||||
:100140002A19D1D5380DD1DF2909D5EBCD8301D7B7
|
||||
:1001500030363ED5CD9907534F5252590DAF262A0E
|
||||
:1001600017176FAFC9CD7201D0FE41D8C609FE5036
|
||||
:1001700018061AFE30D8FE3A3FD813E60FC9772387
|
||||
:100180007D18F8D5ED5B382C2A6A2A7DE6F06FEDF4
|
||||
:1001900052D1AFC9232807C54E060009C11B13233E
|
||||
:1001A000E3C9CD4802060048CD0501CDB00118FBDA
|
||||
:1001B000CD72013820CBF0CB782015CDC301CB40D8
|
||||
:1001C000C80DC9CD4F02C8D9626B084FD9CBF8F121
|
||||
:1001D000CB40C00CC9DF2E05CB40CBC0C8F1CB70E3
|
||||
:1001E000C8211800C5D5D9CD1409D101F301C5D551
|
||||
:1001F000C36D0BC1D5DF451BDF2B021805DF2D02B8
|
||||
:10020000CBC8CD4A02CD7201380DCBE8CD4F0220CC
|
||||
:100210001418F2D1AF1817CB6828F8F1D979B47D4A
|
||||
:10022000D92002CB7FC25A06CB482802ED4481A7D1
|
||||
:100230002813CB7F28073CF5CDF40A18053DF5CDF2
|
||||
:10024000E30AF118EACB70C9CBB0D9EF4DD9C90890
|
||||
:10025000D9545D790600F529CB11CB1029CB11CBF0
|
||||
:100260001019894F3E008847F1D5160029CB11CBD4
|
||||
:1002700010085F197A894F7A8847D1D9C95D54131C
|
||||
:100280001A1B1213FE0D20F718257DFEB628202B11
|
||||
:10029000181D7EFE0D28181851CDD30CCDF207DAAB
|
||||
:1002A0005A063E0CE721B62B22682ACD3109D91116
|
||||
:1002B0000028ED53682A11B62B4E3600CD37093E83
|
||||
:1002C0005FCDB607CDF50CFE0D2871B728AFFE1D2A
|
||||
:1002D00028B8FE1E28BC38D747E521342CD7E13892
|
||||
:1002E000CE1B1A13121BD720F8702318C23A682AA3
|
||||
:1002F000E61F3E0D32B52BC8E7C93A33200FD83A76
|
||||
:1003000031200F38F5CDED02119800CD3709ED5BA6
|
||||
:100310009F2A7AB3C4ED08FBCDED0211070FCD374C
|
||||
:1003200009EF11313031A72AD5E5E5E52A362C232E
|
||||
:1003300023E531A82BDD21AC2ACDBB07D511B62B87
|
||||
:10034000CDD30CC1CA8C031B7C121B7D12C5D57981
|
||||
:1003500093F5CDF207D52010D5CD1108C12A382C40
|
||||
:10036000CD4409606922382CC12A382CF1E5FE03FE
|
||||
:1003700028AF5F160019ED5B6A2AD7D253012238E5
|
||||
:100380002CD1CD4C09D1E1CD44091895211703E5B5
|
||||
:100390002E0E012E9B012EEE260FCD0501D5132327
|
||||
:1003A000BE2806CB7E200C18111A1323BE28FACBC8
|
||||
:1003B0007E28031B1812FE2E280923CB7E28FB2340
|
||||
:1003C000D118D723CB7E28FB7E236EE67F67F1CB47
|
||||
:1003D00074CBB4E5C46A0AC3A92BED56FD21FD0018
|
||||
:1003E00021FF2775452370342003B628F8226A2A96
|
||||
:1003F00031AD2B210BC9E53BE53E0CE7CDD30C110C
|
||||
:100400003A2C19313A2CE5E5C36700CDD30CED5BEE
|
||||
:10041000362C180E32B52BDF3A03F11810DF0D2001
|
||||
:10042000F1EFCDF60738E1ED539F2A1313CDFF020C
|
||||
:10043000DD21AC2A2E2FC39803CD8E06CD100BEFF5
|
||||
:10044000C9CF7CB520E7CD1C0830DC18BBEFCD133D
|
||||
:100450000818F6CFD5CDF207C25B06F118C9CDD387
|
||||
:100460000CCDED02CDF207389FCD3109CDF607381E
|
||||
:10047000F6CDFF023A3020213420A60F30EB18F1E0
|
||||
:10048000DF3A053E0DE718A5DF0D46E71893DF229A
|
||||
:1004900054CD380920F618152E5C012E60262ACD81
|
||||
:1004A0000E067E23B72806E77DE60F20F5DF2C1B1E
|
||||
:1004B0003A682AE60728173E20E718F4CF7CF6288A
|
||||
:1004C000E6296722682ADF2C021803DF3B13CD14CC
|
||||
:1004D000042EE0C39803CDD30C226C2A20063E0CD8
|
||||
:1004E000013E0DE7F7CD96032007CDB20ACDF60801
|
||||
:1004F0003EE718B9CD7409CFD5CDF207C25B062A05
|
||||
:100500009F2AE52AA32AE5EF22A12A3922A32AC39A
|
||||
:1005100027042AA32A7CB5CA5A06F9E122A32AE1B4
|
||||
:10052000229F2AD1CD5909F7CF01EF2322912A2A00
|
||||
:100530009F2A22932AEB22952A010A002AA12AEB5C
|
||||
:10054000EF393E097E23B628167E2BBA20F57EBBF6
|
||||
:1005500020F1EBEF39444D210A0019CD4C09F92A5D
|
||||
:10056000952AEBF7CD8B07229B2AD5EB2AA12A7C73
|
||||
:10057000B5CA5B06D72809D1CD59092A9B2A18EAA2
|
||||
:10058000CD450ACD6D0AEB2A912AE519E5CDBC0AC5
|
||||
:100590002AA12ACD3B07D12A6E2AF1073001EB7C34
|
||||
:1005A000AAF2A505EBD7D1DA24052A932A229F2A9D
|
||||
:1005B00018ADCA3607E5CDFC05380F2825E3C10A7A
|
||||
:1005C000B7282A03CD7E0120F6C9E1DF2200CDD96C
|
||||
:1005D00005281A13CD7E0120F51AFE0DC8FE22C093
|
||||
:1005E00013C91BCD960328E2E1CD7E01C8DF2B02A3
|
||||
:1005F00018C33600CD7F01C8363018F8CD2501D894
|
||||
:100600001B1A13FE29C81AFE242802AFC9137DD66F
|
||||
:100610005C200A2E70DF2803CD1401B4C9FE07D276
|
||||
:100620008F072E80B4C9CDFC053838D5F5E5ED5BD4
|
||||
:100630009D2A2A382CDF23021803DF2C0FE1F1CD8D
|
||||
:10064000B205ED539D2AD1DF2C4318DA1A13FE0DA3
|
||||
:1006500020FA1313D730DEE1F10ED5CD9907484FBC
|
||||
:10066000573F0DCFD5CDF207131318D6D53E3FCD4A
|
||||
:10067000BD0711B62BDF0D05D1CDFC05F7D1D5CDCA
|
||||
:10068000FC0538D7D511B62BCDB205D1F1F7DF2D4A
|
||||
:1006900006EFCDBC0A1814DF2B00CDB306DF2B0804
|
||||
:1006A000CDB306CD320B18F5DF2DDFCDB306CD1E51
|
||||
:1006B0000B18EACD9303DF2A08CD9303CDE60A1881
|
||||
:1006C000F5DF2FC6CD9303CDF70A18EA3E01013EB0
|
||||
:1006D00080F5DF2A05F132AF2BF7F106AFA7F5CF92
|
||||
:1006E000E5CD0500D5EB0120001C21002816033EB6
|
||||
:1006F000011D280A07071520F809CB8C18EF47D1F0
|
||||
:10070000E3CBBDCBB5CB3D3001072600C10947F196
|
||||
:1007100078200CCB7E2801A6EF280123C3BC0AF564
|
||||
:10072000CB7E20023680F1FA2D072FA606B677F78A
|
||||
:10073000CD8B07DF3D59E5CDB20AE1CD0E090104AD
|
||||
:1007400000D5E5EBDDE5E1EDB0EB2B2BCB1623DDA2
|
||||
:100750007E0417CB1E2BCB1EE1D1C9CDFC0538087A
|
||||
:10076000F5DF3D2BF1CDB205F7626BCDFC0518AC82
|
||||
:10077000D5EBCDB20AD1C9CD2501D2450ACDA20112
|
||||
:10078000C0DF280BCDB20ADF2901C9CD2501D0D5A4
|
||||
:10079000CD9907574841543F0DD1CD3709ED5B9FA7
|
||||
:1007A0002A7BB2211703E3C8D7D84EC53600E5CD62
|
||||
:1007B0003109E1C13E3F1B71C336093E3E11B62BE4
|
||||
:1007C000E7D9365FD9CDF50CE7D9365FD9FE0D28CC
|
||||
:1007D0000CFE1D2815FE0C28E2FE2038E81213FE40
|
||||
:1007E0000DC87BFE3420DE3E1DE77BFEB628CC1B09
|
||||
:1007F00018CFED5B362CE52A362C2BD7D217032ADF
|
||||
:10080000382C2BD7E1D81A9547131A9C38041BB003
|
||||
:10081000C913131AFE0D20FA1318DB131AEFFE0D7D
|
||||
:1008200028F6FE2128ECFE22200A131AFE0D28E8E5
|
||||
:10083000FE2220F6FE4520E32EF6C39803DD7EFF60
|
||||
:10084000A73E2028023E2DE7AFDD77FF3DF5212CA6
|
||||
:1008500000CD050B300DCDE30AF13D18F0CDF40AC3
|
||||
:10086000F13CF521A000CD050B30F2DD7EFEED441C
|
||||
:10087000280BD9CB39CB1CCB1DD93D18F30607DD8E
|
||||
:10088000E5E1360023AFCD4F02D978D9772310F5B3
|
||||
:100890000100062B7EFE053F3E002B8ECB21FE0A7B
|
||||
:1008A00038023E0077F5A72802CBC1F110E979C1E3
|
||||
:1008B000380604C5060118DF4F783CFAC808FE0761
|
||||
:1008C000300647CD1C091843C50601CD1C093E451D
|
||||
:1008D000E7C1CB783E2B28083E2DE778ED4418027F
|
||||
:1008E000E7780630FE0A381CC6F60418F71A6F13AC
|
||||
:1008F0001A6713CDBC0AD5C5E5DD7EFEFE80C23D7C
|
||||
:1009000008AF0620F6304F78E779E7E1C1D101FB67
|
||||
:10091000FFDD09C9CD4C0C010A0018F50410033E97
|
||||
:100920002EE77EF630E723CB3920F20505F80418D0
|
||||
:10093000EBCDED083E20E7AF471A13B8C8E7FE0D30
|
||||
:1009400020F73CC9D7C81A02130318F8789220037D
|
||||
:100950007993C81B2B1A7718F3C1E122A12A7CB521
|
||||
:100960002810E122912AE1226E2AE122932AE12233
|
||||
:10097000952AC5C921C8D4C139D253012AA12A7CDC
|
||||
:10098000B528132A952AE52A932AE52A6E2AE52A0C
|
||||
:10099000912AE52AA12AE5C5C9DF3E07CD3904C859
|
||||
:1009A000D823C9DF3D06CD3904C023C9DF3C53CD70
|
||||
:1009B0003904D023C9F5CDAC2B2A682A38467723D1
|
||||
:1009C0003E2ABC203A21B02BCD3D0AE52334CD3D53
|
||||
:1009D0000AB7ED5B6C2ACB8A21E001ED52280E3874
|
||||
:1009E0000C444DCBDACBEA21200019EDB02A6C2A59
|
||||
:1009F0007CB5E12002360321E029E5CD340AE1226D
|
||||
:100A0000682AF1C9FE0D200E7CFE2B3804360D1825
|
||||
:100A1000EECD340A18AAFE0C200D21FF2936202B1A
|
||||
:100A2000CB4C28F92318D8FE1D20D436202BCB4CD4
|
||||
:100A300020F218CB3620237DE61F20F8C9ED57E0C1
|
||||
:100A40007EB720FCC9D5E5F5010400DDE5D1EDB0A8
|
||||
:100A5000DDCB0216DDCB0316781FDD770437DDCB47
|
||||
:100A6000021E0E05DD09F1E1D1C9CD8107D9CD0EF8
|
||||
:100A700009110000DD7E03DD4E04FE80282CFE01FE
|
||||
:100A8000FAAE0AFE10D9F25A06D947DD7E00DD6EB5
|
||||
:100A900001DD6602CB27ED6ACB13CB1210F6CB211A
|
||||
:100AA0003008B4B5280113CDD70AD5D9E1C93EFF26
|
||||
:100AB00018ECCD8E06CD990901210A00D5EBCD1792
|
||||
:100AC00009CDD40AD5211000CB1CD9D1EF634ACD72
|
||||
:100AD0004C0C182FAF82F07BED445F7A2F3FCE0095
|
||||
:100AE0005737C9CDB90ACD680C283EBBCA6B0BCDB0
|
||||
:100AF000810B180FCDB90ACD680C282DBBCA5B0637
|
||||
:100B0000CDAE0B1868CD450ACD680C01FBFF180669
|
||||
:100B1000CD680C01F6FFDD09BDCDE60BD1C9CD686E
|
||||
:100B20000C2005CD620B1830BB2853AA57180BCDEB
|
||||
:100B3000450ACD680C282CBB2844CD040C280E3067
|
||||
:100B400007EBD9EB794847D9CD170C18207CAA20A0
|
||||
:100B50001A1E01CD3F0C1815DD7EFFEE80DD77FFFC
|
||||
:100B6000D1C9D5626BD96B6248D9012E80DD74FA88
|
||||
:100B7000DD75F9D9DD75F6DD74F7DD71F8D9C30DD2
|
||||
:100B8000097CAA671DE5C50618CD810CAFEF4FD9CA
|
||||
:100B9000CB39CB1CCB1DD930041979884FD910051E
|
||||
:100BA000C1E1D91830D9CB19CB1CCB1D18E17BED95
|
||||
:100BB000445F7CAA67E5C50619D9ED5279984F3094
|
||||
:100BC0000319884FD93FED6ACB11100BE5C5D9C188
|
||||
:100BD000E1D9C1E1D9185ED929CB1130DD3FED5201
|
||||
:100BE00079984FB718DE280ABB280F7CAACC040CD2
|
||||
:100BF0001807BBC837CB7A1803C8CB7C3FC03F1F50
|
||||
:100C000037CB17C97D932807E20D0CED4407C9D9EE
|
||||
:100C100079B82001D7D9C97D93280EFE18D0D9CB39
|
||||
:100C200038CB1ACB1B3D20F7D91E007CAAFA460C04
|
||||
:100C3000D91979884F3007CB19CB1CCB1D37D97DFB
|
||||
:100C40008BEA610C6FC9D9ED5279984F0618AF0C39
|
||||
:100C50000DFA5D0C3D29CB1110F72E80C9D98518EE
|
||||
:100C6000E07CB7F2580618F2E1D5E5DD56FFDD5E0F
|
||||
:100C7000FEDD66FADD6EF9D9DD5EFBDD56FCDD4694
|
||||
:100C8000FDDD6EF6DD66F7DD4EF8D93E80BDC9D5D7
|
||||
:100C9000D921A72AE55E23562346D9CD4802EF0E77
|
||||
:100CA00003060856D929CB11D9CB123006D91979A8
|
||||
:100CB000884FD910EF230D20E8EFD9D17DC66512FA
|
||||
:100CC000136F7CCEB012136779CE05124FCD140985
|
||||
:100CD000C36D0BEFCD0501CD720138071BCDA2010D
|
||||
:100CE000CD6D0A7CB5C9BC20022600BD20022E00B5
|
||||
:100CF0001D200B1806D92AA52A0E0E1134201A0F12
|
||||
:100D00007B38E3FE3220080D20DC3AB42B1845BCBA
|
||||
:100D100028DEBD28DB0600D71A0F38CA10F97CB7C9
|
||||
:100D200020036318057DB720D56B22A52AEF7BFE33
|
||||
:100D300034CA6104FE31CA0503FE1B21352038196F
|
||||
:100D4000FE1F3810D61FCB1E174F21700D09ED5F07
|
||||
:100D500032A82A7E32B42BD9C9C640CB1E38F52121
|
||||
:100D6000940D015B04BE2805230C10F90E7918E4DC
|
||||
:100D700020205F302131223223332434253526369A
|
||||
:100D8000BF37283829392B3B2A3A3C2C2D3D3E2EA3
|
||||
:100D90003F2F0D0D58435A530C00CD8301ED4B9955
|
||||
:100DA0002AED42181A4E23666918147CB52005CD29
|
||||
:100DB000F50C1806CBEC7E2FE6016F3E6E2600C3C5
|
||||
:100DC000BC0ACDFC05E5DF2C00CDFC05C10ABE2028
|
||||
:100DD0000BB7280723037DE60F20F23EAF18D9CDCD
|
||||
:100DE000650138141BEFCD650138D40707070701EB
|
||||
:100DF000E60DC5060407ED6ADA5A0610F8C9F6AF23
|
||||
:100E0000F5CFE5CD0500E3C171F128022370F7D5D8
|
||||
:100E100011BD0AD5E9B27DC9CD7409CD300722A133
|
||||
:100E20002ADF54B2DF4FAFCF226E2A2ED8C39803E9
|
||||
:100E300021362CE52A382CDF0D021806CFE3CD052C
|
||||
:100E40000023D10660F3AFCD680E10FA3EA5CD6841
|
||||
:100E50000ECD620ECD620E2B1A13CD680E30F978CE
|
||||
:100E60002F5FEB7DCD680E7CD90E10213820CB4151
|
||||
:100E700028050F0664300F36FC063210FE36B80621
|
||||
:100E80003210FE36BC0410FE10FE0D20E103CB48EC
|
||||
:100E900028FBD98047D7C9DF3F00F5DF0D02EF3EC1
|
||||
:100EA000CFE5F3CDDD0E79FEA520F847CDD90E6153
|
||||
:100EB000D1D519EBCDD90E612B78C10947EBCDDD2A
|
||||
:100EC0000E0879BE2805F1280DF57123EB0838EDE1
|
||||
:100ED000CDDD0EF104C8C38F07CDDD0E69D9060143
|
||||
:100EE0003EA780210020CB4628073D20F5D9791860
|
||||
:100EF000A206DA3EA910FC065A4ECB19CE0010F914
|
||||
:100F000007D9CB19D918D9402752454144590D4C1E
|
||||
:100F1000495354845E52554E840B4E455783FC53BF
|
||||
:100F20004156458E304F4C448E97454449548299E2
|
||||
:100F30004E4558548564494E505554866C494684F4
|
||||
:100F400041474F544F845343414C4C84F4554E44D5
|
||||
:100F50004F5486CC524554851254414B4586262128
|
||||
:100F6000844D23844D464F528E185052494E54841E
|
||||
:100F700080444F5486CF454C5345844D4259544587
|
||||
:100F80008DFF574F52448DFE41525224C10B535492
|
||||
:100F90004F508317484F4D4584D6875B524E448C43
|
||||
:100FA0008F4D454D8D9A4B4559CDAB42595445CD4A
|
||||
:100FB000BC574F5244CDA5505452876956414CC737
|
||||
:100FC0007045518DC2494E54CABC268DDF555352CF
|
||||
:100FD000CE0F444F5486DC8777535445508528857F
|
||||
:100FE0002A415484BC582484985924849B848E4379
|
||||
:100FF000485224CE15860B454C5345841A881B0055
|
||||
:00000001FF
|
||||
257
Computer_MiST/Galaksija_MiST/rtl/roms/ROM2.hex
Normal file
@@ -0,0 +1,257 @@
|
||||
:100000002A6A2A7CB520042B226A2A3E0C1813E3A4
|
||||
:10001000D5115B07D7201D21F01DD1F1C39A03C371
|
||||
:100020005B07E73E0C32A82B21A11011A92B01067A
|
||||
:1000300000EDB0C9118E04D72013D1E3F1DF250AFA
|
||||
:10004000CF3E20E7CD4C13C3AD04C38E0411770718
|
||||
:10005000D7D1E3C021231E18C2C37707018004C58E
|
||||
:100060003EFF32B52BC9CD6010CDD30CC36404F56F
|
||||
:100070002AB52B2C202121AB2ACB46200E2199100A
|
||||
:100080000604BE2328042310F9267EF5CDFF02DBEB
|
||||
:10009000FF1738F8F1D3FFF1C95B435C435D5A5E4B
|
||||
:1000A00053C30F10C36F102A9F2A7CB5CA5A06EBA0
|
||||
:1000B0003E0132B32BCDBF10DD21AC2A2BEBF7AFC5
|
||||
:1000C00032AA2A32DD2BEBEF22F62B22972A2A6A5C
|
||||
:1000D0002A2B772B77EBCD5217E5CDE61021AA2AF4
|
||||
:1000E00034AF32DD2BE1AF32EC2B32EA2B32EB2B8B
|
||||
:1000F000229F2AED5B382CD7D03ADD2BFE08C8CDE5
|
||||
:10010000FF02CD3317E5CD0C11E118E4214D12E5C6
|
||||
:1001100021DE2BDD21DB2B3ADD2BB7C8FE09D224F3
|
||||
:10012000133D202721781922E62B3ECD32E52B3EC8
|
||||
:100130000332E92B2ADF2B7CB5C8CD1B1322972A6B
|
||||
:100140003AE22BB720013C32B22BC93D20217E324E
|
||||
:10015000EC2B11E52B06033AEC2BB7C8DD35112A41
|
||||
:10016000DF2B7E2322DF2B1213DD340E10E9C93D75
|
||||
:1001700020043CDD770E3D200CCD18132ADF2B2206
|
||||
:10018000E52BC348133D2023CD1B132ADF2B7DE62F
|
||||
:1001900004C460107DE60332B32B3AE12BB7C8FEEE
|
||||
:1001A00040C22D192AE22B22F62BC93D200DCD1875
|
||||
:1001B000132ADF2B22ED2B22EA2BC93DC0CD1813C9
|
||||
:1001C000ED4BDF2BED43ED2BCDD211CA2D19F1C331
|
||||
:1001D00054123AAA2AB7C02ADA2B7CB5C8CD151218
|
||||
:1001E000CA4F16E52A382CD7E1D253017E12231BC1
|
||||
:1001F000CD501830EEEB23CBFE2B702B712B36003D
|
||||
:10020000EBAF3CC93AAA2AB7200B2B23CD501830AC
|
||||
:10021000FAAF474FC9E5D92A6A2A2B1812D1D51A45
|
||||
:10022000BE2816F680BE2815CB7E2B28FB2B2B7EF6
|
||||
:10023000B720EAE5D9D1E13CC92B1318E213EBCD85
|
||||
:100240005018EB30E32B462B4EEBD1AFC9ED4BEA08
|
||||
:100250002BCDD21111E42B1AB7200B21E52B010471
|
||||
:1002600000EDB0121817FEED281321E92B34DD7EC6
|
||||
:1002700003FE862805DD7E06FE86CCF71FDD460ED2
|
||||
:100280000405CA10132AEA2BCD57133E20CD701354
|
||||
:1002900011E42B3AAA2AB72820C5450EFDED610CC2
|
||||
:1002A0003AB32BE6021AED79C1280AE5D5ED5BF6E3
|
||||
:1002B0002B1977D1E1CD5C13132310D722EA2B3A07
|
||||
:1002C000EC2BB728113E0DCD7013DD360E0011E476
|
||||
:1002D0002BCD551118A73AAA2AB7C83AB32B1FD06D
|
||||
:1002E0003A682AE61FFE0B30053E20E718F2ED5B68
|
||||
:1002F0009F2ACD6F193AB32B1F3010CDED083ADB92
|
||||
:100300002BB720043E20E7E7CD3409DD2AF42BC9C2
|
||||
:100310002AED2BCD571318BECD93143ADE2BFE4099
|
||||
:10032000C8C32D193D4FFE2AD282130606AFB6234D
|
||||
:1003300010FC20ED79FE153807DD3609EDDD340EB1
|
||||
:1003400021761E097EDD770ADD340EC93E26E73EA2
|
||||
:100350000132B32B32AA2A7CCD5C137D4FE6F0CD5F
|
||||
:100360003714CD681379E60FC630FE3A3802C60757
|
||||
:10037000F53AAA2AB728063AB32B1F3802F1C9F179
|
||||
:10038000E7C9CD0517790600FE34D2D61321351EF4
|
||||
:100390000946DD360ACBDD700BDD360E0221E12B7E
|
||||
:1003A000FE313813CDD616FE08D24F16070707DDEB
|
||||
:1003B000B60BDD770B18087EB7C22D1921DE2BCDC9
|
||||
:1003C000E616DDB60BDD770B236E3AE42BB7C8DDFE
|
||||
:1003D000660B22E62BC9FE3CDD360E01D2631421EA
|
||||
:1003E000361E095E21DE2B7EFE0628503AE12BB731
|
||||
:1003F00028087EFE0E20C221E12B7EFE40281FCD64
|
||||
:10040000E616B323DD770A7EDD770BC9DD340E23D4
|
||||
:10041000233AAA2AB728057EB7C24F162BC9CD0C9E
|
||||
:10042000147BF64618DE1E01CDED16300B1C7EFE49
|
||||
:1004300008300CD604386107070707C979FE373042
|
||||
:100440005721E52BFE34280C3AE42BB7204A36ED31
|
||||
:1004500023DD340EE521E12BCD2E14213F1E09B6FC
|
||||
:10046000E177C9FE3E3034CD9014CD261457791D66
|
||||
:10047000280EFE3C28033E0B213E03B232E52BC979
|
||||
:10048000FE3C28033E05213E04B221DE2BC30314AB
|
||||
:1004900021DE2B3AE12BB7C8C32D19FE3FCA6115E7
|
||||
:1004A000D28B15060B21A11ECD7515202DFE033014
|
||||
:1004B0001A21DF2B3D280321E22BDD360E037E328D
|
||||
:1004C000E62B237E32E72BDD700AC9FE0821E52BDF
|
||||
:1004D000380636ED23DD340E70C921DE2BCDED1646
|
||||
:1004E00038330707075F21E12B7EFE402817CDE652
|
||||
:1004F00016B3FE3628A2F64032E52B3AE22BDDB6E3
|
||||
:100500000432E62BC97BF60632E52BCD0C147E2196
|
||||
:10051000DE2BC3C213DD360E0311E12B1AFE402879
|
||||
:100520003A0608FEC028117EFEC02809FE072003F7
|
||||
:100530001AFE06203AEB0600CD2E14F602B047E66E
|
||||
:1005400030FE20782809DD3609EDDD340EF6413223
|
||||
:10055000E52BEB235E2356EBC3D213CD2E143C18B0
|
||||
:10056000EE3ADE2BCDD81521C21E0603CD7515C27D
|
||||
:100570002D19C3C7143ADE2BBE2320063AE12BBE49
|
||||
:100580002805232310EFC9237846C921DE2B11E16A
|
||||
:100590002B012D19C5010100FE4128063043EB0156
|
||||
:1005A0000008CB7EC8CB76281323237EB7C02B7ED2
|
||||
:1005B00032E62B1AFE0EC03ED3B018157EFE89C05F
|
||||
:1005C000DD3609EDEBCDE616FE06C8070707F64057
|
||||
:1005D000B132E52BF1C34813FE05C03AE42BB7183E
|
||||
:1005E000674FFE44200B7EFE867920053EE9D11838
|
||||
:1005F00075FE4628633072D642075FCDBC167B304D
|
||||
:100600000A3C3DC83D3D2003CB68C0E5160021767D
|
||||
:100610001EED5A7EB032E52BE13E03DD770E7EFE05
|
||||
:1006200040C0F1235E2356ED53E62B79FE44D0DD26
|
||||
:10063000350E2AEA2B2323EBB7ED52DD750BDD36A1
|
||||
:100640000C00CB7D20012524C8ED5BAA2A1DC0ED3E
|
||||
:100650005B9F2A1313C35A06CDBC163435C03EC95E
|
||||
:10066000D130033EC0B0C37C14D64930374FCD18CB
|
||||
:100670001323237EB7C449162B0C201DDD340EDD59
|
||||
:100680003609ED7E47FE03D449163E560528073E3F
|
||||
:100690005E0528023E46C3EE157EE6C7C449167EB7
|
||||
:1006A000F6C718F207074F1AB7C07EFE07C8FE0349
|
||||
:1006B00020023E07CD2F14F6C1B118DA06007EFEE7
|
||||
:1006C0000920033E1477D6113FD0FE08D007070754
|
||||
:1006D0002323234737C9DD7E03D640DDB605200A34
|
||||
:1006E000DD7E04C91E01CDED16D0C32D197EB728BD
|
||||
:1006F000F9FE863E06C87EFE0F3FD8D608D8FE0615
|
||||
:1007000020013CB7C9CD171721E12B200A50CD1786
|
||||
:1007100017C078BAC818D306FE7EE63FFE06C805A5
|
||||
:100720003D200306DD3E3DC0DD70097EE6C0F606D5
|
||||
:1007300077AFC911EA2B0612AF1B1210FCD5DDE111
|
||||
:100740002323E52AEA2B22ED2BE1E57EFE21C45985
|
||||
:1007500017E13E0DBE23C818FBE5CD05182019E1B1
|
||||
:1007600022DA2B237EFE0D2806FE20C2631723CD3E
|
||||
:100770003C18CD0F182822F5F179E67FDD7705CDFD
|
||||
:100780001A18CD9C17DD21DB2BCD3C18CD6919FE45
|
||||
:100790002C2006CD9D17CD3C18C3EF172BCD681923
|
||||
:1007A000FE28200523DDCB06FE11B31FE5CD36194B
|
||||
:1007B0000CCBB9EBB7283ECD6819F1DD7E06B1DD73
|
||||
:1007C000770679FE03301BCD6919FE29281BFE2D03
|
||||
:1007D0002804FE2B201CCD6618E5EBCD42165DE10A
|
||||
:1007E000181ECD6919FE2920092F23DDAE06F0C39E
|
||||
:1007F0002D19AF18F6DDCB06F6E1CD6618DD7208CF
|
||||
:10080000DD730718DDE511B31FCD3619E120E011C6
|
||||
:10081000CA1ECD36190CEB23B7C9D602201ECD68EF
|
||||
:1008200019FE2220CA2322DF2B0E007EFE2223285F
|
||||
:1008300007FE0D28BA0C18F37932DE2BCD6919FEAC
|
||||
:10084000212805FE0DC0F1C9237EFE0D20FAF1C955
|
||||
:100850007ECD73011BD013FE41D8FE5F3FC9CDD7BB
|
||||
:1008600018ED4BEF2BC9EBEFDF2B00FE2DC4D71893
|
||||
:1008700022EF2BCD7B18DA4F1618F5DF2B05CD5E56
|
||||
:100880001809C9DF2D0DCDD718B7444D2AEF2BED30
|
||||
:1008900042B7C9DF3C0CCDD718452AEF2B2910FDF4
|
||||
:1008A000B7C9DF3E0FCDD718452AEF2BCB3CCB1D68
|
||||
:1008B00010FAB7C9DF230ACD5E187CA0677DA16F4F
|
||||
:1008C000C9FE29280CFE0D2808FE212804FE2C2034
|
||||
:1008D0005CF12AEF2BEBC9CD0501CD7301380A1B62
|
||||
:1008E000CD6F19CDD30CC30B13FE26201613CD6587
|
||||
:1008F00001DA4F161BEFCD6501D8CD371401F6187C
|
||||
:10090000C3F20DEBCD57183810CD0412201F3ADD7D
|
||||
:100910002BFE0628185059EBC9EBDF22091A136F7A
|
||||
:100920002600DF2208C9DF24042AEA2BC9ED5B9FD9
|
||||
:100930002A1313C38F07067F7E4EEB23B6F23B19B3
|
||||
:10094000047EE67FC8B920F3EBE5131AB7FA59190C
|
||||
:100950004F237EB928F4E118E023CD50182B38033B
|
||||
:100960001B18F348F1EBB7C923EBCD0501EBC9DD4B
|
||||
:1009700022F42BDD21AC2AC9ED73312C31312CF559
|
||||
:10098000C5D5E5DDE52A312C2323E55E2356D908BC
|
||||
:10099000F5C5D5E5FDE5D9D5CDED0211D81FCD378B
|
||||
:1009A0000911302C0602C506063E20E71A1B671AFD
|
||||
:1009B0001B6FCD571310F23E0DE7C110E92A972A9D
|
||||
:1009C0007CB53AB22BC4DE19CDF50CF1F1E1D1C101
|
||||
:1009D000F108D9F1F1E1D1C1F1ED7B312CC957CD4D
|
||||
:1009E0004C133E3AE706083E20E77ECD5C13231009
|
||||
:1009F000F6CDFF023E0DE71520E5C93E03F5CFD544
|
||||
:100A0000CDF2072012E1D5D5EBCD0500CDF20720C0
|
||||
:100A100006E3D7E3DA5903C35B06CF7CB7D520F7EB
|
||||
:100A2000B528F4444DEFE5ED5B362C2A382CEBD796
|
||||
:100A3000EBE1301409CB7C20DEE5EB732372EB1382
|
||||
:100A40001AFE0D20FA1318E3D1F7D52A362C2B23E2
|
||||
:100A5000ED5B382CD73031CDFF02444D23E5E12347
|
||||
:100A60007EFE0D28EAD1D5E51ABE20F2131AFE0D3E
|
||||
:100A700028032318F3F1D5C5C5D1CD3109E1D12320
|
||||
:100A8000237EFE0D20FA18C7D1131AFE0D20FAF7A7
|
||||
:100A9000CD6010CFE5CD05007DB7E1D5C4DE19D11D
|
||||
:100AA000F7F5043500AE561900F32276003DAA385A
|
||||
:100AB00001D60F4901D60FC900D60FC9016D1283A7
|
||||
:100AC0007B0000C0810000F00300809D860030B1F3
|
||||
:100AD00009137231004FF82D015C0BB67B85880835
|
||||
:100AE0007DA8AA2A7EA9AA2A7F0000000000008013
|
||||
:100AF000000000800058D73B7CEC6D84FDF6C12FD0
|
||||
:100B00007E1C319AFEB13DDA7EC67F11FF03BC4CDC
|
||||
:100B10007F7CAAAAFFDE2E650321B11AC3450ACD48
|
||||
:100B2000221B0605DD7EFBDD7700DD2310F6C9CD37
|
||||
:100B3000221BEFCDBC0A180B21ED1AE5CD221BE1DB
|
||||
:100B4000CD450AC3100B01F6FF1803010500DD09AE
|
||||
:100B5000C921F6FF180321F1FFD5DDE5D119010503
|
||||
:100B600000EDB0D5DDE1D1C9CD8107CD2F1BDA5A1B
|
||||
:100B700006CA5A06DD360F00CD381B380B21E91A9C
|
||||
:100B8000CDF31BDD340F18F021E91ACD3B1B300BE0
|
||||
:100B900021E91ACD1C1CDD350F18EDCD221B21A13A
|
||||
:100BA0001ACD7B1DCD511B21A11ACDD41CCDF70A26
|
||||
:100BB000CDC81CCD1F1BCDE60A21A51ACDF31B21E4
|
||||
:100BC000A91ACDD41CCD511BCD221BCDE60ACDE6F2
|
||||
:100BD0000A21AD1ACDD41CCDE60ADD6E0F2600CB5E
|
||||
:100BE0007D280125CDBC0ACD320B21E91ACD7B1D14
|
||||
:100BF00021D11ACD450AC3E60ACD8107DD7EFFDD8E
|
||||
:100C0000CBFFBEC9D5CD301CD1CD241CC3F70A0102
|
||||
:100C1000FC1BC5DF440BCD810721151BCD450A18F0
|
||||
:100C2000EBC38107CD0F1C21B51ACDD41CAF18041E
|
||||
:100C3000CD0F1C07DD771421B91AE5CD3B1BE13838
|
||||
:100C400014E5CD1C1CCD221BCD6D0ACDBC0ACD1EDA
|
||||
:100C50000BE1CDF31B21B11AE5CD3B1BE13806CDED
|
||||
:100C60007B1DDD341421B51ACD3B1B380FCD221B63
|
||||
:100C7000CD461BCD191BCD4B1BCD1E0B21BD1ACD57
|
||||
:100C80003B1BD8CD1F1B21BD1A0604C5E5CD561B45
|
||||
:100C9000CD561BCDE60ACD561BCDE60ADDE501ECAF
|
||||
:100CA000FFDD09210F00CD591BDDE1E123232323C3
|
||||
:100CB000E5CD1C1CCD320BE1C110D0DDCB0A46289E
|
||||
:100CC00004DDCBFFFECDC81CCD461BEFCDBC0ACD4D
|
||||
:100CD0004B1B1803CD450AC3320BDF2858CDB20A8F
|
||||
:100CE000CD6B1BDF2C4FCDB20ADF2949CDE60A18A8
|
||||
:100CF0002ACFE5CD0500C1ED69F74D44ED68180335
|
||||
:100D0000CD1D19C3BD0DCD8107CD2F1BC8CD6B1BCC
|
||||
:100D100021E91ACD450A18D4CD8107CDFC1B17F562
|
||||
:100D2000CD221BCD6D0AE5CDBC0ACD1E0BEF23CD28
|
||||
:100D3000BC0AE17CB7C25A06B5280BE521D51ACD0D
|
||||
:100D4000F31BE12D20F521D91AE5CD450AE1060670
|
||||
:100D5000C523232323E5CD561BCDE60AE1E5CDD4FB
|
||||
:100D60001CE1C110EBCDE60AF1D2C81CCD461B2117
|
||||
:100D7000ED1ACD450ACD4B1BC3F70ACD450AC31E5C
|
||||
:100D80000BCDF91B17F5CD2F1BCA9710CD381BF5CE
|
||||
:100D90003812CD221BCD461B21ED1ACD450ACD4B75
|
||||
:100DA0001BCDF70ACD1F1BCDE60AEFCDBC0A21F5FE
|
||||
:100DB0001A0608C5E5CDD41CCD511BCDE60AE123AA
|
||||
:100DC000232323C110ED21ED1ACDD41CCD561BCD0C
|
||||
:100DD000E60AF13812CD221BCD461B21B51ACD45AE
|
||||
:100DE0000ACD4B1BCD1E0BF13004DDCBFFFEC3C57E
|
||||
:100DF0001C4C5052494E54905C4C4C495354906694
|
||||
:100E00004F55549CF13C90A72F9A4A52454E9A1A3E
|
||||
:100E10004C44554D509A9044554D509A9344454CEE
|
||||
:100E200099FB901F5351529D064C4E9B6841425373
|
||||
:100E30009BF953494E9C30434F539C2454479C0488
|
||||
:100E400041524354479D8150499B194558509D1824
|
||||
:100E5000504F579CDA494E50DCFA229D00905900C1
|
||||
:100E600010081820283840C0800080889890A0B0D2
|
||||
:100E7000A8B800094A4210001820C3C2CDC4002FF0
|
||||
:100E80003F3776F3FBD907170F1F27B0A0B8A8B1DB
|
||||
:100E9000A1B9A9B2A2BAAAB3A3BBAB444D456F672F
|
||||
:100EA000000E0F570F0E470E105F100E4F0E840AE4
|
||||
:100EB0000E851A840E02850E120706F90EC03AC07E
|
||||
:100EC0000E328706E30303080506EBD24547D445F7
|
||||
:100ED0005854D74F5244C2595445CF5054CF52471B
|
||||
:100EE000C55155BECE4F50C3504CC34346D3434665
|
||||
:100EF000C8414C54C449C549C55858D24C4341D245
|
||||
:100F00004C41D2524341D25241C44141CC44495256
|
||||
:100F1000CC4449CC444452CC4444C3504952C350BD
|
||||
:100F200049C3504452C35044C94E4952C94E49C99D
|
||||
:100F30004E4452C94E44CF544952CF555449CF54D0
|
||||
:100F40004452CF555444CE4547D2455449D24554D6
|
||||
:100F50004ED24C44D25244D24C43D24CD25243D2C1
|
||||
:100F600052D34C41D35241D3524CC24954D345542D
|
||||
:100F7000D24553C14444C14443D34243D35542C1F3
|
||||
:100F80004E44CF52D84F52C350C94E43C44543CCB0
|
||||
:100F900044C558C94ECF5554C44A4E5ACA52CA5075
|
||||
:100FA000C3414C4CD24554D25354C94DD04F50D06C
|
||||
:100FB00055534880C958C959C146C243C445C84C55
|
||||
:100FC000D350C2C3C4C5C8CCC1C9D2CE5ADACE43ED
|
||||
:100FD000C3D04FD045D0CD80202041462020204294
|
||||
:100FE000432020204445202020484C2020495849B7
|
||||
:100FF0005920535028290D3ADD2BFE45C834C90528
|
||||
:00000001FF
|
||||
257
Computer_MiST/Galaksija_MiST/rtl/roms/galplus.hex
Normal file
@@ -0,0 +1,257 @@
|
||||
:1000000011A92B213EE0010600EDB02A6A2A112039
|
||||
:10001000007DE6E06F3E0C32A82BED52226A2A11D9
|
||||
:10002000D8E7CD3709FD2196E4061736002310FBEB
|
||||
:100030001198E5722B732B2B2B2B2B36BFC9C3F8D2
|
||||
:10004000E7C395E124F1D5CD57E03EFF32A82B3E22
|
||||
:100050000CE776ED5ED1F7CDCCE42323237E3CC8BC
|
||||
:100060002A6A2A11001AED52ED5B382CD7DA5401B6
|
||||
:10007000226A2ACD29E0232336FF110D0019E57DE0
|
||||
:10008000CB7F1E022002CBFBD6056F3EDB060F0E98
|
||||
:1000900001BD2808D620CB00CB0118F5E67FE1543E
|
||||
:1000A0002B722B772B732B36D02B702B71C9F1CF82
|
||||
:1000B0007DD3BECD05007DD3BFF7F13E0C32A82B1A
|
||||
:1000C000ED56F7AF3C06AFC1F5CD6AE4F1F5C5CD0D
|
||||
:1000D00048E1F1D1F7AF3C06AFC1F5CD6AE4CDE719
|
||||
:1000E000E0DD21AC2A18EB2A6A2A111400195E23DC
|
||||
:1000F00056EB78941601300416FF7C90471802FBEB
|
||||
:10010000E379951E0130041EFF7D914FDDE19030B3
|
||||
:100110000DF137F57A535F7C656F78414F90C504D8
|
||||
:100120000CD9D11C1DD9DDE5C8DDE1903006810870
|
||||
:100130007C826708087D836FF1F5E530037C656F8D
|
||||
:10014000E3D9CD48E10818DCE1E3E5218AE12803A1
|
||||
:100150002187E1E37CFED038033ECF67E52FD63020
|
||||
:10016000677DE6070603CB3CCB1D10FAE3E5606F25
|
||||
:10017000018DE1097E2A6A2A01140009C1712370E8
|
||||
:10018000C109010B0009C92FB606A677C9FEFDFB00
|
||||
:10019000F7EFDFBF7FCDBBE4E1C1D1E17DFEA5205C
|
||||
:1001A00004D9C36600FEC1CA6AE2E5C5CDCCE4232A
|
||||
:1001B00023FEB12820FE0D281C78FE203838FEDFF3
|
||||
:1001C000300CFEDB38084604280CE63F1868FE2297
|
||||
:1001D00020047E2F77782A682A77E5CD84E4CD063F
|
||||
:1001E000E504CDCAE47EB838014770E123CDFCE4D4
|
||||
:1001F000F1CD6F10D9C9FE0D2005CDE5E418F1FE53
|
||||
:100200000C202B210AE2E5CD1A0A2A6A2A061036AA
|
||||
:10021000002310FB232336003AA82B3C20D2110EDA
|
||||
:10022000001901001A545D1336FFEDB018C24604E0
|
||||
:100230002004F6C018A0FE1B38B6200311E0FFFE14
|
||||
:100240001C2003112000FE1D200311FFFFFE1E20B5
|
||||
:10025000031101002A682A197CFE2A38022628FE8A
|
||||
:10026000283002262922682A1886D9CDCCE4CB3B37
|
||||
:1002700019ED5B682A732372CDCCE43601CDF50C01
|
||||
:10028000CDBBE42A682AF5CD84E4F1B7280CFE0D35
|
||||
:10029000CA17E3FE5F283AE718DEE5E5CDCAE47E3B
|
||||
:1002A0009028023004E1E118CFB7280E47E3237EFF
|
||||
:1002B000E710FBE3CB6E237E20EF2BE3CD84E4AF8E
|
||||
:1002C000B82002062005E13E20E770E122682A18E6
|
||||
:1002D000A7E5CDCAE4AF863007E1CDF6E4C354010B
|
||||
:1002E000CB6E2320F19028023003E1188B2B34E1F0
|
||||
:1002F00016005F194711FF29D7380CC5E5CD88E3F3
|
||||
:10030000E1112000ED52C122682A2B7EE710F8226D
|
||||
:10031000682A3E20E718B5CDCAE4AFB928080D2BEE
|
||||
:10032000CB6E20F70C23E52100282807112000417F
|
||||
:100330001910FDE3C1C5C506004EE309E323CB69EF
|
||||
:1003400020F7CDCCE42323342801351E06195E2383
|
||||
:1003500056C1E1D73007E56069D7E13001EB60694C
|
||||
:10036000A7ED52D5117D00D7380AED43682ACDE5B7
|
||||
:10037000E4C35401444DE111B62B03EDB01B3E0D17
|
||||
:100380001213D5CDF6E4D1C9ED5B6C2A21E0017BD7
|
||||
:10039000E61F1320FA1BED5228453843444DCBDAB3
|
||||
:1003A000CBEAE5D521200019EDB0E1CD84E4CDCA3A
|
||||
:1003B000E47923462B70233CFE0F38F63AA82B3CF9
|
||||
:1003C000201CCDCCE419E5CD8DE5C109E519D1E3BB
|
||||
:1003D000D5CD84E4CD8DE5D1444DE1EDB03EE121B4
|
||||
:1003E000E029E5CD84E4CDD5E4CDCCE42B771E091E
|
||||
:1003F000197ED6207730022335E1C9F5C5D5E5D978
|
||||
:10040000C5D5E5017F202A6A2A111A001956235EF4
|
||||
:1004100023E5662E3ED9E1DDE5DD2132E4235623D6
|
||||
:100420003E09CB3F3800CB3F47380010FC46234EF7
|
||||
:100430002EBC78227F20CA60E4ED4F79ED47ED5362
|
||||
:100440007E2078D980A1D9470000AFD9CB0A17D92F
|
||||
:10045000814F00AFD9CB0B1FB5D957D925D9DDE9CD
|
||||
:10046000DDE1D9E1D1C1D9C3C000CFE5CD0500455B
|
||||
:10047000E14DE1F1D5F5E5CDCCE42323237E3CE14C
|
||||
:10048000C2D2E0E93E1FA547CB0C7D1F1F1F1F1FD7
|
||||
:10049000E60F4FCB04C93EE0ED47CDCCE47EFE0134
|
||||
:1004A000380435CCA9E4C3FD0036142346ED5B685F
|
||||
:1004B0002A1A77EB70CD84E4C306E5F5CDCCE4369B
|
||||
:1004C00000233EBFBEC4ACE4F1C959211E10160082
|
||||
:1004D0002A6A2A19C93E2077E5CD06E504E1237D85
|
||||
:1004E000E61F20F1C92A682ACD84E4E5CDCAE4706C
|
||||
:1004F000E1CDD5E41806237DE61F20FA7CFE2AD440
|
||||
:1005000088E322682AC93AA82B3CC0C5E5CD8DE511
|
||||
:10051000484709E37EE1012000ED5B6A2A1909FEE4
|
||||
:100520005B3835FE5C3821281FFE5E381EFE5F38C2
|
||||
:1005300014FEBF20043E5B181FFEDB384EFEDF308A
|
||||
:100540004AD67F18133E53113E43113E5A36D720E8
|
||||
:100550000236DF0936EF180536FF0936FF09D620C7
|
||||
:100560003829E51E09EF67553E08293001193D205D
|
||||
:10057000F9E52A6A2A111600195E2356E119EBE102
|
||||
:100580003E09081A771309083D20F7C1C911A001D7
|
||||
:10059000EF793C3DC81918FBFFFFFFFFFFFFFFFF8E
|
||||
:1005A000FFEFEFEFEFEFEFEFFFEF9393B7DBFFFF1F
|
||||
:1005B000FFFFFFD7D701D7D7D701D7D7EF83EDED0F
|
||||
:1005C000836F6F83EFFFB3B3DFEFF79B9BFFE3DD39
|
||||
:1005D000EBF7EB5DBD5D63FEFCFAF6EFF6FAFCFEB1
|
||||
:1005E000DFEFF7F7F7F7F7EFDFF7EFDFDFDFDFDF5B
|
||||
:1005F000EFF7FFEFABC701C7ABEFFFFFEFEFEF0187
|
||||
:10060000EFEFEFFFFFFFFFFFFFE7E7EFF7FFFFFF72
|
||||
:10061000FF01FFFFFFFFFFFFFFFFFFFFFFE7E77F98
|
||||
:100620007FBFDFEFF7FBFDFDC7BB3D5D6D7579BBA0
|
||||
:10063000C7EFE7EFEFEFEFEFEFC7C7BB7D7FBFC7B8
|
||||
:10064000FBFD01C7BBBFCFBF7F7DBBC7BFDFEFF7E0
|
||||
:10065000BBBD01BFBF01FDC5B97D7F7DBBC7C7BBAA
|
||||
:10066000FDC5B97D7DBBC7017DBFDFEFEFF7F7F7B4
|
||||
:10067000C7BBBBC7BB7D7DBBC7C7BB7D7D3B477FC2
|
||||
:10068000BFC3FFE7E7FFFFFFE7E7FFFFE7E7FFFF86
|
||||
:10069000E7E7EFF7BFDFEFF7FBF7EFDFBFFFFFFFA6
|
||||
:1006A00001FF01FFFFFFFBF7EFDFBFDFEFF7FBC746
|
||||
:1006B000BB7DBFDFEFEFFFEFDFEFF703FF03F7EFE8
|
||||
:1006C000DFC7BB7D7D7D017D7D7DC1BD7DBDC1BDA4
|
||||
:1006D0007D7D81C7BB7DFDFDFD7DBBC7C1BD7D7D32
|
||||
:1006E0007D7D7DBDC101FDFDFDC1FDFDFD0101FD66
|
||||
:1006F000FDFDC1FDFDFDFD877BFDFD0D7D7D7B8746
|
||||
:100700007D7D7D7D017D7D7D7DC7EFEFEFEFEFEF9F
|
||||
:10071000EFC7017F7F7F7F7F7DBBC7BDDDEDF5F933
|
||||
:10072000F5EDDDBDFDFDFDFDFDFDFDFD017D395559
|
||||
:100730006D7D7D7D7D7D7D7D79756D5D3D7D7DC72B
|
||||
:10074000BB7D7D7D7D7DBBC7817D7D7D81FDFDFD8B
|
||||
:10075000FDC7BB7D7D7D7D5DBB47817D7D7D81ED61
|
||||
:10076000DDBD7DC3BDFDC3BF7F7DBBC701EFEFEF27
|
||||
:10077000EFEFEFEFEF7D7D7D7D7D7D7DBBC77D7DE7
|
||||
:100780007DBBBBBBD7D7EF7D7D7D6D6D6D6D55BBE3
|
||||
:100790007D7DBBD7EFD7BB7D7D7D7D7D3B477F7F5B
|
||||
:1007A000BBC7017FBFDFEFF7FBFD010101010101C5
|
||||
:1007B0000101010100001028441010000000001089
|
||||
:1007C0001044281000000000100864081000000009
|
||||
:1007D0000010204C201000000C0C20202020202A8B
|
||||
:1007E0002A2A2047414C414B53494A4120504C55FD
|
||||
:1007F00053202A2A2ADCDC00E3D5115B07D7D12855
|
||||
:10080000147CFE20380BFE283007E6070707F6E0C9
|
||||
:1008100067E3C30F10E3211BE8C39A034452415717
|
||||
:10082000A0D8554E44524157A0D5504C4F54A0C665
|
||||
:10083000554E504C4F54A0C34752415048A04554C8
|
||||
:10084000455854A0BA534F554E44A0AE515341564B
|
||||
:1008500045A318514C4F4144A31B56455249465994
|
||||
:10086000A31E46415354A2BC534C4F57A2BF4C4900
|
||||
:100870004E45A2C54B494C4CA2D944455354524F06
|
||||
:1008800059A2F8434C454152A2DB484C4F4144A386
|
||||
:10089000214844554D50A324484C44554D50A3275E
|
||||
:1008A0004155544FA32A5550A330444F574EA333BC
|
||||
:1008B00046494C4CA32D5232A336900FF1F3F7F179
|
||||
:1008C000FBF7C35A06F1CF7DFED130F6FE2138F298
|
||||
:1008D0002A6A2A011C000977F7182EF1D5DDE506F2
|
||||
:1008E0001ADD21022A110400DD360140DDCB00BEF5
|
||||
:1008F000DD1910F4DDE1D1F7F1CFE5CD0500EBE333
|
||||
:10090000EBAF1213D730FAD1F73A3020CB4728F9A2
|
||||
:100910001129E9CD3709213720CB4628052D20F9AB
|
||||
:1009200018F47DFE19C26600C753555245203F0D8D
|
||||
:10093000F1CD39EADF2209ED53002B061513100320
|
||||
:10094000C38F07DF220020F5CD9CEA28352162EA1B
|
||||
:10095000D5CD6AEA28442166EAD1CD6AEA20E1EFE2
|
||||
:1009600022022BCFE5CD0500E5DF2C02CF3EEFEDD7
|
||||
:1009700053042B444DE122082B09EBE122062B09FD
|
||||
:100980001824EF22022B21362CED53042BED5B387B
|
||||
:100990002C22062BED53082B180CF1CF22022BDF53
|
||||
:1009A0002C0218BF18E0F30664AFCD680E10FA3EB3
|
||||
:1009B000A5CD680E3EFFCD680ECD630EEBCD630E68
|
||||
:1009C0002A022BCD630EED5B002B1AFE22200218AB
|
||||
:1009D00006CD680E1318F33EFFCD680E782FCD6854
|
||||
:1009E0000E060F2100802BCB7C28FB10F6AFCDE547
|
||||
:1009F000EB10FA3EA5CDE5EBAFCDE5EB2A062BEDEE
|
||||
:100A00005B082B137E23CDE5EB38F9782FCDE5EB92
|
||||
:100A1000ED5B042BFBCD52EAF75345415243484965
|
||||
:100A20004E470D3A00200FD018F9464F554E44203E
|
||||
:100A3000004C4F4144494E470DAFD300D3013E0710
|
||||
:100A4000D3003EFED3013E08D3003E0FD301AFD307
|
||||
:100A500000C93E08D300AFD3013E07D3003EFFD309
|
||||
:100A600001C94C494E45434F44450604CD05011A82
|
||||
:100A7000BE2313C010F9C9F1ED53002BCD39EA3C68
|
||||
:100A8000F5FB3EFFF5DF221BEBBEEB281EF1D5AFD9
|
||||
:100A9000F50615131000DF22101B180F1AFE0DC8E3
|
||||
:100AA000FE3AC9CD9CEAEF280A18E813EFCD9CEA7C
|
||||
:100AB0002801CFED53042BE51119EACD3709CD23D9
|
||||
:100AC000EAF30614C5CDDD0E79C1B720F510F5CDDA
|
||||
:100AD000DD0E79FEA520F847CDDD0E793C2076CDE0
|
||||
:100AE000D90E61EBCDD90E6178C109EB0947220619
|
||||
:100AF0002BED53082BCDD90E6122022B112AEAC50A
|
||||
:100B0000CD3709C12A682ACDDD0E790C2803E718F4
|
||||
:100B1000F6CDDD0E3E0DE704C28F077CFE282808C7
|
||||
:100B20007DFEE62003D6206F3E25BE2017E5F63079
|
||||
:100B3000ED73342C31AE2B33EF67E5ED7B342CE1D4
|
||||
:100B40003E207723F13C281AD11AFE222814BE2316
|
||||
:100B50001328F61806F1F13C2801F1ED5B002BC3D8
|
||||
:100B600081EAF1F528061131EACD3709FB060521A6
|
||||
:100B700000802BCB7C28FB10F6CD23EAF3ED5B063F
|
||||
:100B80002B2A082B0614C5CD3CEC79C1B720F510F3
|
||||
:100B9000F5CD3CEC79FEA520F847CD3CEC79B720AB
|
||||
:100BA0002BEBCD3CEC0879BE2805F1281FF571230D
|
||||
:100BB000EB0838EDCD3CECF1042011FBCD52EAED11
|
||||
:100BC0005B042B2A022B7CB5C20E04F7C38F07F1FE
|
||||
:100BD000ED53002BCD39EAAFF5DF2206D5AFF5C3D3
|
||||
:100BE00091EAC38F07D92138200E080F36FC061E64
|
||||
:100BF0003802066410FE36B8061E3802066410FE7F
|
||||
:100C000036BC0D20E6060010FED980473E7ACB4068
|
||||
:100C100028023EB7D301D7C9C330E9C377EAC3CFAF
|
||||
:100C2000EBC3F4EEC3C0EEC3BDEEC3F4ECC302EEFF
|
||||
:100C3000C393EFC3C8EFCDB5ECC36600D921002044
|
||||
:100C40000655CB46280610FAD97918BE3EE43CCBAF
|
||||
:100C50004628FB17D9CB19D918E6BC20022600BDBF
|
||||
:100C600020022E001D200B1806D92AA52A0E0E11CF
|
||||
:100C700034201A0F7B38E3FE3220090D20DC3AB411
|
||||
:100C80002BC3540DBC28DDBD28DA0600D71A0F3857
|
||||
:100C9000C910F97CB720036318057DB720D46B22F7
|
||||
:100CA000A52AEF7BFE3420043E0218D5FE31C2395E
|
||||
:100CB0000D3E0118CC3E0CE7ED56D9CD2310D9C915
|
||||
:100CC00069C5782FD630677DE6070603CB3CCB1D80
|
||||
:100CD00010FAE5606F018DE1097E2A6A2A01200081
|
||||
:100CE00009C109C1C9E5CDC0ECA677E1C9E5CDC010
|
||||
:100CF000ECA6E1C9F1CF22342CCB7CC28F07CD0505
|
||||
:100D00000022322CCB7C20F3CDB5EC2A342C22B639
|
||||
:100D10002BCDF207CAAFEDCDF30811B82BCDE6ED20
|
||||
:100D2000E7D9365FD912137AFE2C20F17BFE3120F1
|
||||
:100D3000ECCDE6ED18FB7AFE2B20057BFEB828DD16
|
||||
:100D40001B3E1DE7D9365FD918D312E713424B116A
|
||||
:100D5000B62B2A342CC5D57993F5CDF207D52010C2
|
||||
:100D6000D5CD1108C12A382CCD4409606922382C10
|
||||
:100D7000C12A382CF1E5FE0328185F160019ED5B37
|
||||
:100D80006A2AD7D2530122382CD1CD4C09D1E1CDDA
|
||||
:100D900044092A342CED5B322C19CB7CC25301223E
|
||||
:100DA000342CC30BED5741524E494E4720210DD5EF
|
||||
:100DB000CD39EA3EC8D30111A5EDCD3709D1CD31EA
|
||||
:100DC00009060010FECD52EACD69ECFE01CA7FEFA4
|
||||
:100DD000FE0228F4FE0D28BA2A342CF5CDF308F1D2
|
||||
:100DE00011B82BC320EDE1CD69ECFE01CA7FEFFE07
|
||||
:100DF0000228F4FE0DCA4AEDFE1DCA36EDFE20386B
|
||||
:100E0000E6E9F1CF4DC5CD05003AA82B3CC128013C
|
||||
:100E1000F745D5ED73322C2A6A2AED5B992ACB7CF3
|
||||
:100E20002803191803AFED522B3ECF90DA5A06F97A
|
||||
:100E3000D92A382CD9215CEEE526FF3BE5CD74EEAE
|
||||
:100E4000C13BD1CD67EE04C878D6D0DC74EE05285E
|
||||
:100E50000505CD74EE040C1520EC18E4ED7B322C66
|
||||
:100E6000D1F73A33200FD83A31200F38F5ED7B32E5
|
||||
:100E70002CC305032600CDADEED05979A728070D68
|
||||
:100E8000CDADEE38F60C694B0C2805CDADEE38F83B
|
||||
:100E90004DD9ED73342CED5B342C1B1B1BD7300666
|
||||
:100EA000D9E333C54BE9ED7B322CC35301E5D5CDF6
|
||||
:100EB000C0ECA6BE280177D1E1C82437C9CD6010A7
|
||||
:100EC000F1CFE5CD0500EBE37C85E5060886231030
|
||||
:100ED000FCE1F5CD4F1306083E20E77ECD5C1323E1
|
||||
:100EE00010F63E20E7F1CD5C13CDFF023E0DE7D7B3
|
||||
:100EF00038D6D1F7F1CFCDB5ECE5E5E1CD4F13E52F
|
||||
:100F00003E2011B62B1213E7D9365FD9CD69ECFE1E
|
||||
:100F100001286CFE0228F5FE1D2813FE0D2819FE7F
|
||||
:100F20002038E9087BFED128E308121318D97BFE8C
|
||||
:100F3000B728D91B3E1D18CF12E711B62BCD0501DE
|
||||
:100F4000FE0D280ACDEE187DE17723E518EFE1E1EB
|
||||
:100F5000E506087C85862310FCBE281FE1E5E51127
|
||||
:100F600075EFCD3709CD39EA3EAAD301060010FE50
|
||||
:100F7000CD52EA18864552524F520DF1C3F9EEF3A5
|
||||
:100F8000CD00E02A6A2A11200019226A2A3E0CE7C5
|
||||
:100F9000C36600F1CFD5E5CB7C202AED5B382CD59C
|
||||
:100FA00019ED5B6A2AD7D25301E3E5ED5B362CCD10
|
||||
:100FB000EFEFEDB8D12A382C1922382C2A362C190B
|
||||
:100FC00022362CD1F7C35A06F1CFD5CB7C20F6EBD5
|
||||
:100FD000EFAFED52E5ED5B362CD519113A2CD7DA8F
|
||||
:100FE0005301D1E5D52A382CCDEFEFEDB018C5D798
|
||||
:100FF000CA8F07AFED52444D03F1E1D1F5C9472B3C
|
||||
:00000001FF
|
||||
183
Computer_MiST/Galaksija_MiST/rtl/scandoubler.v
Normal file
@@ -0,0 +1,183 @@
|
||||
//
|
||||
// scandoubler.v
|
||||
//
|
||||
// Copyright (c) 2015 Till Harbaum <till@harbaum.org>
|
||||
// Copyright (c) 2017 Sorgelig
|
||||
//
|
||||
// This source file is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published
|
||||
// by the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This source file is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// TODO: Delay vsync one line
|
||||
|
||||
module scandoubler #(parameter LENGTH, parameter HALF_DEPTH)
|
||||
(
|
||||
// system interface
|
||||
input clk_sys,
|
||||
input ce_pix,
|
||||
input ce_pix_actual,
|
||||
|
||||
input hq2x,
|
||||
|
||||
// shifter video interface
|
||||
input hs_in,
|
||||
input vs_in,
|
||||
input line_start,
|
||||
|
||||
input [DWIDTH:0] r_in,
|
||||
input [DWIDTH:0] g_in,
|
||||
input [DWIDTH:0] b_in,
|
||||
input mono,
|
||||
|
||||
// output interface
|
||||
output reg hs_out,
|
||||
output vs_out,
|
||||
output [DWIDTH:0] r_out,
|
||||
output [DWIDTH:0] g_out,
|
||||
output [DWIDTH:0] b_out
|
||||
);
|
||||
|
||||
|
||||
localparam DWIDTH = HALF_DEPTH ? 2 : 5;
|
||||
|
||||
assign vs_out = vs_in;
|
||||
|
||||
reg [2:0] phase;
|
||||
reg [2:0] ce_div;
|
||||
reg [7:0] pix_len = 0;
|
||||
wire [7:0] pl = pix_len + 1'b1;
|
||||
|
||||
reg ce_x1, ce_x4;
|
||||
reg req_line_reset;
|
||||
wire ls_in = hs_in | line_start;
|
||||
always @(negedge clk_sys) begin
|
||||
reg old_ce;
|
||||
reg [2:0] ce_cnt;
|
||||
|
||||
reg [7:0] pixsz2, pixsz4 = 0;
|
||||
|
||||
old_ce <= ce_pix;
|
||||
if(~&pix_len) pix_len <= pix_len + 1'd1;
|
||||
|
||||
ce_x4 <= 0;
|
||||
ce_x1 <= 0;
|
||||
|
||||
// use such odd comparison to place c_x4 evenly if master clock isn't multiple 4.
|
||||
if((pl == pixsz4) || (pl == pixsz2) || (pl == (pixsz2+pixsz4))) begin
|
||||
phase <= phase + 1'd1;
|
||||
ce_x4 <= 1;
|
||||
end
|
||||
|
||||
if(~old_ce & ce_pix) begin
|
||||
pixsz2 <= {1'b0, pl[7:1]};
|
||||
pixsz4 <= {2'b00, pl[7:2]};
|
||||
ce_x1 <= 1;
|
||||
ce_x4 <= 1;
|
||||
pix_len <= 0;
|
||||
phase <= phase + 1'd1;
|
||||
|
||||
ce_cnt <= ce_cnt + 1'd1;
|
||||
if(ce_pix_actual) begin
|
||||
phase <= 0;
|
||||
ce_div <= ce_cnt + 1'd1;
|
||||
ce_cnt <= 0;
|
||||
req_line_reset <= 0;
|
||||
end
|
||||
|
||||
if(ls_in) req_line_reset <= 1;
|
||||
end
|
||||
end
|
||||
|
||||
reg ce_sd;
|
||||
always @(*) begin
|
||||
case(ce_div)
|
||||
2: ce_sd = !phase[0];
|
||||
4: ce_sd = !phase[1:0];
|
||||
default: ce_sd <= 1;
|
||||
endcase
|
||||
end
|
||||
|
||||
localparam AWIDTH = `BITS_TO_FIT(LENGTH);
|
||||
Hq2x #(.LENGTH(LENGTH), .HALF_DEPTH(HALF_DEPTH)) Hq2x
|
||||
(
|
||||
.clk(clk_sys),
|
||||
.ce_x4(ce_x4 & ce_sd),
|
||||
.inputpixel({b_in,g_in,r_in}),
|
||||
.mono(mono),
|
||||
.disable_hq2x(~hq2x),
|
||||
.reset_frame(vs_in),
|
||||
.reset_line(req_line_reset),
|
||||
.read_y(sd_line),
|
||||
.read_x(sd_h_actual),
|
||||
.outpixel({b_out,g_out,r_out})
|
||||
);
|
||||
|
||||
reg [10:0] sd_h_actual;
|
||||
always @(*) begin
|
||||
case(ce_div)
|
||||
2: sd_h_actual = sd_h[10:1];
|
||||
4: sd_h_actual = sd_h[10:2];
|
||||
default: sd_h_actual = sd_h;
|
||||
endcase
|
||||
end
|
||||
|
||||
reg [10:0] sd_h;
|
||||
reg [1:0] sd_line;
|
||||
always @(posedge clk_sys) begin
|
||||
|
||||
reg [11:0] hs_max,hs_rise,hs_ls;
|
||||
reg [10:0] hcnt;
|
||||
reg [11:0] sd_hcnt;
|
||||
|
||||
reg hs, hs2, vs, ls;
|
||||
|
||||
if(ce_x1) begin
|
||||
hs <= hs_in;
|
||||
ls <= ls_in;
|
||||
|
||||
if(ls && !ls_in) hs_ls <= {hcnt,1'b1};
|
||||
|
||||
// falling edge of hsync indicates start of line
|
||||
if(hs && !hs_in) begin
|
||||
hs_max <= {hcnt,1'b1};
|
||||
hcnt <= 0;
|
||||
if(ls && !ls_in) hs_ls <= {10'd0,1'b1};
|
||||
end else begin
|
||||
hcnt <= hcnt + 1'd1;
|
||||
end
|
||||
|
||||
// save position of rising edge
|
||||
if(!hs && hs_in) hs_rise <= {hcnt,1'b1};
|
||||
|
||||
vs <= vs_in;
|
||||
if(vs && ~vs_in) sd_line <= 0;
|
||||
end
|
||||
|
||||
if(ce_x4) begin
|
||||
hs2 <= hs_in;
|
||||
|
||||
// output counter synchronous to input and at twice the rate
|
||||
sd_hcnt <= sd_hcnt + 1'd1;
|
||||
sd_h <= sd_h + 1'd1;
|
||||
if(hs2 && !hs_in) sd_hcnt <= hs_max;
|
||||
if(sd_hcnt == hs_max) sd_hcnt <= 0;
|
||||
|
||||
// replicate horizontal sync at twice the speed
|
||||
if(sd_hcnt == hs_max) hs_out <= 0;
|
||||
if(sd_hcnt == hs_rise) hs_out <= 1;
|
||||
|
||||
if(sd_hcnt == hs_ls) sd_h <= 0;
|
||||
if(sd_hcnt == hs_ls) sd_line <= sd_line + 1'd1;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
90
Computer_MiST/Galaksija_MiST/rtl/spram.vhd
Normal file
@@ -0,0 +1,90 @@
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
LIBRARY altera_mf;
|
||||
USE altera_mf.all;
|
||||
|
||||
ENTITY spram IS
|
||||
GENERIC
|
||||
(
|
||||
init_file : string := "";
|
||||
widthad_a : natural;
|
||||
width_a : natural := 8;
|
||||
outdata_reg_a : string := "UNREGISTERED"
|
||||
);
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (widthad_a-1 DOWNTO 0);
|
||||
clock : IN STD_LOGIC ;
|
||||
data : IN STD_LOGIC_VECTOR (width_a-1 DOWNTO 0);
|
||||
wren : IN STD_LOGIC ;
|
||||
q : OUT STD_LOGIC_VECTOR (width_a-1 DOWNTO 0)
|
||||
);
|
||||
END spram;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF spram IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (width_a-1 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT altsyncram
|
||||
GENERIC (
|
||||
clock_enable_input_a : STRING;
|
||||
clock_enable_output_a : STRING;
|
||||
init_file : STRING;
|
||||
intended_device_family : STRING;
|
||||
lpm_hint : STRING;
|
||||
lpm_type : STRING;
|
||||
numwords_a : NATURAL;
|
||||
operation_mode : STRING;
|
||||
outdata_aclr_a : STRING;
|
||||
outdata_reg_a : STRING;
|
||||
power_up_uninitialized : STRING;
|
||||
read_during_write_mode_port_a : STRING;
|
||||
widthad_a : NATURAL;
|
||||
width_a : NATURAL;
|
||||
width_byteena_a : NATURAL
|
||||
);
|
||||
PORT (
|
||||
wren_a : IN STD_LOGIC ;
|
||||
clock0 : IN STD_LOGIC ;
|
||||
address_a : IN STD_LOGIC_VECTOR (widthad_a-1 DOWNTO 0);
|
||||
q_a : OUT STD_LOGIC_VECTOR (width_a-1 DOWNTO 0);
|
||||
data_a : IN STD_LOGIC_VECTOR (width_a-1 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
q <= sub_wire0(width_a-1 DOWNTO 0);
|
||||
|
||||
altsyncram_component : altsyncram
|
||||
GENERIC MAP (
|
||||
clock_enable_input_a => "BYPASS",
|
||||
clock_enable_output_a => "BYPASS",
|
||||
init_file => init_file,
|
||||
intended_device_family => "Cyclone III",
|
||||
lpm_hint => "ENABLE_RUNTIME_MOD=NO",
|
||||
lpm_type => "altsyncram",
|
||||
numwords_a => 2**widthad_a,
|
||||
operation_mode => "SINGLE_PORT",
|
||||
outdata_aclr_a => "NONE",
|
||||
outdata_reg_a => outdata_reg_a,
|
||||
power_up_uninitialized => "FALSE",
|
||||
read_during_write_mode_port_a => "NEW_DATA_NO_NBE_READ",
|
||||
widthad_a => widthad_a,
|
||||
width_a => width_a,
|
||||
width_byteena_a => 1
|
||||
)
|
||||
PORT MAP (
|
||||
wren_a => wren,
|
||||
clock0 => clock,
|
||||
address_a => address,
|
||||
data_a => data,
|
||||
q_a => sub_wire0
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
82
Computer_MiST/Galaksija_MiST/rtl/sprom.vhd
Normal file
@@ -0,0 +1,82 @@
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
LIBRARY altera_mf;
|
||||
USE altera_mf.all;
|
||||
|
||||
ENTITY sprom IS
|
||||
GENERIC
|
||||
(
|
||||
init_file : string := "";
|
||||
widthad_a : natural;
|
||||
width_a : natural := 8;
|
||||
outdata_reg_a : string := "UNREGISTERED"
|
||||
);
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (widthad_a-1 DOWNTO 0);
|
||||
clock : IN STD_LOGIC ;
|
||||
q : OUT STD_LOGIC_VECTOR (width_a-1 DOWNTO 0)
|
||||
);
|
||||
END sprom;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF sprom IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (width_a-1 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT altsyncram
|
||||
GENERIC (
|
||||
address_aclr_a : STRING;
|
||||
clock_enable_input_a : STRING;
|
||||
clock_enable_output_a : STRING;
|
||||
init_file : STRING;
|
||||
intended_device_family : STRING;
|
||||
lpm_hint : STRING;
|
||||
lpm_type : STRING;
|
||||
numwords_a : NATURAL;
|
||||
operation_mode : STRING;
|
||||
outdata_aclr_a : STRING;
|
||||
outdata_reg_a : STRING;
|
||||
widthad_a : NATURAL;
|
||||
width_a : NATURAL;
|
||||
width_byteena_a : NATURAL
|
||||
);
|
||||
PORT (
|
||||
clock0 : IN STD_LOGIC ;
|
||||
address_a : IN STD_LOGIC_VECTOR (widthad_a-1 DOWNTO 0);
|
||||
q_a : OUT STD_LOGIC_VECTOR (width_a-1 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
q <= sub_wire0(width_a-1 DOWNTO 0);
|
||||
|
||||
altsyncram_component : altsyncram
|
||||
GENERIC MAP (
|
||||
address_aclr_a => "NONE",
|
||||
clock_enable_input_a => "BYPASS",
|
||||
clock_enable_output_a => "BYPASS",
|
||||
init_file => init_file,
|
||||
intended_device_family => "Cyclone III",
|
||||
lpm_hint => "ENABLE_RUNTIME_MOD=NO",
|
||||
lpm_type => "altsyncram",
|
||||
numwords_a => 2**widthad_a,
|
||||
operation_mode => "ROM",
|
||||
outdata_aclr_a => "NONE",
|
||||
outdata_reg_a => outdata_reg_a,
|
||||
widthad_a => widthad_a,
|
||||
width_a => width_a,
|
||||
width_byteena_a => 1
|
||||
)
|
||||
PORT MAP (
|
||||
clock0 => clock,
|
||||
address_a => address,
|
||||
q_a => sub_wire0
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
242
Computer_MiST/Galaksija_MiST/rtl/video_mixer.sv
Normal file
@@ -0,0 +1,242 @@
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2017 Sorgelig
|
||||
//
|
||||
// This program is GPL Licensed. See COPYING for the full license.
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
`timescale 1ns / 1ps
|
||||
|
||||
//
|
||||
// LINE_LENGTH: Length of display line in pixels
|
||||
// Usually it's length from HSync to HSync.
|
||||
// May be less if line_start is used.
|
||||
//
|
||||
// HALF_DEPTH: If =1 then color dept is 3 bits per component
|
||||
// For half depth 6 bits monochrome is available with
|
||||
// mono signal enabled and color = {G, R}
|
||||
|
||||
module video_mixer
|
||||
#(
|
||||
parameter LINE_LENGTH = 768,
|
||||
parameter HALF_DEPTH = 0,
|
||||
|
||||
parameter OSD_COLOR = 3'd4,
|
||||
parameter OSD_X_OFFSET = 10'd0,
|
||||
parameter OSD_Y_OFFSET = 10'd0
|
||||
)
|
||||
(
|
||||
// master clock
|
||||
// it should be multiple by (ce_pix*4).
|
||||
input clk_sys,
|
||||
|
||||
// Pixel clock or clock_enable (both are accepted).
|
||||
input ce_pix,
|
||||
|
||||
// Some systems have multiple resolutions.
|
||||
// ce_pix_actual should match ce_pix where every second or fourth pulse is enabled,
|
||||
// thus half or qurter resolutions can be used without brake video sync while switching resolutions.
|
||||
// For fixed single resolution (or when video sync stability isn't required) ce_pix_actual = ce_pix.
|
||||
input ce_pix_actual,
|
||||
|
||||
// OSD SPI interface
|
||||
input SPI_SCK,
|
||||
input SPI_SS3,
|
||||
input SPI_DI,
|
||||
|
||||
// scanlines (00-none 01-25% 10-50% 11-75%)
|
||||
input [1:0] scanlines,
|
||||
|
||||
// 0 = HVSync 31KHz, 1 = CSync 15KHz
|
||||
input scandoubler_disable,
|
||||
|
||||
// High quality 2x scaling
|
||||
input hq2x,
|
||||
|
||||
// YPbPr always uses composite sync
|
||||
input ypbpr,
|
||||
|
||||
// 0 = 16-240 range. 1 = 0-255 range. (only for YPbPr color space)
|
||||
input ypbpr_full,
|
||||
|
||||
// color
|
||||
input [DWIDTH:0] R,
|
||||
input [DWIDTH:0] G,
|
||||
input [DWIDTH:0] B,
|
||||
|
||||
// Monochrome mode (for HALF_DEPTH only)
|
||||
input mono,
|
||||
|
||||
// interlace sync. Positive pulses.
|
||||
input HSync,
|
||||
input VSync,
|
||||
|
||||
// Falling of this signal means start of informative part of line.
|
||||
// It can be horizontal blank signal.
|
||||
// This signal can be used to reduce amount of required FPGA RAM for HQ2x scan doubler
|
||||
// If FPGA RAM is not an issue, then simply set it to 0 for whole line processing.
|
||||
// Keep in mind: due to algo first and last pixels of line should be black to avoid side artefacts.
|
||||
// Thus, if blank signal is used to reduce the line, make sure to feed at least one black (or paper) pixel
|
||||
// before first informative pixel.
|
||||
input line_start,
|
||||
|
||||
// MiST video output signals
|
||||
output [5:0] VGA_R,
|
||||
output [5:0] VGA_G,
|
||||
output [5:0] VGA_B,
|
||||
output VGA_VS,
|
||||
output VGA_HS
|
||||
);
|
||||
|
||||
localparam DWIDTH = HALF_DEPTH ? 2 : 5;
|
||||
|
||||
wire [DWIDTH:0] R_sd;
|
||||
wire [DWIDTH:0] G_sd;
|
||||
wire [DWIDTH:0] B_sd;
|
||||
wire hs_sd, vs_sd;
|
||||
|
||||
scandoubler #(.LENGTH(LINE_LENGTH), .HALF_DEPTH(HALF_DEPTH)) scandoubler
|
||||
(
|
||||
.*,
|
||||
.hs_in(HSync),
|
||||
.vs_in(VSync),
|
||||
.r_in(R),
|
||||
.g_in(G),
|
||||
.b_in(B),
|
||||
|
||||
.hs_out(hs_sd),
|
||||
.vs_out(vs_sd),
|
||||
.r_out(R_sd),
|
||||
.g_out(G_sd),
|
||||
.b_out(B_sd)
|
||||
);
|
||||
|
||||
wire [DWIDTH:0] rt = (scandoubler_disable ? R : R_sd);
|
||||
wire [DWIDTH:0] gt = (scandoubler_disable ? G : G_sd);
|
||||
wire [DWIDTH:0] bt = (scandoubler_disable ? B : B_sd);
|
||||
|
||||
generate
|
||||
if(HALF_DEPTH) begin
|
||||
wire [5:0] r = mono ? {gt,rt} : {rt,rt};
|
||||
wire [5:0] g = mono ? {gt,rt} : {gt,gt};
|
||||
wire [5:0] b = mono ? {gt,rt} : {bt,bt};
|
||||
end else begin
|
||||
wire [5:0] r = rt;
|
||||
wire [5:0] g = gt;
|
||||
wire [5:0] b = bt;
|
||||
end
|
||||
endgenerate
|
||||
|
||||
wire hs = (scandoubler_disable ? HSync : hs_sd);
|
||||
wire vs = (scandoubler_disable ? VSync : vs_sd);
|
||||
|
||||
reg scanline = 0;
|
||||
always @(posedge clk_sys) begin
|
||||
reg old_hs, old_vs;
|
||||
|
||||
old_hs <= hs;
|
||||
old_vs <= vs;
|
||||
|
||||
if(old_hs && ~hs) scanline <= ~scanline;
|
||||
if(old_vs && ~vs) scanline <= 0;
|
||||
end
|
||||
|
||||
wire [5:0] r_out, g_out, b_out;
|
||||
always @(*) begin
|
||||
case(scanlines & {scanline, scanline})
|
||||
1: begin // reduce 25% = 1/2 + 1/4
|
||||
r_out = {1'b0, r[5:1]} + {2'b00, r[5:2]};
|
||||
g_out = {1'b0, g[5:1]} + {2'b00, g[5:2]};
|
||||
b_out = {1'b0, b[5:1]} + {2'b00, b[5:2]};
|
||||
end
|
||||
|
||||
2: begin // reduce 50% = 1/2
|
||||
r_out = {1'b0, r[5:1]};
|
||||
g_out = {1'b0, g[5:1]};
|
||||
b_out = {1'b0, b[5:1]};
|
||||
end
|
||||
|
||||
3: begin // reduce 75% = 1/4
|
||||
r_out = {2'b00, r[5:2]};
|
||||
g_out = {2'b00, g[5:2]};
|
||||
b_out = {2'b00, b[5:2]};
|
||||
end
|
||||
|
||||
default: begin
|
||||
r_out = r;
|
||||
g_out = g;
|
||||
b_out = b;
|
||||
end
|
||||
endcase
|
||||
end
|
||||
|
||||
wire [5:0] red, green, blue;
|
||||
osd #(OSD_X_OFFSET, OSD_Y_OFFSET, OSD_COLOR) osd
|
||||
(
|
||||
.*,
|
||||
|
||||
.R_in(r_out),
|
||||
.G_in(g_out),
|
||||
.B_in(b_out),
|
||||
.HSync(hs),
|
||||
.VSync(vs),
|
||||
|
||||
.R_out(red),
|
||||
.G_out(green),
|
||||
.B_out(blue)
|
||||
);
|
||||
|
||||
wire [5:0] yuv_full[225] = '{
|
||||
6'd0, 6'd0, 6'd0, 6'd0, 6'd1, 6'd1, 6'd1, 6'd1,
|
||||
6'd2, 6'd2, 6'd2, 6'd3, 6'd3, 6'd3, 6'd3, 6'd4,
|
||||
6'd4, 6'd4, 6'd5, 6'd5, 6'd5, 6'd5, 6'd6, 6'd6,
|
||||
6'd6, 6'd7, 6'd7, 6'd7, 6'd7, 6'd8, 6'd8, 6'd8,
|
||||
6'd9, 6'd9, 6'd9, 6'd9, 6'd10, 6'd10, 6'd10, 6'd11,
|
||||
6'd11, 6'd11, 6'd11, 6'd12, 6'd12, 6'd12, 6'd13, 6'd13,
|
||||
6'd13, 6'd13, 6'd14, 6'd14, 6'd14, 6'd15, 6'd15, 6'd15,
|
||||
6'd15, 6'd16, 6'd16, 6'd16, 6'd17, 6'd17, 6'd17, 6'd17,
|
||||
6'd18, 6'd18, 6'd18, 6'd19, 6'd19, 6'd19, 6'd19, 6'd20,
|
||||
6'd20, 6'd20, 6'd21, 6'd21, 6'd21, 6'd21, 6'd22, 6'd22,
|
||||
6'd22, 6'd23, 6'd23, 6'd23, 6'd23, 6'd24, 6'd24, 6'd24,
|
||||
6'd25, 6'd25, 6'd25, 6'd25, 6'd26, 6'd26, 6'd26, 6'd27,
|
||||
6'd27, 6'd27, 6'd27, 6'd28, 6'd28, 6'd28, 6'd29, 6'd29,
|
||||
6'd29, 6'd29, 6'd30, 6'd30, 6'd30, 6'd31, 6'd31, 6'd31,
|
||||
6'd31, 6'd32, 6'd32, 6'd32, 6'd33, 6'd33, 6'd33, 6'd33,
|
||||
6'd34, 6'd34, 6'd34, 6'd35, 6'd35, 6'd35, 6'd35, 6'd36,
|
||||
6'd36, 6'd36, 6'd36, 6'd37, 6'd37, 6'd37, 6'd38, 6'd38,
|
||||
6'd38, 6'd38, 6'd39, 6'd39, 6'd39, 6'd40, 6'd40, 6'd40,
|
||||
6'd40, 6'd41, 6'd41, 6'd41, 6'd42, 6'd42, 6'd42, 6'd42,
|
||||
6'd43, 6'd43, 6'd43, 6'd44, 6'd44, 6'd44, 6'd44, 6'd45,
|
||||
6'd45, 6'd45, 6'd46, 6'd46, 6'd46, 6'd46, 6'd47, 6'd47,
|
||||
6'd47, 6'd48, 6'd48, 6'd48, 6'd48, 6'd49, 6'd49, 6'd49,
|
||||
6'd50, 6'd50, 6'd50, 6'd50, 6'd51, 6'd51, 6'd51, 6'd52,
|
||||
6'd52, 6'd52, 6'd52, 6'd53, 6'd53, 6'd53, 6'd54, 6'd54,
|
||||
6'd54, 6'd54, 6'd55, 6'd55, 6'd55, 6'd56, 6'd56, 6'd56,
|
||||
6'd56, 6'd57, 6'd57, 6'd57, 6'd58, 6'd58, 6'd58, 6'd58,
|
||||
6'd59, 6'd59, 6'd59, 6'd60, 6'd60, 6'd60, 6'd60, 6'd61,
|
||||
6'd61, 6'd61, 6'd62, 6'd62, 6'd62, 6'd62, 6'd63, 6'd63,
|
||||
6'd63
|
||||
};
|
||||
|
||||
// http://marsee101.blog19.fc2.com/blog-entry-2311.html
|
||||
// Y = 16 + 0.257*R + 0.504*G + 0.098*B (Y = 0.299*R + 0.587*G + 0.114*B)
|
||||
// Pb = 128 - 0.148*R - 0.291*G + 0.439*B (Pb = -0.169*R - 0.331*G + 0.500*B)
|
||||
// Pr = 128 + 0.439*R - 0.368*G - 0.071*B (Pr = 0.500*R - 0.419*G - 0.081*B)
|
||||
|
||||
wire [18:0] y_8 = 19'd04096 + ({red, 8'd0} + {red, 3'd0}) + ({green, 9'd0} + {green, 2'd0}) + ({blue, 6'd0} + {blue, 5'd0} + {blue, 2'd0});
|
||||
wire [18:0] pb_8 = 19'd32768 - ({red, 7'd0} + {red, 4'd0} + {red, 3'd0}) - ({green, 8'd0} + {green, 5'd0} + {green, 3'd0}) + ({blue, 8'd0} + {blue, 7'd0} + {blue, 6'd0});
|
||||
wire [18:0] pr_8 = 19'd32768 + ({red, 8'd0} + {red, 7'd0} + {red, 6'd0}) - ({green, 8'd0} + {green, 6'd0} + {green, 5'd0} + {green, 4'd0} + {green, 3'd0}) - ({blue, 6'd0} + {blue , 3'd0});
|
||||
|
||||
wire [7:0] y = ( y_8[17:8] < 16) ? 8'd16 : ( y_8[17:8] > 235) ? 8'd235 : y_8[15:8];
|
||||
wire [7:0] pb = (pb_8[17:8] < 16) ? 8'd16 : (pb_8[17:8] > 240) ? 8'd240 : pb_8[15:8];
|
||||
wire [7:0] pr = (pr_8[17:8] < 16) ? 8'd16 : (pr_8[17:8] > 240) ? 8'd240 : pr_8[15:8];
|
||||
|
||||
assign VGA_R = ypbpr ? (ypbpr_full ? yuv_full[pr-8'd16] : pr[7:2]) : red;
|
||||
assign VGA_G = ypbpr ? (ypbpr_full ? yuv_full[y -8'd16] : y[7:2]) : green;
|
||||
assign VGA_B = ypbpr ? (ypbpr_full ? yuv_full[pb-8'd16] : pb[7:2]) : blue;
|
||||
assign VGA_VS = (scandoubler_disable | ypbpr) ? 1'b1 : ~vs_sd;
|
||||
assign VGA_HS = scandoubler_disable ? ~(HSync ^ VSync) : ypbpr ? ~(hs_sd ^ vs_sd) : ~hs_sd;
|
||||
|
||||
endmodule
|
||||