Search found 18 matches

by Nick Gammon
Tue Apr 12, 2022 6:09 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

By the way, the latest release fixes what I regard as a bug. Labels (in the assembler) start in column 1, right? So a word in column 1 is added to the symbol table, regardless of what follows it.

Now consider this case:

lda #1
clc
adc #2

The "clc" in the example above is in column 1 and thus ...
by Nick Gammon
Tue Apr 12, 2022 5:59 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

I would certainly appreciate it if you can send a reproducible example of the find/replace not working. There may be an edge case I missed (like the start of the line, the end of the line, that sort of thing).

As for the newlines, you could change the symbol NL in gpascal.asm to be $0D rather than ...
by Nick Gammon
Sat Mar 26, 2022 5:25 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

I got my breadboard system to run at 5 MHz but not 8 MHz. I strongly suspect the speed of the EEPROM is the limiting factor there.
by Nick Gammon
Thu Mar 24, 2022 9:16 pm
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

After self-write is done, the bootstrap routine set a flip flop that disable EEPROM output enable and enable RAM output enable and we are now running in zero-wait fast RAM.

Thoughts?

Interesting idea. I already suggested a small change that disables writing to the EEPROM .

I don't have a 64 KB ...
by Nick Gammon
Thu Mar 24, 2022 9:09 pm
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

The 4-line LCD display worked even at 12MHz; I noticed it needs local echoback and use line feed instead of carriage return.


It is gratifying that someone else got it to work. Did you try the assembler?

I mention the need to use local echo here here .

As for linefeeds, I'm used to Linux these ...
by Nick Gammon
Thu Mar 24, 2022 4:14 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

Try re-assembling with:

LCD_SUPPORT = 0

in gpascal.asm.

That way it should basically not do much with the 6522 VIA. I thought I had a time-out in the LCD code if it didn't initialise quickly enough but perhaps not. If that turns out to be the issue I'll have a closer look at that code.

The ...
by Nick Gammon
Wed Mar 23, 2022 11:06 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

Michael wrote:
Since you've added a second 'glue' chip to the Wilson (Eater?) design to increase the amount of RAM available, may I suggest a relatively simple and flexible (untested) 2-chip method that even includes a few device select strobes?
Hi Michael,

Thanks for the suggestion.
by Nick Gammon
Wed Mar 23, 2022 11:05 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

I think what he meant was that Ben seems to have gotten his designs from my site, whether directly or indirectly—although this address decoding scheme is definitely not so absolutely brilliant that no one else could have come up with it. I started using it 30 years ago, published it here 21 years ...
by Nick Gammon
Wed Mar 23, 2022 2:54 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

Ah yes, I leveraged off that to increase the addressable RAM from 16kB to 24kB by "and"ing A14 and A13.

Image
by Nick Gammon
Wed Mar 23, 2022 12:45 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

Thanks, that clears that up. The address decoding seems straightforward to me. :)
by Nick Gammon
Wed Mar 23, 2022 12:28 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's


The best documentation for this design can be found at http://wilsonminesco.com/


I can't see any reference to Ben Eater on that site.

A search for eater site:wilsonminesco.com returned no results.

Just to summarise his layout:


W65C02 CPU
SRAM from $0000 to $3FFF (however using a 32kB ...
by Nick Gammon
Thu Mar 17, 2022 9:33 pm
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's


Start of RAM is that easy to adapt? I see TEXT_START with comment currently $0300, is that enough to change?


It should be. TEXT_START is where the source goes (growing upwards) with the P-codes or assembler code directly after the source (also growing upwards). The symbol table and runtime ...
by Nick Gammon
Tue Mar 15, 2022 2:00 am
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

To fit into 16k of ROM you can omit either the assembler or the Pascal compiler. Also omit the CP437 font and the LCD support.

The directives to do that are near the start of gpascal.asm:


LCD_SUPPORT = 0 ; 1 = support LCD, 0 = not. Unset if you have removed the LCD.
USE_CP437_FONT = 0 ; 1 ...
by Nick Gammon
Mon Mar 14, 2022 10:53 pm
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's


Thanks for the pointers. If it fits inside 16KB then it ought to be relatively easy to port it to my Ruby 6502 and BBC Micro.
-Gordon

Well, it doesn't. :)

Since I had a 32KB EEPROM I went a bit hog-wild adding extra features, like the assembler, CRC calculations (themselves not very large), I2C ...
by Nick Gammon
Mon Mar 14, 2022 10:36 pm
Forum: General Discussions
Topic: G-Pascal compiler and on-board assembler for Ben Eater's PC
Replies: 70
Views: 10529

Re: G-Pascal compiler and on-board assembler for Ben Eater's

I have been making some enhancements to the "shell" since the initial release. In particular:


You can write to memory locations from the shell, for tweaking stuff
You can resume after a breakpoint, to continue executing once you have inspected registers, memory etc.
You can manually JMP or JSR ...