saturn.rstk represents hardware so RSTK

This commit is contained in:
Gwenhael Le Moine 2024-04-10 16:44:51 +02:00
parent a4c61fae7b
commit 645abec1d2
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
4 changed files with 8 additions and 8 deletions

View file

@ -4054,8 +4054,8 @@ static void cmd_rstk( int argc, char** argv )
} else {
j = 0;
for ( i = saturn.rstkp; i >= 0; i-- ) {
disassemble( saturn.rstk[ i ], instr );
printf( "%2d: %.5lX: %s\n", j, saturn.rstk[ i ], instr );
disassemble( saturn.RSTK[ i ], instr );
printf( "%2d: %.5lX: %s\n", j, saturn.RSTK[ i ], instr );
j++;
}
}

View file

@ -94,11 +94,11 @@ static inline void push_return_addr( long addr )
{
if ( ++saturn.rstkp >= NB_RSTK ) {
for ( int i = 1; i < NB_RSTK; i++ )
saturn.rstk[ i - 1 ] = saturn.rstk[ i ];
saturn.RSTK[ i - 1 ] = saturn.RSTK[ i ];
saturn.rstkp--;
}
saturn.rstk[ saturn.rstkp ] = addr;
saturn.RSTK[ saturn.rstkp ] = addr;
}
static inline long pop_return_addr( void )
@ -106,7 +106,7 @@ static inline long pop_return_addr( void )
if ( saturn.rstkp < 0 )
return 0;
return saturn.rstk[ saturn.rstkp-- ];
return saturn.RSTK[ saturn.rstkp-- ];
}
static inline void do_in( void )

View file

@ -277,7 +277,7 @@ int read_state_file( FILE* fp )
if ( !read_8( fp, &saturn.hexmode ) )
return 0;
for ( i = 0; i < NB_RSTK; i++ )
if ( !read_32( fp, &saturn.rstk[ i ] ) )
if ( !read_32( fp, &saturn.RSTK[ i ] ) )
return 0;
if ( !read_16( fp, ( word_16* )&saturn.rstkp ) )
return 0;
@ -811,7 +811,7 @@ int write_state_file( char* filename )
write_8( fp, &saturn.MP );
write_8( fp, &saturn.hexmode );
for ( i = 0; i < NB_RSTK; i++ )
write_32( fp, &saturn.rstk[ i ] );
write_32( fp, &saturn.RSTK[ i ] );
write_16( fp, ( word_16* )&saturn.rstkp );
for ( i = 0; i < 9; i++ )
write_16( fp, ( word_16* )&saturn.keybuf.rows[ i ] );

View file

@ -214,7 +214,7 @@ typedef struct saturn_t {
word_4 hexmode;
word_20 rstk[ NB_RSTK ];
word_20 RSTK[ NB_RSTK ];
short rstkp;
keystate_t keybuf;