Hello David,
The ping-pong[1] looks interesting!
You are correct the ATMega8 does present some challenges for AmForth 6.9
This issue came up on the mailing list earlier this year.
> Any ideas what's wrong about the Uart drivers
https://sourceforge.net/p/amforth/mailman/message/37085124/
> and how to strip down AmForth to fit into 8 kB of flash? Or has
> AmForth just gotten too old and fat over the years to render this
> undertaking unachievable?
https://sourceforge.net/p/amforth/mailman/message/37085843/
I think also that the ATMega8 may be missing some assembly
instructions that are now relied upon by the current build. Whether
it is technically possible to put AmForth 6.9 on a diet such that it
would fit in 8k flash I don't know, but faced with the task, I would
try to do it on an ATMega328p first.
>From a quick look at the ping-pong manual[3] I think it uses the
internal RC oscillator as the system clock as I couldn't see a crystal
or resonator. Sadly, the manual does not show a nicely socket-ed DIP-28
ATMega8. Otherwise replacing it physically with an ATMega328[2] might
have been an option to consider.
Best wishes,
Tristan
[1]
https://de.elv.com/franzis-ping-pong-das-retro-spiel-zum-selberbauen-bausatz-144843
[2] https://www.avrfreaks.net/forum/difference-between-atmega8-and-atmega328
[3] https://files2.elv.com/public/14/1448/144843/Internet/144843_manual.pdf
On 23Nov20 23:17, David Kuehling wrote:
> Hi,
>
> I've been trying to get AmForth onto this Atmega 8 based platform:
>
> https://www.elektronik-labor.de/Lernpakete/Pingong.html
> https://www.elektronik-labor.de/Elo/ELO.html
>
> Which is sold cheaply as a toy:
>
>
> https://de.elv.com/franzis-ping-pong-das-retro-spiel-zum-selberbauen-bausatz-144843
>
> Already soldered the ISP connector and a serial TTL cable. However,
> AmForth (v6.9) does not seem to compile for Atmega8 in its current
> version. Copying the template directory and editing makefile to say
> "MCU=atmega8", I'm getting a lot of compiler errors that indicate an
> overflow of the RWW dictionary space:
>
> ../../avr8\amforth-interpreter.asm(4): error: Overlap in .cseg: addr=0xc00
> conflicts with 0x7a:0xc58
> ../../avr8\amforth-interpreter.asm(5): error: Overlap in .cseg: addr=0xc01
> conflicts with 0x7a:0xc58
> [..]
>
> If I randomly comment out words in avr/appl_2k.inc, I get a little
> further. However, then compilation errs out in the UART driver code and
> complains about stuff in macros.asm:
>
> ../../avr8\drivers/usart_0.asm(1): error: Undefined symbol: UBRR0L
> ../../avr8\drivers/usart_0.asm(2): error: Undefined symbol: UBRR0H
> ../../avr8\drivers/usart_0.asm(3): error: Undefined symbol: UCSR0C
> ../../avr8\drivers/usart_0.asm(4): error: Undefined symbol: UCSR0B
> ../../avr8\drivers/usart_0.asm(5): error: Undefined symbol: UCSR0A
> ../../avr8\drivers/usart_0.asm(12): error: Undefined symbol: RXC0
> ../../avr8\drivers/usart_0.asm(13): error: Undefined symbol: UDRE0
> ../../avr8\drivers/usart_0.asm(14): error: Undefined symbol: TXEN0
> ../../avr8\drivers/usart_0.asm(15): error: Undefined symbol: RXEN0
> ../../avr8\drivers/usart_0.asm(16): error: Undefined symbol: RXCIE0
> ../../avr8\drivers/usart_0.asm(17): error: Undefined symbol: UDRIE0
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
>
> And this is even before I try to resolve all the problems arising from
> the words that I commented out.
>
> Maybe the Atmega8-specific code has been bit-rotting without being used
> for too long already? What do you think are my chances to make this
> work again? Any ideas what's wrong about the Uart drivers and how to
> strip down AmForth to fit into 8 kB of flash? Or has AmForth just
> gotten too old and fat over the years to render this undertaking
> unachievable?
>
> (I did some experiments with an Arduino Uno clone first, and had no
> problem compiling and setting up AmForth on it.)
>
> Maybe the Arduboy [1] would be better suited to AmForth, but it's also
> more costly and complex to program. I'm also eyeing the uzebox [2], but
> getting its video driver into AmForth would be a daunting endevour.
>
> cheers,
>
> David
>
> [1]
> https://www.reichelt.de/arduboy-arduino-kompatibles-miniaturspielsystem-ard-arduboy-p254388.html?&trstct=pos_0&nbc=1
> [2] http://belogic.com/uzebox/index.asp
> --
> GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk2.gpg
> Fingerprint: B63B 6AF2 4EEB F033 46F7 7F1D 935E 6F08 E457 205F
>
>
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>
___
Amf