Re: [hatari-devel] Adding Aranym features for Hatari? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On sunnuntai 21 lokakuu 2012, Thomas Huth wrote:
> schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> > On lauantai 20 lokakuu 2012, Thomas Huth wrote:
> > > For Bus Error, you can use M68000_BusError(), for priviledge
> > > exception you could try something like
> > > Exception(8,0,M68000_EXC_SRC_CPU). Anyway, you've got to make sure
> > > to skip the m68k_incpc() and other remaining code when you did
> > > that, so that the CPU can correctly continue with the exception
> > > handler.
> >
> > Does the attached patch look OK?
>
> Ugh, using a global variable + extra function (NatFeat_HadException())
> looks very cumbersome ... why don't you simply return a bool for
> success/error and pass the "ret" value via a pointer to the function?
Ok, as you didn't have other comments, I changed it to work like that
and commited it.
> IMHO that would be a much better programming style.
Sure. Hatari itself being one giant state machine might have infected
the first version. :-)
- Eero