[hatari-devel] WinUae CPU for hatari

Laurent Sallafranque laurent.sallafranque at free.fr
Fri Oct 22 19:22:43 CEST 2010


Hello,

>  I took a quick look at the changes.  Some comments:


Thanks a lot for the feedback.

> * Is WinUAE CPU actually using C++ exceptions (it had try, throw&  catch)
>    (which would need to be emulated with variables)?
>    
I think I've changed the ones in cpummu.
What do you mean here ?

> * There are a lot of "char*" ->  "const char*" fixes, those should be pushed
>     to upstream...
>    

Yes, I will change this.

> * What's the problem with the large number of "L" changes, couldn't they be
>    handled with some single define ("#define L") in compat header?
> -      D(bug(L"MMU: map transparent mapping of %08x\n", *ttr));
> +      //D(bug(L"MMU: map transparent mapping of %08x\n", *ttr));
>
>    
No, I think this would generate problems with lines of code like this one :

readcpu.c:    { i_ASL, "ASL"  , ""},

"ASL" would become "AS"

Correct me if I'm wrong.

> * cpu/cpummu.c - why remove "static"?
> -static struct mmu_atc_line atc_l2[2][ATC_L2_SIZE];
> +struct mmu_atc_line atc_l2[2][ATC_L2_SIZE];
>    

I don't know. I've done so many changes and tries before arriving here.
I'll check this tonight.

> * cpu/events.h - STATIC_INLINE is already defined by compat.h...
> -STATIC_INLINE int current_hpos (void)
> +static inline int current_hpos (void)
>
>    
Right.

> * cpu/memory.c - has redundant white space changes
>    (It's better if you check for differences with diff -ub)
>    
I'll look here too

> * cpu/custom.h - does that contain anything that would really be needed
>     by CPU emulation code?  If not, I guess it could be replaced just with
>    an empty file with comment saying that it's there just to reduce
>    changes to WinAUE sources.
>    

OK for this, but I think in this case that I should also include the 
whole .h (empty) files from uae that are needed for compiling (I've 
commented some of them).

At opposite, if you don't mind, I can just comment the lines that 
contains .h includes we don't need.
I don't think it would be a huge work to comment  them again after a 
major update.

This push another question : do you think that WinUae Cpu code will 
evoluate that much in the next years. Maybe after this work, it will be 
easier to just include their diffs ?

> * If you take some file directly from uae-cpu/, it would be preferably if
>    it could be a separate commit from other winuae code modifications.
>    Such file could, at least eventually, be in some directory common to both
>    AUE&  WinUAE code (at least maccess.h changes looked like this)
>    

You both have answered to this.
So, should I keep the actual way of doing it or should I apply your 
above suggestion ?

> * for these kind of changes:
> ---
> +      int i;
>         uae_u32 pc = m68k_getpc () + o;
>
>         for (;;) {
> -              for (int i = 0; i<  2; i++) {
> +              for (i = 0; i<  2; i++) {
> ---
>    it's actually enough to do more local change of:
> ---
>         for (;;) {
> -              for (int i = 0; i<  2; i++) {
> +              int i;
> +              for (i = 0; i<  2; i++) {
> ---
>   (it's enough for declaration to be at the start of a block.)
>
>    

> * cpu/sysconfig.h:
>    - AUE configuration things are OK
>    - system configuration defines (like STDC_HEADERS) shouldn't be
>      WinAUE specific, but be created by CMake, otherwise they will be wrong
>    

Eero, could you take some time to help me on this special file.
I'm not the best one for system configuration defines.
If you could make the necessary changes in sysconfig.h file, this would 
be great.


I return to the coding,

Regards

Laurent




More information about the hatari-devel mailing list