From: <fr...@us...> - 2021-03-10 09:48:07
|
This is an automated email from the git hooks/post-receive-user script. fredm pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/36d3bec785712e52b7cd5060ee06816dedd7948e/ The following commit(s) were added to refs/heads/master by this push: new 36d3bec Don't generate an edge for the STOP48 TZX block 36d3bec is described below commit 36d3bec785712e52b7cd5060ee06816dedd7948e Author: Fredrick Meunier <fr...@sp...> AuthorDate: Wed Mar 10 20:47:26 2021 +1100 Don't generate an edge for the STOP48 TZX block --- ChangeLog | 1 + tape.c | 5 ++++- test/test_edges.c | 30 ++++++++++++++++-------------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index d065190..a25cdff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * Hide all symbols except the ones in the public API (Alberto Garcia). * Run tests on 'make check' invocation (Alberto Garcia). + * Don't generate an edge for the STOP48 TZX block (Fredrick Meunier). 2021-02-27 Philip Kendall <phi...@sh...> diff --git a/tape.c b/tape.c index b3776f1..8809cd7 100644 --- a/tape.c +++ b/tape.c @@ -437,7 +437,10 @@ libspectrum_tape_get_next_edge_internal( libspectrum_dword *tstates, break; case LIBSPECTRUM_TAPE_BLOCK_STOP48: - *tstates = 0; *flags |= LIBSPECTRUM_TAPE_FLAGS_STOP48; end_of_block = 1; + *tstates = 0; + *flags |= LIBSPECTRUM_TAPE_FLAGS_STOP48; + *flags |= LIBSPECTRUM_TAPE_FLAGS_NO_EDGE; + end_of_block = 1; break; case LIBSPECTRUM_TAPE_BLOCK_SET_SIGNAL_LEVEL: diff --git a/test/test_edges.c b/test/test_edges.c index b6a4b7f..eb3c787 100644 --- a/test/test_edges.c +++ b/test/test_edges.c @@ -61,48 +61,48 @@ complete_edges_list[] = { 2163000, 1, 0 }, /* Group start block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Group end block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Jump block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Pure tone block skipped */ /* Loop start block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Iteration 1 */ { 837, 185, 0 }, /* Pure tone block */ - { 0, 1, 0 }, /* Loop end block */ + { 0, 1, 8 }, /* Loop end block */ /* Iteration 2 */ { 837, 185, 0 }, /* Pure tone block */ - { 0, 1, 0 }, /* Loop end block */ + { 0, 1, 8 }, /* Loop end block */ /* Iteration 3 */ { 837, 185, 0 }, /* Pure tone block */ - { 0, 1, 0 }, /* Loop end block */ + { 0, 1, 8 }, /* Loop end block */ /* Stop tape if in 48K mode block */ - { 0, 1, 4 }, + { 0, 1, 12 }, /* Text description block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Message block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Archive info block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Hardware info block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Custom info block */ - { 0, 1, 0 }, + { 0, 1, 8 }, /* Pure tone block */ { 820, 940, 0 }, @@ -116,7 +116,9 @@ test_return_t test_15( void ) { return check_edges( DYNAMIC_TEST_PATH( "complete-tzx.tzx" ), complete_edges_list, - LIBSPECTRUM_TAPE_FLAGS_STOP | LIBSPECTRUM_TAPE_FLAGS_STOP48 ); + LIBSPECTRUM_TAPE_FLAGS_STOP | + LIBSPECTRUM_TAPE_FLAGS_STOP48 | + LIBSPECTRUM_TAPE_FLAGS_NO_EDGE ); } static test_edge_sequence_t |