Skip to content

Commit

Permalink
[PLUS TOO] Optional 2.5x CPU Turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
harbaum committed Nov 19, 2015
1 parent 74d6acf commit 151479c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
9 changes: 6 additions & 3 deletions cores/plus_too/addrController_top.v
Expand Up @@ -3,6 +3,7 @@ module addrController_top(
input clk8, // 8.125 MHz CPU clock

// system config:
input turbo, // 0 = normal, 1 = faster
input configROMSize, // 0 = 64K ROM, 1 = 128K ROM
input [1:0] configRAMSize, // 0 = 128K, 1 = 512K, 2 = 1MB, 3 = 4MB RAM

Expand Down Expand Up @@ -117,9 +118,11 @@ module addrController_top(
// video controls memory bus during the first clock of the four-clock cycle
assign videoBusControl = (busCycle == 2'b00);
// cpu controls memory bus during the third clock of the four-clock cycle
assign cpuBusControl = (busCycle == 2'b10) && (subCycle != 2'd2);
//
wire extraBusControl = (busCycle == 2'b01);
assign cpuBusControl = turbo?cpuBusControl_fast:cpuBusControl_normal;
wire cpuBusControl_normal = (busCycle == 2'b01) && (subCycle != 2'd2);
wire cpuBusControl_fast = (busCycle == 2'b01) || (busCycle == 2'b11);

wire extraBusControl = (busCycle == 2'b10);

// interconnects
wire selectRAM, selectROM;
Expand Down
13 changes: 8 additions & 5 deletions cores/plus_too/plusToo_top.v
Expand Up @@ -107,7 +107,7 @@ always @(negedge dio_download or posedge diskEject[1]) begin
dsk_ext_ds <= 1'b0;
dsk_ext_ss <= 1'b0;
end else if(dio_index == 2) begin
dsk_ext_ds <= (dio_addr == 409599); // double sides disk, addr counts words, not bytes
dsk_ext_ds <= (dio_addr == 409599); // double sided disk, addr counts words, not bytes
dsk_ext_ss <= (dio_addr == 204799); // single sided disk
end
end
Expand Down Expand Up @@ -225,13 +225,15 @@ wire keyData;
"F2,DSK;",
"S3,IMG;",
"O4,Memory,1MB,4MB;",
"T5,Reset"
"O5,Speed,Normal,Turbo;",
"T6,Reset"
};

wire status_mem = status[4];
wire status_reset = status[5];
wire status_turbo = status[5];
wire status_reset = status[6];

parameter CONF_STR_LEN = 10+7+7+7+18+8;
parameter CONF_STR_LEN = 10+7+7+7+18+22+8;

// the status register is controlled by the on screen display (OSD)
wire [7:0] status;
Expand Down Expand Up @@ -307,6 +309,7 @@ wire keyData;
._cpuUDS(_cpuUDS),
._cpuLDS(_cpuLDS),
._cpuRW(_cpuRW),
.turbo (status_turbo),
.configROMSize(configROMSize),
.configRAMSize(configRAMSize),
.memoryAddr(memoryAddr),
Expand Down Expand Up @@ -348,7 +351,7 @@ wire keyData;
always @(posedge clk8) begin
last_mem_config <= status_mem;

// various source can reset the mac
// various sources can reset the mac
if(!pll_locked || status[0] || status_reset || buttons[1] ||
rom_download || (last_mem_config != status_mem))
rst_cnt <= 16'd65535;
Expand Down
1 change: 1 addition & 0 deletions cores/plus_too/readme.md
Expand Up @@ -31,5 +31,6 @@ Functional changes:
- fix mouse counter wrapping
- Basic sound support
- SCSI interface + SCSI hdd support
- CPU Turbo mode (ca factor 2.5)

Binaries are available at the [binaries repository](https://github.com/mist-devel/mist-binaries/tree/master/cores/plus_too).

0 comments on commit 151479c

Please sign in to comment.