MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

DeKay
MAME Fan
Reged: 12/31/12
Posts: 2
Send PM
Advice needed: Atmega 128 support in avr emulator
12/31/12 07:56 PM


Hi. I am working on emulating my weather station console. The console runs an Atmel Atmega 128 processor that supports 128K of flash rather than up to 64K in the AVR88 and AVR644 processors supported now in avr8.c. That was easy to get around with a new constructor and support I added for the ELPM instruction.

The problem I'm hitting now is that the register map for the 128L is very different from the others. I could define a new set of enums for the 128, but that only gets me so far. The READ8 and WRITE8 members are written assuming the AVR8 enums. I could make AVR128 specific routines for that, but then the next problem is that all the SPI, timer, etc routines are also AVR8 register specific.

So, what is the best way to generically handle this? Monster changes within the current code might be tricky given that I'm pretty new to this stuff, don't have commit access, and I didn't write the original code to begin with. A separate emulator for the 128 seems a bit like overkill given the similarity between the two architectures. Some code to generate emulators for each of the individual architectures would be nice but would again be a lot of work.

Any advice?







Entire thread
Subject Posted by Posted on
* Advice needed: Atmega 128 support in avr emulator DeKay 12/31/12 07:56 PM
. * Re: Advice needed: Atmega 128 support in avr emulator StilettoAdministrator  12/31/12 09:41 PM
. * Re: Advice needed: Atmega 128 support in avr emulator DeKay  12/31/12 09:51 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 49 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2637