#300 The New Zealand Story - DSK version not working

v1.2
closed-fixed
None
5
2014-08-14
2013-08-13
No

The game crashes after loading the intro, before the change disk screen appears. The disk has a weird layout:

Track 8, Head 0 Info:
    Sectors 1, SectorSize 8192
    DSK Track Offset 49920
        Sector 0    Sector Id 193, Sector size 8192 (Marked As Deleted)
                TrackNumber 8, SideNumber 0, FDC1 20, FDC2 60

The problem is a READ_DIAG command that returns 6144 bytes instead of 512 bytes and induce a stack corruption:

READ_DIAG   (MSR ST0 ST1 ST2 ST3) PC
write  62   (90  00  20  20  51 ) D168
write  00   (90  00  20  20  51 ) D168
write  08   (90  00  20  20  51 ) D168  ; cyl 8
write  00   (90  00  20  20  51 ) D168
write  09   (90  00  20  20  51 ) D168
write  02   (90  00  20  20  51 ) D168  ; 512 bytes in sector
write  09   (90  00  20  20  51 ) D168
write  2A   (90  00  20  20  51 ) D168
write  FF   (30  00  00  00  51 ) D168

The attached patch fixes this crash.

1 Attachments

Discussion

  • Fredrick Meunier

    Nice one. I'm no expert on this area, but the code looks good and the change "works for me". f->data_offset only needs to be checked once now in the changed test in upd_fdc_read_data()?

     
  • Sergio Baldoví

    Sergio Baldoví - 2013-08-14

    Thanks for the feedback. I will test more games before committing all the recent activity.

     
  • Sergio Baldoví

    Sergio Baldoví - 2013-08-19
    • status: open --> pending-fixed
     
  • Fredrick Meunier

    • Group: future --> v1.2
     
  • Sergio Baldoví

    Sergio Baldoví - 2013-09-08
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks