BASIC

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
xopr
Posts: 21
Joined: 05 Jun 2018, 12:05

Re: BASIC

Post by xopr »

emulix wrote: 07 Jun 2018, 12:41 Hello,

could it be possible to add a cartridge on the ROM socket? This cartridge would contains two ou three software switchable ROMs. then the size of the BASIC would not be a problem.
I think you can put the EPROM in stand-by by having pin 2 (/CE, chip enable) high.

in short: wire everything in parallel to the new sockets except pin 2:
lead pin 2 to the common of a toggle switch, lead the remaining pins to both sockets -> pin 2 and have those pins pulled up by adding 10k resistors to pin 40.

You could use the A15 line to 'toggle the bank' but that will give problems when iterating/counting the upper area of the RAM
emulix
Posts: 3
Joined: 05 Jun 2018, 23:56

Re: BASIC

Post by emulix »

Other vintage computers use writing to address 0x0, 0x1, 0x2, 0x3 to switch the bank

for example (in french):

https://forum.system-cfg.com/viewtopic. ... 1&start=30

https://forum.system-cfg.com/viewtopic. ... &start=180

MEMO7 is the switchable cardtridge. The vintage THOMSON computers use 16KB banks.
There may be MEMO7 of 4, 8, 16, 32 or 64 KB. This reverse had already been done a long time ago and had allowed the development of megarom cartrdige. Up to 16 KB, the lines are closely linked to the address lines in order to populate the first 16 KB of the THOMSON computer memory map.

For 32 and 64 kb, it's very simple: one or two D flip-flops that are set to 1 or 0 by writing to the address 0 or 1 (2 and 3 more for the 64 KB). As a writing is basically groundless in this area (ROM), Thomson has quickly rocked a little door and and one or two rocker probably type 7474, to do the trick.
User avatar
marcelk
Posts: 488
Joined: 13 May 2018, 08:26

Re: BASIC

Post by marcelk »

The Usenet group alt.folkore.computers appears still active, they even started a Zilog Z80 vs. MOS 6502 thread a couple of day ago :shock:. Luckily there is also a more interesting thread about the history of BASIC. This YouTube video is an interesting watch, about a time well before both Bill's BASIC and TINY BASIC.

Birth of BASIC
"Professors John Kemeny and Tom Kurtz along with a band of Dartmouth undergraduates invent the Basic computer language."
https://www.youtube.com/watch?v=WYPNjSoDrqw
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: BASIC

Post by at67 »

emulix wrote: 07 Jun 2018, 14:16 Other vintage computers use writing to address 0x0, 0x1, 0x2, 0x3 to switch the bank
...
For 32 and 64 kb, it's very simple: one or two D flip-flops that are set to 1 or 0 by writing to the address 0 or 1 (2 and 3 more for the 64 KB). As a writing is basically groundless in this area (ROM), Thomson has quickly rocked a little door and and one or two rocker probably type 7474, to do the trick.
xopr wrote: 07 Jun 2018, 13:44 I think you can put the EPROM in stand-by by having pin 2 (/CE, chip enable) high.

in short: wire everything in parallel to the new sockets except pin 2:
lead pin 2 to the common of a toggle switch, lead the remaining pins to both sockets -> pin 2 and have those pins pulled up by adding 10k resistors to pin 40.

You could use the A15 line to 'toggle the bank' but that will give problems when iterating/counting the upper area of the RAM
emulix wrote: 07 Jun 2018, 12:41 Hello,

could it be possible to add a cartridge on the ROM socket? This cartridge would contains two ou three software switchable ROMs. then the size of the BASIC would not be a problem.
Here's a video of my current switchable ROM setup, writing software on the emulator and not being able to see real results on the hardware was getting old fast:

https://youtu.be/gdF33IdJ85U

- The first 4-5 seconds are a close up of the daughter board, it contains the original Gigatron ROM plus two SST39SF010A 128Kx8 NOR Flash devices that I have configured as two banks of 64Kx16 EEROM; this allows me to instantly switch between three ROMS.
- Low 128Kx8 is 2 banks of native opcode ROM, (instructions).
- High 128Kx8 is 2 banks of native operand ROM, (data).
- The three LEDS signify which ROM is active.
- ROM0 = original, ROM1 = original with VideoB scanline modification, (you can see how fast Racer is running, almost twice as fast), ROM2 is VideoB scanline modded with my Tetris demo replacing the credits.
- The two push buttons are for RESET and ROM SELECT.
- I replaced the MCP-475 with a MCP-450 and wired it's VCC pin to the debounced RESET button.
- The glue chips are a 74HC14 hex schmitt inverter and a 4017 decade counter.
- The schmitt provides debouncing for the two buttons and some inverting for control signals.
- The 4017 is setup as a MOD 3 counter to switch between the ROMS, (I didn't want to use a rotary switch or SP3T monstrosity, I wanted something a little more elegant).
- Selection of the ROMs is performed by the 4017 controlling the ROMs with chip enables.
- Selection of the 64K banks within the SST39SF010A's is also controlled by the 4017, using A16, (the truth table is quite simple).
- I've written a simple utility that is part of Contrib/at67 that splits the ROM files into separate opcode and operand streams/files, I then combine them within the TL866A software to program each 128Kx8 SST39SF010A.
- ZIF sockets and a proper PCB will be next.

I'll post a circuit diagram when I get a chance.
xopr
Posts: 21
Joined: 05 Jun 2018, 12:05

Re: BASIC

Post by xopr »

marcelk wrote: 07 Jun 2018, 22:24 ... This YouTube video is an interesting watch, about a time well before both Bill's BASIC and TINY BASIC...
Thanks for the link :)
at67 wrote: 08 Jun 2018, 14:32 ...Here's a video of my current switchable ROM setup
...
- Selection of the 64K banks within the SST39SF010A's is also controlled by the 4017, using A16, (the truth table is quite simple)...
That's just awesome!
So the A16 you are referring to is the spare bit of the RAM address?
If so, doesn't that give problems when counting the RAM on boot time?
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: BASIC

Post by at67 »

xopr wrote: 08 Jun 2018, 15:19 So the A16 you are referring to is the spare bit of the RAM address?
If so, doesn't that give problems when counting the RAM on boot time?
RAM A15 on the Gigatron PCB is the spare bit of the RAM address, you can use that to expand your RAM to 64Kx8.

I wasn't very clear, the ROM A16 that I mentioned is a signal generated by the 4017, the truth table looks something like this:

Code: Select all

_______  _______  _______
GROM_CE  ROM0_CE  ROM1_CE  ROM_A16
  0        1        1         X
  1        0        0         0
  1        0        0         1   
- How you generate these signals is up to you, I used the 4017 and inverters; but you can see that A16 chooses between the upper and lower 64K banks of ROM0 and ROM1, (the EEPROMS).
- Because the EEPROMS I chose, (they are super cheap and easy to get), are 8 bits wide, they both need to be active for a 16 bit data bus; so ROM0 and ROM1 CE's are mirrored and A16 chooses which 64Kx16 bank within the 128Kx16 is enabled.
ROM Switcher.png
ROM Switcher.png (72.95 KiB) Viewed 6494 times
Last edited by at67 on 09 Jun 2018, 03:57, edited 1 time in total.
WattSekunde
Posts: 24
Joined: 22 May 2018, 10:25

Re: BASIC

Post by WattSekunde »

Unbelievebal how many great details you are working on. I have to hurry up to follow all these threads. :D
emulix
Posts: 3
Joined: 05 Jun 2018, 23:56

Re: BASIC

Post by emulix »

Here's a video of my current switchable ROM setup,
Would it be possible to add a software bank commutation ? Like writing at ROM 0x0 for bank 0, 0x1 for bank 1, 0x2 for bank 2 etc... ?

So a software like Enhanced Basic could use many ROM bank and switch when needed.
User avatar
marcelk
Posts: 488
Joined: 13 May 2018, 08:26

Re: BASIC

Post by marcelk »

I replaced the MCP-475 with a MCP-450 and wired it's VCC pin to the debounced RESET button.
We're drifting a bit off-topic in this thread, but there is some debouncing provided by the MCP: it has a ~350 ms delay, tRPU in the data sheet, for releasing the /RESET signal. And there still is this 10 ms delay loop in the EPROM boot sequence, after the quick memory check and before incrementing the boot counter ("if software can do it, it doesn't belong in the hardware"):

Code: Select all

              address
              |    encoding
              |    |     instruction
              |    |     |    operands
              |    |     |    |
              V    V     V    V
              0013 00ff  ld   $ff         ;Debounce reset button
.debounce:    0014 c200  st   [$00]
              0015 ec15  bne  $0015
              0016 a001  suba $01
              0017 0100  ld   [$00]
              0018 ec14  bne  .debounce
              0019 a001  suba $01
If the sequence doesn't seem to make any logical sense, perhaps this story about pipelining helps.

[The long address space scan behind that, for setting up the entropy pool, does an even better job of course.]
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: BASIC

Post by at67 »

emulix wrote: 09 Jun 2018, 15:21 Would it be possible to add a software bank commutation ? Like writing at ROM 0x0 for bank 0, 0x1 for bank 1, 0x2 for bank 2 etc... ?

So a software like Enhanced Basic could use many ROM bank and switch when needed.
This thread has diverged from it's original purpose so I have started a ROM switching thread here:
https://forum.gigatron.io/viewtopic.php?f=4&t=34
Post Reply